Exemplo n.º 1
0
 /**
  * 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];
 }
Exemplo n.º 2
0
 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;
 }