當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。