コード例 #1
0
 /**
  * Validate vehicle data if @ValidateVehicle is used
  *
  * @param type $controller
  * @param type $methodName
  */
 public function beforeController($controller, $methodName)
 {
     if ($this->reflector->hasAnnotation($this->annotation)) {
         $this->validate();
         if ($this->validator->fails()) {
             throw new ValidationException($this->validator);
         }
     }
 }
コード例 #2
0
 public function testInheritanceOverrideNoDocblock()
 {
     $reader = new ControllerMethodReflector();
     $reader->reflect('OC\\AppFramework\\Utility\\EndController', 'test3');
     $this->assertFalse($reader->hasAnnotation('Annotation'));
 }
コード例 #3
0
 public function testReflectParameters2()
 {
     $reader = new ControllerMethodReflector();
     $reader->reflect('\\OC\\AppFramework\\Utility\\ControllerMethodReflectorTest', 'arguments2');
     $this->assertEquals(array('arg' => null), $reader->getParameters());
 }