public static function hasHandlers($class, $name)
    {
        if (empty(self::$_events[$name])) {
            return false;
        }
        if (is_object($class)) {
            $class = get_class($class);
        } else {
            $class = ltrim($class, '\\');
        }

        $classes = array_merge(
            [$class],
            class_parents($class, true),
            class_implements($class, true)
        );

        foreach ($classes as $class) {
            if (!empty(self::$_events[$name][$class])) {
                return true;
            }
        }

        return false;
    }
public static function hasHandlers($class, $name)
    {
        if (empty(self::$_events[$name])) {
            return false;
        }
        if (is_object($class)) {
            $class = get_class($class);
        } else {
            $class = ltrim($class, '\\');
        }

        $classes = array_merge(
            [$class],
            class_parents($class, true),
            class_implements($class, true)
        );

        foreach ($classes as $class) {
            if (!empty(self::$_events[$name][$class])) {
                return true;
            }
        }

        return false;
    }
public static function hasHandlers ( $ class , $ name ) { if ( empty ( self :: $ _events [ $ name ] ) ) { return false ; } if ( is_object ( $ class ) ) { $ class = get_class ( $ class ) ; } else { $ class = ltrim ( $ class , '\\' ) ; } $ classes = array_merge ( [ $ class ] , class_parents ( $ class , true ) , class_implements ( $ class , true ) ) ; foreach ( $ classes as $ class ) { if ( ! empty ( self :: $ _events [ $ name ] [ $ class ] ) ) { return true ; } } return false ; }
Returns a value indicating whether there is any handler attached to the specified class-level event.
Note that this method will also check all parent classes to see if there is any handler attached
to the named event.
@param string|object $class the object or the fully qualified class name specifying the class-level event.
@param string $name the event name.
@return boolean whether there is any handler attached to the event.
Returns a value indicating whether there is any handler attached to the specified class - level event . Note that this method will also check all parent classes to see if there is any handler attached to the named event .