src/package/Support/jasonlewis/resource-watcher/src/JasonLewis/ResourceWatcher/Tracker.php
protected function callListenerBindings(Listener $listener, Event $event)
    {
        $binding = $listener->determineEventBinding($event);

        if ($listener->hasBinding($binding)) {
            foreach ($listener->getBindings($binding) as $callback) {
                $resource = $event->getResource();

                call_user_func($callback, $resource, $resource->getPath());
            }
        }

        // If a listener has a binding for anything we'll also spin through
        // them and call each of them.
        if ($listener->hasBinding('*')) {
            foreach ($listener->getBindings('*') as $callback) {
                $resource = $event->getResource();

                call_user_func($callback, $event, $resource, $resource->getPath());
            }
        }
    }
protected function callListenerBindings(Listener $listener, Event $event)
    {
        $binding = $listener->determineEventBinding($event);

        if ($listener->hasBinding($binding)) {
            foreach ($listener->getBindings($binding) as $callback) {
                $resource = $event->getResource();

                call_user_func($callback, $resource, $resource->getPath());
            }
        }

        // If a listener has a binding for anything we'll also spin through
        // them and call each of them.
        if ($listener->hasBinding('*')) {
            foreach ($listener->getBindings('*') as $callback) {
                $resource = $event->getResource();

                call_user_func($callback, $event, $resource, $resource->getPath());
            }
        }
    }
protected function callListenerBindings ( Listener $ listener , Event $ event ) { $ binding = $ listener -> determineEventBinding ( $ event ) ; if ( $ listener -> hasBinding ( $ binding ) ) { foreach ( $ listener -> getBindings ( $ binding ) as $ callback ) { $ resource = $ event -> getResource ( ) ; call_user_func ( $ callback , $ resource , $ resource -> getPath ( ) ) ; } } // If a listener has a binding for anything we'll also spin through // them and call each of them. if ( $ listener -> hasBinding ( '*' ) ) { foreach ( $ listener -> getBindings ( '*' ) as $ callback ) { $ resource = $ event -> getResource ( ) ; call_user_func ( $ callback , $ event , $ resource , $ resource -> getPath ( ) ) ; } } }
Call the bindings on the listener for a given event.

@param \JasonLewis\ResourceWatcher\Listener $listener
@param \JasonLewis\ResourceWatcher\Event    $event

@return void
Call the bindings on the listener for a given event .