本文整理汇总了PHP中Relation::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Relation::__construct方法的具体用法?PHP Relation::__construct怎么用?PHP Relation::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Relation
的用法示例。
在下文中一共展示了Relation::__construct方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(array $options = array())
{
$this->_options['self_field'] = null;
parent::__construct($options);
$this->setOption('db_column', false);
$this->setOption('editable', false);
}
示例2: __construct
public function __construct($descriptor, $parent, $foreignKey, $otherKey, $relation)
{
$this->otherKey = $otherKey;
$this->relation = $relation;
$this->foreignKey = $foreignKey;
parent::__construct($descriptor, $parent);
}
示例3: __construct
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);
}
示例4: __construct
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
}*/
}
示例5: __construct
/**
* @param string $name
*/
public function __construct($name)
{
parent::__construct($name);
$this->secondForeignColumns = new Columns();
$this->foreignForeignColumns = new Columns();
}
示例6: __construct
/**
* 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);
}
示例7: __construct
public function __construct(AbstractConnection $connection, $modelClass)
{
parent::__construct($connection);
$this->modelClass = $modelClass;
}
示例8: __construct
public function __construct($parent, $method_name)
{
parent::__construct($parent, $method_name, null, null, null);
}
示例9: __construct
public function __construct()
{
global $DRDAT, $tables;
parent::__construct($DRDAT, $tables['enrollment'], 'enrollment');
}
示例10: __construct
public function __construct($currentModel, $relatedModel, $currentKey, $relatedKey)
{
$this->currentKey = $currentKey;
$this->relatedKey = $relatedKey;
parent::__construct($currentModel, $relatedModel);
}