Nette\Reflection\Method::getDeclaringClass PHP Method

getDeclaringClass() public method

public getDeclaringClass ( ) : ClassType
return ClassType
    public function getDeclaringClass()
    {
        return new ClassType(parent::getDeclaringClass()->getName());
    }

Usage Example

Example #1
0
 /**
  * @param Method $method
  * @param $secured
  * @return null|string
  */
 protected function getSchemaOfResource(Method $method, $secured)
 {
     $ret = isset($secured['resource']) ? $secured['resource'] : NULL;
     if (!$ret) {
         $s = $method->getDeclaringClass()->getAnnotation('secured');
         $ret = isset($s['resource']) ? $s['resource'] : $method->getDeclaringClass()->getName();
     }
     return $ret;
 }
All Usage Examples Of Nette\Reflection\Method::getDeclaringClass