示例#1
0
 public function __construct(string $entityClass, string $foreignKey = null, string $junctionTable = null, string $junctionKey = null, bool $hasMany = false)
 {
     parent::__construct($entityClass, $foreignKey);
     $this->hasMany = $hasMany;
     $this->juctionKey = $junctionKey;
     $this->junctionTable = $junctionTable;
 }
示例#2
0
 /**
  * Constructor
  *
  * @param   Connection  $connection
  * @param   Model       $owner
  * @param   Model       $model
  * @param   string|null $foreignKey     (optional)
  * @param   string|null $junctionTable  (optional)
  * @param   string|null $junctionKey    (optional)
  */
 public function __construct(Connection $connection, Model $owner, Model $model, $foreignKey = null, $junctionTable = null, $junctionKey = null)
 {
     $this->junctionTable = $junctionTable;
     $this->junctionKey = $junctionKey;
     parent::__construct($connection, $owner, $model, $foreignKey);
 }