Пример #1
0
 public function __construct($name, $parameters = array())
 {
     parent::__construct($name, $parameters);
     if (empty($parameters['values'])) {
         throw new SystemException(sprintf('Required parameter "values" for %s field in %s entity not found', $this->name, $this->entity->getNamespace() . $this->entity->getName()));
     }
     if (!is_array($parameters['values'])) {
         throw new SystemException(sprintf('Parameter "values" for %s field in %s entity should be an array', $this->name, $this->entity->getNamespace() . $this->entity->getName()));
     }
     $this->values = $parameters['values'];
 }
Пример #2
0
 public function __construct($name, $parameters = array())
 {
     parent::__construct($name, $parameters);
     $this->addFetchDataModifier(array($this, 'assureValueObject'));
 }