protected static function getEventname($callback) {
        if (is_string($callback)) {
            return strtolower($callback);
        } elseif (is_array($callback)) {
            if (is_string($callback[0])) {
                $classname = $callback[0];
            } else {
                $classname = get_class($callback[0]);
            }
            $eventclass = trim(strrchr($classname, '\\'), '\\');
            if (!$eventclass) {
                $eventclass = $classname;
            }
            return strtolower($eventclass.'_'.$callback[1]);
        }
        return '';
    }
protected static function getEventname($callback) {
        if (is_string($callback)) {
            return strtolower($callback);
        } elseif (is_array($callback)) {
            if (is_string($callback[0])) {
                $classname = $callback[0];
            } else {
                $classname = get_class($callback[0]);
            }
            $eventclass = trim(strrchr($classname, '\\'), '\\');
            if (!$eventclass) {
                $eventclass = $classname;
            }
            return strtolower($eventclass.'_'.$callback[1]);
        }
        return '';
    }
protected static function getEventname ( $ callback ) { if ( is_string ( $ callback ) ) { return strtolower ( $ callback ) ; } elseif ( is_array ( $ callback ) ) { if ( is_string ( $ callback [ 0 ] ) ) { $ classname = $ callback [ 0 ] ; } else { $ classname = get_class ( $ callback [ 0 ] ) ; } $ eventclass = trim ( strrchr ( $ classname , '\\' ) , '\\' ) ; if ( ! $ eventclass ) { $ eventclass = $ classname ; } return strtolower ( $ eventclass . '_' . $ callback [ 1 ] ) ; } return '' ; }
Get the event name for a callback.

@param string|array|callable $callback The callback or an array in the form of a callback.
@return string The name of the callback.
Get the event name for a callback .