public function getSubscriptions()
    {
        if (! $this->__subscriptions) {
            $subscriptions  = array();

            //Get all the public methods
            $reflection = new ReflectionClass($this);

            foreach ($reflection->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
                if (substr($method->name, 0, 2) === 'on') {
                    $subscriptions[] = $method->name;
                }
            }

            $this->__subscriptions = $subscriptions;
        }

        return $this->__subscriptions;
    }
public function getSubscriptions()
    {
        if (! $this->__subscriptions) {
            $subscriptions  = array();

            //Get all the public methods
            $reflection = new ReflectionClass($this);

            foreach ($reflection->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
                if (substr($method->name, 0, 2) === 'on') {
                    $subscriptions[] = $method->name;
                }
            }

            $this->__subscriptions = $subscriptions;
        }

        return $this->__subscriptions;
    }
public function getSubscriptions ( ) { if ( ! $ this -> __subscriptions ) { $ subscriptions = array ( ) ; //Get all the public methods $ reflection = new ReflectionClass ( $ this ) ; foreach ( $ reflection -> getMethods ( ReflectionMethod :: IS_PUBLIC ) as $ method ) { if ( substr ( $ method -> name , 0 , 2 ) === 'on' ) { $ subscriptions [ ] = $ method -> name ; } } $ this -> __subscriptions = $ subscriptions ; } return $ this -> __subscriptions ; }
Get a list of subscribed events

Event handlers always start with 'on' and need to be public methods

@return array An array of public methods
Get a list of subscribed events