public function signal($listener, array $params = [])
    {
        $result = null;

        if (array_key_exists($listener, $this->listeners) && 0 !== count($this->listeners[$listener])) {
            /** @noinspection ForeachSourceInspection */
            foreach ($this->listeners[$listener] as $listen) {
                $result = call_user_func($listen, $params);

                if ($result instanceof ResponseInterface) {
                    return $result;
                }
            }
        }

        return $result;
    }
public function signal($listener, array $params = [])
    {
        $result = null;

        if (array_key_exists($listener, $this->listeners) && 0 !== count($this->listeners[$listener])) {
            /** @noinspection ForeachSourceInspection */
            foreach ($this->listeners[$listener] as $listen) {
                $result = call_user_func($listen, $params);

                if ($result instanceof ResponseInterface) {
                    return $result;
                }
            }
        }

        return $result;
    }
public function signal ( $ listener , array $ params = [ ] ) { $ result = null ; if ( array_key_exists ( $ listener , $ this -> listeners ) && 0 !== count ( $ this -> listeners [ $ listener ] ) ) { /** @noinspection ForeachSourceInspection */ foreach ( $ this -> listeners [ $ listener ] as $ listen ) { $ result = call_user_func ( $ listen , $ params ) ; if ( $ result instanceof ResponseInterface ) { return $ result ; } } } return $ result ; }
Send signal to run event

@access public

@param string $listener listener name
@param array $params Signal parameters

@return mixed
Send signal to run event