function __construct($definition) { parent::__construct($definition); $onetomanyDef = array_merge($definition, array('rhs_label' => isset($definition['lhs_label']) ? $definition['lhs_label'] : null, 'lhs_label' => isset($definition['rhs_label']) ? $definition['rhs_label'] : null, 'lhs_subpanel' => isset($definition['rhs_subpanel']) ? $definition['rhs_subpanel'] : null, 'rhs_subpanel' => isset($definition['lhs_subpanel']) ? $definition['lhs_subpanel'] : null, 'lhs_module' => isset($definition['rhs_module']) ? $definition['rhs_module'] : null, 'lhs_table' => isset($definition['rhs_table']) ? $definition['rhs_table'] : null, 'lhs_key' => isset($definition['rhs_key']) ? $definition['rhs_key'] : null, 'rhs_module' => isset($definition['lhs_module']) ? $definition['lhs_module'] : null, 'rhs_table' => isset($definition['lhs_table']) ? $definition['lhs_table'] : null, 'rhs_key' => isset($definition['lhs_key']) ? $definition['lhs_key'] : null, 'join_key_lhs' => isset($definition['join_key_rhs']) ? $definition['join_key_rhs'] : null, 'join_key_rhs' => isset($definition['join_key_lhs']) ? $definition['join_key_lhs'] : null, 'relationship_type' => MB_ONETOMANY)); $this->one_to_many = new OneToManyRelationship($onetomanyDef); }
function __construct($definition) { parent::__construct($definition); }
public function __construct($options = array()) { parent::__construct($options); if (!$this->class_name) { $this->set_inferred_class_name(); } //infer from class_name if (!$this->foreign_key) { $this->foreign_key = array(Inflector::instance()->keyify($this->class_name)); } }
public function __construct($options = array()) { parent::__construct($options); if (!$this->class_name) { $this->set_inferred_class_name(); } //infer from class_name if (!$this->foreign_key) { $this->foreign_key = array($this->keyify($this->class_name)); } $this->primary_key = array(Table::load($this->class_name)->pk[0]); }
public function __construct($options = array()) { parent::__construct($options); if (!$this->className) { $this->setInferredClassName(); } //infer from class_name if (!$this->foreignKey) { $this->foreignKey = array(Inflector::instance()->keyify($this->className)); } $this->primaryKey = array(Table::load($this->className)->pk[0]); }