/** * Get option * * @param string $key * * @return mixed * * @throws Exception\InvalidArgumentException */ public function getOption($key) { if (!$this->hasOption($key)) { throw new Exception\InvalidArgumentException("Option " . $key . " not defined on " . $this->entityReflection->getClassName() . "::\$" . $this->name . "!"); } return $this->options[$key]; }
public function __construct(Entity\Reflection $reflection) { if (!$reflection->hasAdapter()) { throw new QueryException("Can not create query because entity " . $reflection->getClassName() . " has no adapter defined!"); } $this->entityReflection = $reflection; }