当前位置: 首页>>代码示例>>PHP>>正文


PHP Relation::__construct方法代码示例

本文整理汇总了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);
 }
开发者ID:buldezir,项目名称:dja_orm,代码行数:7,代码来源:ManyToOne.php

示例2: __construct

 public function __construct($descriptor, $parent, $foreignKey, $otherKey, $relation)
 {
     $this->otherKey = $otherKey;
     $this->relation = $relation;
     $this->foreignKey = $foreignKey;
     parent::__construct($descriptor, $parent);
 }
开发者ID:ashleigh-hopkins,项目名称:rest-model,代码行数:7,代码来源:BelongsTo.php

示例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);
 }
开发者ID:ashleigh-hopkins,项目名称:rest-model,代码行数:10,代码来源:BelongsToMany.php

示例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
       }*/
 }
开发者ID:buldezir,项目名称:dja_orm,代码行数:14,代码来源:ManyToMany.php

示例5: __construct

 /**
  * @param string $name
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->secondForeignColumns = new Columns();
     $this->foreignForeignColumns = new Columns();
 }
开发者ID:aviogram,项目名称:dal,代码行数:9,代码来源:RelationManyToMany.php

示例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);
 }
开发者ID:krlove,项目名称:eloquent-model-generator,代码行数:12,代码来源:BelongsToMany.php

示例7: __construct

 public function __construct(AbstractConnection $connection, $modelClass)
 {
     parent::__construct($connection);
     $this->modelClass = $modelClass;
 }
开发者ID:railsphp,项目名称:nosql,代码行数:5,代码来源:ModelRelation.php

示例8: __construct

 public function __construct($parent, $method_name)
 {
     parent::__construct($parent, $method_name, null, null, null);
 }
开发者ID:jawngee,项目名称:HeavyMetal,代码行数:4,代码来源:method_relation.php

示例9: __construct

 public function __construct()
 {
     global $DRDAT, $tables;
     parent::__construct($DRDAT, $tables['enrollment'], 'enrollment');
 }
开发者ID:Maharaja1,项目名称:drdata,代码行数:5,代码来源:model.php

示例10: __construct

 public function __construct($currentModel, $relatedModel, $currentKey, $relatedKey)
 {
     $this->currentKey = $currentKey;
     $this->relatedKey = $relatedKey;
     parent::__construct($currentModel, $relatedModel);
 }
开发者ID:jaydenguo,项目名称:gjnorm,代码行数:6,代码来源:HasOneOrMany.php


注:本文中的Relation::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。