protected function _attachSubscriber(EventListenerInterface $subscriber)
    {
        foreach ((array)$subscriber->implementedEvents() as $eventKey => $function) {
            $options = [];
            $method = $function;
            if (is_array($function) && isset($function['callable'])) {
                list($method, $options) = $this->_extractCallable($function, $subscriber);
            } elseif (is_array($function) && is_numeric(key($function))) {
                foreach ($function as $f) {
                    list($method, $options) = $this->_extractCallable($f, $subscriber);
                    $this->on($eventKey, $options, $method);
                }
                continue;
            }
            if (is_string($method)) {
                $method = [$subscriber, $function];
            }
            $this->on($eventKey, $options, $method);
        }
    }
protected function _attachSubscriber(EventListenerInterface $subscriber)
    {
        foreach ((array)$subscriber->implementedEvents() as $eventKey => $function) {
            $options = [];
            $method = $function;
            if (is_array($function) && isset($function['callable'])) {
                list($method, $options) = $this->_extractCallable($function, $subscriber);
            } elseif (is_array($function) && is_numeric(key($function))) {
                foreach ($function as $f) {
                    list($method, $options) = $this->_extractCallable($f, $subscriber);
                    $this->on($eventKey, $options, $method);
                }
                continue;
            }
            if (is_string($method)) {
                $method = [$subscriber, $function];
            }
            $this->on($eventKey, $options, $method);
        }
    }
protected function _attachSubscriber ( EventListenerInterface $ subscriber ) { foreach ( ( array ) $ subscriber -> implementedEvents ( ) as $ eventKey => $ function ) { $ options = [ ] ; $ method = $ function ; if ( is_array ( $ function ) && isset ( $ function [ 'callable' ] ) ) { list ( $ method , $ options ) = $ this -> _extractCallable ( $ function , $ subscriber ) ; } elseif ( is_array ( $ function ) && is_numeric ( key ( $ function ) ) ) { foreach ( $ function as $ f ) { list ( $ method , $ options ) = $ this -> _extractCallable ( $ f , $ subscriber ) ; $ this -> on ( $ eventKey , $ options , $ method ) ; } continue ; } if ( is_string ( $ method ) ) { $ method = [ $ subscriber , $ function ] ; } $ this -> on ( $ eventKey , $ options , $ method ) ; } }
Auxiliary function to attach all implemented callbacks of a Cake\Event\EventListenerInterface class instance
as individual methods on this manager

@param \Cake\Event\EventListenerInterface $subscriber Event listener.
@return void
Auxiliary function to attach all implemented callbacks of a Cake \ Event \ EventListenerInterface class instance as individual methods on this manager