function __construct(&$source, $dest, $options = null) { parent::__construct($source, $dest, $options); if (!isset($options['foreign_key'])) { $this->foreign_key = ActiveRecordInflector::foreign_key($this->dest_class); } }
/** * @param ProductInterface $product * @param AssociationType $type */ public function __construct(ProductInterface $product, AssociationType $type) { parent::__construct($type); $this->product = $product; }
/** * Association constructor. * * @param string $record referenced object * @param string $localId localId column name * @param string $foreignId paramId column name */ public function __construct($record, $localId, $foreignId) { parent::__construct(self::BELONGS_TO, NULL, $localId, $foreignId); $this->belongsToRecord = $record; }
/** * Constructs a Simulation_Event with the given type and time. * * @param integer $type The type of the event. * @param integer $time The time of the event. */ public function __construct($type, $time) { parent::__construct(box($time), box($type)); }
function __construct(&$source, $dest, $options = null) { parent::__construct($source, $dest, $options); $this->foreign_key = ActiveRecordInflector::foreign_key($this->source_class); }
function __construct(&$source, $dest, $options = null) { parent::__construct($source, $dest, $options); }
/** * Association constructor. * * @param string $referenceClass referenced object name * @param string $localId localId column name */ public function __construct($referenceClass, $params = array()) { parent::__construct(self::HAS_ONE, $referenceClass, $params['localId'], $params['foreignId'], isset($params['condition']) ? $params['condition'] : NULL, isset($params['through']) ? $params['through'] : NULL, isset($params['throughLocalId']) ? $params['throughLocalId'] : NULL, isset($params['throughForeignId']) ? $params['throughForeignId'] : NULL); }
/** * Association constructor. * * @param string $referenceClass referenced object name * @param array $params */ public function __construct($referenceClass, $params = array()) { parent::__construct(self::HAS_MANY, $referenceClass, $params['localId'], $params['foreignId'], isset($params['condition']) ? $params['condition'] : NULL, isset($params['through']) ? $params['through'] : NULL, isset($params['throughLocalId']) ? $params['throughLocalId'] : NULL, isset($params['throughForeignId']) ? $params['throughForeignId'] : NULL); $this->associatedCollectionClass = isset($params['associatedCollectionClass']) ? $params['associatedCollectionClass'] : __NAMESPACE__ . "\\AssociatedCollection"; }