__construct() public method

Create a new has many relationship instance.
public __construct ( Builder $query, Model $parent, string $foreignKey ) : void
$query LMongo\Eloquent\Builder
$parent LMongo\Eloquent\Model
$foreignKey string
return void
コード例 #1
0
ファイル: BelongsToMany.php プロジェクト: navruzm/lmongo
 /**
  * Create a new has many relationship instance.
  *
  * @param  \LMongo\Eloquent\Builder  $query
  * @param  \LMongo\Eloquent\Model  $parent
  * @param  string  $foreignKey
  * @param  string  $otherKey
  * @return void
  */
 public function __construct(Builder $query, Model $parent, $foreignKey, $otherKey)
 {
     $this->otherKey = $otherKey;
     $this->foreignKey = $foreignKey;
     parent::__construct($query, $parent, $foreignKey);
 }
コード例 #2
0
ファイル: MorphOneOrMany.php プロジェクト: navruzm/lmongo
 /**
  * Create a new has many relationship instance.
  *
  * @param  \LMongo\Eloquent\Builder  $query
  * @param  \LMongo\Eloquent\Model  $parent
  * @param  string  $type
  * @param  string  $id
  * @return void
  */
 public function __construct(Builder $query, Model $parent, $type, $id)
 {
     $this->morphType = $type;
     $this->morphClass = get_class($parent);
     parent::__construct($query, $parent, $id);
 }