Esempio n. 1
0
 public function __construct(array $options = array())
 {
     $this->_options['self_field'] = null;
     parent::__construct($options);
     $this->setOption('db_column', false);
     $this->setOption('editable', false);
 }
Esempio n. 2
0
 public function __construct($descriptor, $parent, $foreignKey, $otherKey, $relation)
 {
     $this->otherKey = $otherKey;
     $this->relation = $relation;
     $this->foreignKey = $foreignKey;
     parent::__construct($descriptor, $parent);
 }
 public function __construct($descriptor, $parent, $foreignKey, $otherKey, $relation)
 {
     $this->otherKey = $otherKey;
     $this->relation = $relation;
     $this->foreignKey = $foreignKey;
     parent::__construct($descriptor, $parent);
     $endpoint = $this->descriptor->getEndpoint();
     $newEndpoint = str_replace("{{$this->foreignKey}}", $this->parent->{$this->otherKey}, $endpoint);
     $this->descriptor->setEndpoint($newEndpoint);
 }
Esempio n. 4
0
 public function __construct(array $options = [])
 {
     $this->_options['self_field'] = null;
     $this->_options['limit_choices_to'] = null;
     $this->_options['throughClass'] = null;
     $this->_options['db_table'] = null;
     parent::__construct($options);
     $this->setOption('db_column', false);
     $this->setOption('editable', false);
     /*if (!$this->to_field) {
           throw new \Exception('"to_field" is required option for Dja\\Db\\Model\\Field\\ManyToOne');
           // may be it shoud be set equal to pk field name
       }*/
 }
Esempio n. 5
0
 /**
  * @param string $name
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->secondForeignColumns = new Columns();
     $this->foreignForeignColumns = new Columns();
 }
 /**
  * BelongsToMany constructor.
  * @param string $tableName
  * @param string $joinTable
  * @param string $foreignColumnName
  * @param string $localColumnName
  */
 public function __construct($tableName, $joinTable, $foreignColumnName, $localColumnName)
 {
     $this->joinTable = $joinTable;
     parent::__construct($tableName, $foreignColumnName, $localColumnName);
 }
Esempio n. 7
0
 public function __construct(AbstractConnection $connection, $modelClass)
 {
     parent::__construct($connection);
     $this->modelClass = $modelClass;
 }
Esempio n. 8
0
 public function __construct($parent, $method_name)
 {
     parent::__construct($parent, $method_name, null, null, null);
 }
Esempio n. 9
0
 public function __construct()
 {
     global $DRDAT, $tables;
     parent::__construct($DRDAT, $tables['enrollment'], 'enrollment');
 }
Esempio n. 10
0
 public function __construct($currentModel, $relatedModel, $currentKey, $relatedKey)
 {
     $this->currentKey = $currentKey;
     $this->relatedKey = $relatedKey;
     parent::__construct($currentModel, $relatedModel);
 }