PhpParser\Node\Stmt\ClassMethod::isProtected PHP Method

isProtected() public method

public isProtected ( )
    public function isProtected() {
        return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);
    }

Usage Example

Example #1
0
 static function getMethodAccessLevel(ClassMethod $level)
 {
     if ($level->isPublic()) {
         return "public";
     }
     if ($level->isPrivate()) {
         return "private";
     }
     if ($level->isProtected()) {
         return "protected";
     }
     trigger_error("Impossible");
 }
All Usage Examples Of PhpParser\Node\Stmt\ClassMethod::isProtected