コード例 #1
0
 private static function implementsInterfaceRecursive(Clazz $clazz, $intfName)
 {
     assert($clazz->isInterface());
     if ($clazz->getName() === $intfName) {
         return true;
     }
     $intfs = $clazz->getInterfaces();
     foreach ($intfs as $intf) {
         if (self::implementsInterfaceRecursive($intf, $intfName)) {
             return true;
         }
     }
     return false;
 }