コード例 #1
0
ファイル: HasManyThrough.php プロジェクト: nova-framework/cms
 /**
  * Create a new has many relationship instance.
  *
  * @param  \Nova\Database\ORM\Builder  $query
  * @param  \Nova\Database\ORM\Model  $farParent
  * @param  \Nova\Database\ORM\Model  $parent
  * @param  string  $firstKey
  * @param  string  $secondKey
  * @return void
  */
 public function __construct(Builder $query, Model $farParent, Model $parent, $firstKey, $secondKey)
 {
     $this->firstKey = $firstKey;
     $this->secondKey = $secondKey;
     $this->farParent = $farParent;
     parent::__construct($query, $parent);
 }
コード例 #2
0
ファイル: BelongsTo.php プロジェクト: nova-framework/cms
 /**
  * Create a new belongs to relationship instance.
  *
  * @param  \Nova\Database\ORM\Builder  $query
  * @param  \Nova\Database\ORM\Model  $parent
  * @param  string  $foreignKey
  * @param  string  $otherKey
  * @param  string  $relation
  * @return void
  */
 public function __construct(Builder $query, Model $parent, $foreignKey, $otherKey, $relation)
 {
     $this->otherKey = $otherKey;
     $this->relation = $relation;
     $this->foreignKey = $foreignKey;
     parent::__construct($query, $parent);
 }
コード例 #3
0
ファイル: BelongsToMany.php プロジェクト: nova-framework/cms
 /**
  * Create a new has many relationship instance.
  *
  * @param  \Nova\Database\ORM\Builder  $query
  * @param  \Nova\Database\ORM\Model  $parent
  * @param  string  $table
  * @param  string  $foreignKey
  * @param  string  $otherKey
  * @param  string  $relationName
  * @return void
  */
 public function __construct(Builder $query, Model $parent, $table, $foreignKey, $otherKey, $relationName = null)
 {
     $this->table = $table;
     $this->otherKey = $otherKey;
     $this->foreignKey = $foreignKey;
     $this->relationName = $relationName;
     parent::__construct($query, $parent);
 }
コード例 #4
0
ファイル: HasOneOrMany.php プロジェクト: nova-framework/cms
 /**
  * Create a new has many relationship instance.
  *
  * @param  \Nova\Database\ORM\Builder  $query
  * @param  \Nova\Database\ORM\Model  $parent
  * @param  string  $foreignKey
  * @param  string  $localKey
  * @return void
  */
 public function __construct(Builder $query, Model $parent, $foreignKey, $localKey)
 {
     $this->localKey = $localKey;
     $this->foreignKey = $foreignKey;
     parent::__construct($query, $parent);
 }