Пример #1
0
 /**
  * @param RequestInterpreterInterface $interpreter
  * @return DocumentValidatorInterface
  */
 private function documentValidator(RequestInterpreterInterface $interpreter)
 {
     if ($interpreter->isModifyRelationship()) {
         return $this->validators->relationshipDocument();
     }
     $validator = $this->validators->resource($interpreter->getResourceType(), $interpreter->getResourceId());
     return $this->validators->resourceDocument($validator);
 }
 /**
  * ValidatorFactory constructor.
  * @param ValidatorErrorFactoryInterface $validationErrors
  * @param StoreInterface $store
  * @param Factory $validatorFactory
  */
 public function __construct(ValidatorErrorFactoryInterface $validationErrors, StoreInterface $store, Factory $validatorFactory)
 {
     parent::__construct($validationErrors, $store);
     $this->validatorFactory = $validatorFactory;
 }