Jarves\JarvesEventDispatcher::call PHP Method

call() public method

public call ( Event $eventConfig, Symfony\Component\EventDispatcher\GenericEvent $event )
$eventConfig Jarves\Configuration\Event
$event Symfony\Component\EventDispatcher\GenericEvent
    public function call(Event $eventConfig, $event)
    {
        if ($eventConfig->getCalls()) {
            foreach ($eventConfig->getCalls() as $call) {
                call_user_func_array($call, [$event]);
            }
        }
        if ($eventConfig->getClearCaches()) {
            foreach ($eventConfig->getClearCaches() as $cacheKey) {
                $this->cacher->invalidateCache($cacheKey);
            }
        }
        if ($eventConfig->getServiceCalls()) {
            foreach ($eventConfig->getServiceCalls() as $serviceCall) {
                list($service, $method) = explode('::', $serviceCall);
                if ($this->container->has($service)) {
                    $service = $this->container->get($service);
                    $service->{$method}($event);
                }
            }
        }
    }