hasStaticMethod() публичный Метод

Return true if the class hierarchy contains the named static method.
public hasStaticMethod ( string $name ) : boolean
$name string
Результат boolean
Пример #1
0
 private function validateMethodExists($context, ReflectionHierarchy $benchmarkReflection, $method, $isStatic = false)
 {
     if (false === $benchmarkReflection->hasMethod($method)) {
         throw new \InvalidArgumentException(sprintf('Unknown %s method "%s" in benchmark class "%s"', $context, $method, $benchmarkReflection->getTop()->class));
     }
     if ($isStatic !== $benchmarkReflection->hasStaticMethod($method)) {
         throw new \InvalidArgumentException(sprintf('%s method "%s" must %s static in benchmark class "%s"', $context, $method, $isStatic ? 'be' : 'not be', $benchmarkReflection->getTop()->class));
     }
 }