Skip to content

Automated pull request - civix regenerated #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
284 changes: 19 additions & 265 deletions CRM/eWAYRecurring/DAO/EwayContributionTransactions.php
Original file line number Diff line number Diff line change
@@ -1,274 +1,28 @@
<?php
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2019
*
* Generated from
* /var/www/civicrmmaster/sites/default/files/civicrm/ext/au.com.agileware.ewayrecurring/xml/schema//EwayContributionTransactions.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:e435b4bc2b25ed1a50af0ffcb1766554)
*/

/**
* Database access object for the EwayContributionTransactions entity.
* DAOs provide an OOP-style facade for reading and writing database records.
*
* DAOs are a primary source for metadata in older versions of CiviCRM (<5.74)
* and are required for some subsystems (such as APIv3).
*
* This stub provides compatibility. It is not intended to be modified in a
* substantive way. Property annotations may be added, but are not required.
* @property string $id
* @property string $contribution_id
* @property string $payment_processor_id
* @property string $access_code
* @property string $failed_message
* @property string $status
* @property string $tries
* @property string $is_email_receipt
*/
class CRM_eWAYRecurring_DAO_EwayContributionTransactions extends CRM_Core_DAO {
class CRM_eWAYRecurring_DAO_EwayContributionTransactions extends CRM_eWAYRecurring_DAO_Base {

/**
* Static instance to hold the table name.
*
* Required by older versions of CiviCRM (<5.74).
* @var string
*/
static $_tableName = 'civicrm_eway_contribution_transactions';

/**
* Should CiviCRM log any modifications to this table in the civicrm_log
* table.
*
* @var bool
*/
static $_log = TRUE;

/**
* Unique EwayContributionTransactions ID
*
* @var int unsigned
*/
public $id;

/**
* FK to Contribution
*
* @var int unsigned
*/
public $contribution_id;

/**
* FK to PaymentProcessor
*
* @var int unsigned
*/
public $payment_processor_id;

/**
* @var text
*/
public $access_code;

/**
* @var text
*/
public $failed_message;

/**
* @var int unsigned
*/
public $status;

/**
* @var int unsigned
*/
public $tries;
public static $_tableName = 'civicrm_eway_contribution_transactions';

/**
* @var int unsigned
*/
public $is_email_receipt;

/**
* Class constructor.
*/
public function __construct() {
$this->__table = 'civicrm_eway_contribution_transactions';
parent::__construct();
}

/**
* Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
public static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'contribution_id', 'civicrm_contribution', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'payment_processor_id', 'civicrm_payment_processor', 'id');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
return Civi::$statics[__CLASS__]['links'];
}

/**
* Returns all the column names of this table
*
* @return array
*/
public static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = [
'id' => [
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'description' => ts('Unique EwayContributionTransactions ID'),
'required' => TRUE,
'table_name' => 'civicrm_eway_contribution_transactions',
'entity' => 'EwayContributionTransactions',
'bao' => 'CRM_eWAYRecurring_DAO_EwayContributionTransactions',
'localizable' => 0,
],
'contribution_id' => [
'name' => 'contribution_id',
'type' => CRM_Utils_Type::T_INT,
'description' => ts('FK to Contribution'),
'table_name' => 'civicrm_eway_contribution_transactions',
'entity' => 'EwayContributionTransactions',
'bao' => 'CRM_eWAYRecurring_DAO_EwayContributionTransactions',
'localizable' => 0,
],
'payment_processor_id' => [
'name' => 'payment_processor_id',
'type' => CRM_Utils_Type::T_INT,
'description' => ts('FK to PaymentProcessor'),
'table_name' => 'civicrm_eway_contribution_transactions',
'entity' => 'EwayContributionTransactions',
'bao' => 'CRM_eWAYRecurring_DAO_EwayContributionTransactions',
'localizable' => 0,
],
'access_code' => [
'name' => 'access_code',
'type' => CRM_Utils_Type::T_TEXT,
'title' => ts('Access Code'),
'import' => TRUE,
'where' => 'civicrm_eway_contribution_transactions.access_code',
'headerPattern' => '',
'dataPattern' => '',
'export' => TRUE,
'table_name' => 'civicrm_eway_contribution_transactions',
'entity' => 'EwayContributionTransactions',
'bao' => 'CRM_eWAYRecurring_DAO_EwayContributionTransactions',
'localizable' => 0,
'html' => [
'type' => 'Text',
],
],
'failed_message' => [
'name' => 'failed_message',
'type' => CRM_Utils_Type::T_TEXT,
'title' => ts('Failed Message'),
'import' => TRUE,
'where' => 'civicrm_eway_contribution_transactions.failed_message',
'headerPattern' => '',
'dataPattern' => '',
'export' => TRUE,
'table_name' => 'civicrm_eway_contribution_transactions',
'entity' => 'EwayContributionTransactions',
'bao' => 'CRM_eWAYRecurring_DAO_EwayContributionTransactions',
'localizable' => 0,
'html' => [
'type' => 'Text',
],
],
'status' => [
'name' => 'status',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Status'),
'default' => '0',
'table_name' => 'civicrm_eway_contribution_transactions',
'entity' => 'EwayContributionTransactions',
'bao' => 'CRM_eWAYRecurring_DAO_EwayContributionTransactions',
'localizable' => 0,
],
'tries' => [
'name' => 'tries',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Tries'),
'default' => '0',
'table_name' => 'civicrm_eway_contribution_transactions',
'entity' => 'EwayContributionTransactions',
'bao' => 'CRM_eWAYRecurring_DAO_EwayContributionTransactions',
'localizable' => 0,
],
'is_email_receipt' => [
'name' => 'is_email_receipt',
'type' => CRM_Utils_Type::T_INT,
'description' => ts('Send email?'),
'table_name' => 'civicrm_eway_contribution_transactions',
'entity' => 'EwayContributionTransactions',
'bao' => 'CRM_eWAYRecurring_DAO_EwayContributionTransactions',
'localizable' => 0,
],
];
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}

/**
* Return a mapping from field-name to the corresponding key (as used in
* fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
public static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}

/**
* Returns the names of this table
*
* @return string
*/
public static function getTableName() {
return self::$_tableName;
}

/**
* Returns if this table needs to be logged
*
* @return bool
*/
public function getLog() {
return self::$_log;
}

/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
public static function &import($prefix = FALSE) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'eway_contribution_transactions', $prefix, []);
return $r;
}

