Neos\Flow\Mvc\Controller\Argument::getValidator PHP 메소드

getValidator() 공개 메소드

Returns the set validator
public getValidator ( ) : Neos\Flow\Validation\Validator\ValidatorInterface
리턴 Neos\Flow\Validation\Validator\ValidatorInterface The set validator, NULL if none was set
    public function getValidator()
    {
        return $this->validator;
    }

Usage Example

예제 #1
0
파일: ArgumentTest.php 프로젝트: neos/flow
 /**
  * @test
  */
 public function setValidatorShouldProvideFluentInterfaceAndReallySetValidator()
 {
     $mockValidator = $this->createMock(ValidatorInterface::class);
     $returnedArgument = $this->simpleValueArgument->setValidator($mockValidator);
     $this->assertSame($this->simpleValueArgument, $returnedArgument, 'The returned argument is not the original argument.');
     $this->assertSame($mockValidator, $this->simpleValueArgument->getValidator());
 }