/** * @param string MetaData::ManyToOne|MetaData::OneToOne|MetaData::ManyToMany|MetaData::OneToMany * @param string * @param string * @param string * @param string */ public function __construct($type, $parentEntityName, $parentParam, $childRepositoryName, $childParam) { if ($type !== MetaData::ManyToOne and $type !== MetaData::OneToOne) { throw new InvalidArgumentException(); } if (!$childRepositoryName) { throw new RelationshipLoaderException("{$parentEntityName}::\${$parentParam} {{$type}} You must specify foreign repository {{$type} repositoryName}"); } parent::__construct($type, $parentEntityName, $parentParam, $childRepositoryName, $childParam); }