Ejemplo n.º 1
0
 public function testSetGetModifiers()
 {
     $method = new MethodReflection('foo', 0);
     $method->setModifiers(0);
     $this->assertTrue($method->isPublic());
     $method->setModifiers(MethodReflection::MODIFIER_PUBLIC);
     $this->assertTrue($method->isPublic());
     $method->setModifiers(MethodReflection::MODIFIER_PROTECTED);
     $this->assertTrue($method->isProtected());
     $method->setModifiers(MethodReflection::MODIFIER_PRIVATE);
     $this->assertTrue($method->isPrivate());
     $method->setModifiers(MethodReflection::MODIFIER_ABSTRACT);
     $this->assertTrue($method->isPublic());
     $this->assertTrue($method->isAbstract());
 }
 public function acceptMethod(MethodReflection $method)
 {
     if ($method->isPrivate()) {
         return false;
     }
     if ($method->isProtected() && !$this->hasApiTag($method)) {
         return false;
     }
     if ($this->shouldBeIgnored($method)) {
         return false;
     }
     if ($this->hasApiTag($method)) {
         return true;
     }
     if ($this->hasApiTag($method->getClass())) {
         return true;
     }
     return false;
 }
Ejemplo n.º 3
0
 public function acceptMethod(MethodReflection $method)
 {
     return !$method->isPrivate();
 }