/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
public static function &export($prefix = FALSE) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'eway_contribution_transactions', $prefix, []);
return $r;
}

/**
* Returns the list of indices
*
* @param bool $localize
*
* @return array
*/
public static function indices($localize = TRUE) {
$indices = [];
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}
}
44 changes: 37 additions & 7 deletions eWAYRecurring.civix.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,44 @@ public static function findClass($suffix) {
return self::CLASS_PREFIX . '_' . str_replace('\\', '_', $suffix);
}

/**
* @return \CiviMix\Schema\SchemaHelperInterface
*/
public static function schema() {
if (!isset($GLOBALS['CiviMixSchema'])) {
pathload()->loadPackage('civimix-schema@5', TRUE);
}
return $GLOBALS['CiviMixSchema']->getHelper(static::LONG_NAME);
}

}

use CRM_eWAYRecurring_ExtensionUtil as E;

function _eWAYRecurring_civix_mixin_polyfill() {
if (!class_exists('CRM_Extension_MixInfo')) {
$polyfill = __DIR__ . '/mixin/polyfill.php';
(require $polyfill)(E::LONG_NAME, E::SHORT_NAME, E::path());
($GLOBALS['_PathLoad'][0] ?? require __DIR__ . '/mixin/lib/pathload-0.php');
pathload()->addSearchDir(__DIR__ . '/mixin/lib');
spl_autoload_register('_eWAYRecurring_civix_class_loader', TRUE, TRUE);

function _eWAYRecurring_civix_class_loader($class) {
if ($class === 'CRM_eWAYRecurring_DAO_Base') {
if (version_compare(CRM_Utils_System::version(), '5.74.beta', '>=')) {
class_alias('CRM_Core_DAO_Base', 'CRM_eWAYRecurring_DAO_Base');
// ^^ Materialize concrete names -- encourage IDE's to pick up on this association.
}
else {
$realClass = 'CiviMix\\Schema\\EWAYRecurring\\DAO';
class_alias($realClass, $class);
// ^^ Abstract names -- discourage IDE's from picking up on this association.
}
return;
}

// This allows us to tap-in to the installation process (without incurring real file-reads on typical requests).
if (strpos($class, 'CiviMix\\Schema\\EWAYRecurring\\') === 0) {
// civimix-schema@5 is designed for backported use in download/activation workflows,
// where new revisions may become dynamically available.
pathload()->loadPackage('civimix-schema@5', TRUE);
CiviMix\Schema\loadClass($class);
}
}

Expand All @@ -101,7 +131,7 @@ function _eWAYRecurring_civix_civicrm_config($config = NULL) {
$extRoot = __DIR__ . DIRECTORY_SEPARATOR;
$include_path = $extRoot . PATH_SEPARATOR . get_include_path();
set_include_path($include_path);
_eWAYRecurring_civix_mixin_polyfill();
// Based on <compatibility>, this does not currently require mixin/polyfill.php.
}

/**
Expand All @@ -111,7 +141,7 @@ function _eWAYRecurring_civix_civicrm_config($config = NULL) {
*/
function _eWAYRecurring_civix_civicrm_install() {
_eWAYRecurring_civix_civicrm_config();
_eWAYRecurring_civix_mixin_polyfill();
// Based on <compatibility>, this does not currently require mixin/polyfill.php.
}

/**
Expand All @@ -121,7 +151,7 @@ function _eWAYRecurring_civix_civicrm_install() {
*/
function _eWAYRecurring_civix_civicrm_enable(): void {
_eWAYRecurring_civix_civicrm_config();
_eWAYRecurring_civix_mixin_polyfill();
// Based on <compatibility>, this does not currently require mixin/polyfill.php.
}

/**
Expand Down
7 changes: 4 additions & 3 deletions info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@
<comments/>
<civix>
<namespace>CRM/eWAYRecurring</namespace>
<format>23.02.1</format>
<format>25.01.1</format>
</civix>
<mixins>
<mixin>[email protected]</mixin>
<mixin>[email protected]</mixin>
<mixin>[email protected]</mixin>
<mixin>[email protected]</mixin>
<mixin>[email protected]</mixin>
</mixins>
<classloader>
<psr0 prefix="CRM_" path="."/>
<psr4 prefix="Civi\" path="Civi"/>
</classloader>
<upgrader>CRM_eWAYRecurring_Upgrader</upgrader>
<upgrader>CiviMix\Schema\EWAYRecurring\AutomaticUpgrader</upgrader>
</extension>
Loading