kernel/private/classes/ezpevent.php
public function attach( $name, $listener )
    {
        $id = self::$listenerIdNumber++;
        // explode callback if static class string, workaround for PHP < 5.2.3
        if ( is_string( $listener ) && strpos( $listener, '::' ) !== false )
        {
            $listener = explode( '::', $listener );
        }

        $this->listeners[$name][$id] = $listener;
        return $id;
    }
public function attach( $name, $listener )
    {
        $id = self::$listenerIdNumber++;
        // explode callback if static class string, workaround for PHP < 5.2.3
        if ( is_string( $listener ) && strpos( $listener, '::' ) !== false )
        {
            $listener = explode( '::', $listener );
        }

        $this->listeners[$name][$id] = $listener;
        return $id;
    }
public function attach ( $ name , $ listener ) { $ id = self :: $ listenerIdNumber ++ ; // explode callback if static class string, workaround for PHP < 5.2.3 if ( is_string ( $ listener ) && strpos ( $ listener , '::' ) !== false ) { $ listener = explode ( '::' , $ listener ) ; } $ this -> listeners [ $ name ] [ $ id ] = $ listener ; return $ id ; }
Attach an event listener at run time on demand.

@param string $name In the form "content/delete/1" or "content/delete"
@param array|string $listener A valid PHP callback {@see http://php.net/manual/en/language.pseudo-types.php#language.types.callback}
@return int Listener id, can be used to detach a listener later {@see detach()}
Attach an event listener at run time on demand .