protected function getServicesFromEvent($serviceEvent)
    {
        if (false === isset($this->servicesEvents[$serviceEvent])) {
            $servicesInstances = [];
            foreach ($this->serviceInstances as $serviceInstance) {
                if ($serviceInstance instanceof $serviceEvent) {
                    $servicesInstances[] = $serviceInstance;
                }
            }

            $this->servicesEvents[$serviceEvent] = $servicesInstances;
        }

        return $this->servicesEvents[$serviceEvent];
    }
protected function getServicesFromEvent($serviceEvent)
    {
        if (false === isset($this->servicesEvents[$serviceEvent])) {
            $servicesInstances = [];
            foreach ($this->serviceInstances as $serviceInstance) {
                if ($serviceInstance instanceof $serviceEvent) {
                    $servicesInstances[] = $serviceInstance;
                }
            }

            $this->servicesEvents[$serviceEvent] = $servicesInstances;
        }

        return $this->servicesEvents[$serviceEvent];
    }
protected function getServicesFromEvent ( $ serviceEvent ) { if ( false === isset ( $ this -> servicesEvents [ $ serviceEvent ] ) ) { $ servicesInstances = [ ] ; foreach ( $ this -> serviceInstances as $ serviceInstance ) { if ( $ serviceInstance instanceof $ serviceEvent ) { $ servicesInstances [ ] = $ serviceInstance ; } } $ this -> servicesEvents [ $ serviceEvent ] = $ servicesInstances ; } return $ this -> servicesEvents [ $ serviceEvent ] ; }
Will loop trough all the services instance and get the ones which use the
given event.

@param string $serviceEvent The class name of the service event.
@return AbstractService[]
Will loop trough all the services instance and get the ones which use the given event .