src/DreamCommerce/ShopAppstoreLib/Handler.php
protected function fire($action, $params)
    {
        if(!isset($this->events[$action])){
            throw new HandlerException('Action handler not exists', HandlerException::ACTION_HANDLER_NOT_EXISTS);
        }

        // prepare params array for handler
        // we provide a client library as a param for further requests
        $callbackParams = $params;
        $callbackParams['client'] = $this->getClient();
        $callbackParams = new \ArrayObject($callbackParams, \ArrayObject::STD_PROP_LIST);

        // fire handlers for every event
        foreach($this->events[$action] as $e){
            $result = call_user_func($e, $callbackParams);
            if(!$result){
                break;
            }
        }

    }
protected function fire($action, $params)
    {
        if(!isset($this->events[$action])){
            throw new HandlerException('Action handler not exists', HandlerException::ACTION_HANDLER_NOT_EXISTS);
        }

        // prepare params array for handler
        // we provide a client library as a param for further requests
        $callbackParams = $params;
        $callbackParams['client'] = $this->getClient();
        $callbackParams = new \ArrayObject($callbackParams, \ArrayObject::STD_PROP_LIST);

        // fire handlers for every event
        foreach($this->events[$action] as $e){
            $result = call_user_func($e, $callbackParams);
            if(!$result){
                break;
            }
        }

    }
protected function fire ( $ action , $ params ) { if ( ! isset ( $ this -> events [ $ action ] ) ) { throw new HandlerException ( 'Action handler not exists' , HandlerException :: ACTION_HANDLER_NOT_EXISTS ) ; } // prepare params array for handler // we provide a client library as a param for further requests $ callbackParams = $ params ; $ callbackParams [ 'client' ] = $ this -> getClient ( ) ; $ callbackParams = new \ ArrayObject ( $ callbackParams , \ ArrayObject :: STD_PROP_LIST ) ; // fire handlers for every event foreach ( $ this -> events [ $ action ] as $ e ) { $ result = call_user_func ( $ e , $ callbackParams ) ; if ( ! $ result ) { break ; } } }
fires handlers for a specific action
@param $action
@param $params
@throws HandlerException
fires handlers for a specific action