public function httpAction()
	{
	    $status		= self::STATUS_SUCCESS;
	    $responses	= array();
	    $exception	= null;
	    $data       = null;
        $debug      = $this->getRouteParam('debug', false); 
        
        try {
            $service	= $this->fetchService();
            $operation	= $service ? $this->fetchOperation() : false;
            
            if(!$service){
                throw new ServiceNotFoundException("Route doesn't contain service information");
            } elseif (!$operation) {
                throw new OperationNotFoundException("Route doesn't contain operation information");
            }
            
            try {
                $params = $this->fetchParams();
            } catch(\Exception $e) {
                $status = self::STATUS_MALFORMED_REQUEST;
                $exception = $e;
            }
            
            if ($status === self::STATUS_SUCCESS) {
                if (isset($params[self::HEADER_FORCE_CONTENT_HTML])) {
                    
                    if ($params[self::HEADER_FORCE_CONTENT_HTML]) {
                        $this->getRequest()->getHeaders()->addHeaders([
                                self::HEADER_FORCE_CONTENT_HTML => true
                                ]);
                    }
                    unset($params[self::HEADER_FORCE_CONTENT_HTML]);
                }
                
                $data = $this->exec(
                        $service,
                        $operation,
                        $params,
                        Command::CONTEXT_HTTP);
            }
            
        } catch (PermissionDeniedException $exception) {
            $status = self::STATUS_PERMISSION_DENIED;
        } catch (NotFoundException $exception) {
            $status = self::STATUS_NOT_FOUND;
        } catch (ServiceException $exception) {
            $status = self::STATUS_UNKNOWN_EXCEPTION;
        } catch (\Exception $exception) {
            $status = self::STATUS_UNKNOWN_EXCEPTION;
        }
	    
        // Log error
	    if ($exception) {
	        error_log($exception->getMessage() . ' (' . $exception->getFile().':'.$exception->getLine().')');
	        
	        if ($debug) {
	            throw $exception;
	        }
	    }
    
		return $this->prepareHttpResponse(
			$data, 
	        $status,
			$exception);
	}
public function httpAction()
	{
	    $status		= self::STATUS_SUCCESS;
	    $responses	= array();
	    $exception	= null;
	    $data       = null;
        $debug      = $this->getRouteParam('debug', false); 
        
        try {
            $service	= $this->fetchService();
            $operation	= $service ? $this->fetchOperation() : false;
            
            if(!$service){
                throw new ServiceNotFoundException("Route doesn't contain service information");
            } elseif (!$operation) {
                throw new OperationNotFoundException("Route doesn't contain operation information");
            }
            
            try {
                $params = $this->fetchParams();
            } catch(\Exception $e) {
                $status = self::STATUS_MALFORMED_REQUEST;
                $exception = $e;
            }
            
            if ($status === self::STATUS_SUCCESS) {
                if (isset($params[self::HEADER_FORCE_CONTENT_HTML])) {
                    
                    if ($params[self::HEADER_FORCE_CONTENT_HTML]) {
                        $this->getRequest()->getHeaders()->addHeaders([
                                self::HEADER_FORCE_CONTENT_HTML => true
                                ]);
                    }
                    unset($params[self::HEADER_FORCE_CONTENT_HTML]);
                }
                
                $data = $this->exec(
                        $service,
                        $operation,
                        $params,
                        Command::CONTEXT_HTTP);
            }
            
        } catch (PermissionDeniedException $exception) {
            $status = self::STATUS_PERMISSION_DENIED;
        } catch (NotFoundException $exception) {
            $status = self::STATUS_NOT_FOUND;
        } catch (ServiceException $exception) {
            $status = self::STATUS_UNKNOWN_EXCEPTION;
        } catch (\Exception $exception) {
            $status = self::STATUS_UNKNOWN_EXCEPTION;
        }
	    
        // Log error
	    if ($exception) {
	        error_log($exception->getMessage() . ' (' . $exception->getFile().':'.$exception->getLine().')');
	        
	        if ($debug) {
	            throw $exception;
	        }
	    }
    
		return $this->prepareHttpResponse(
			$data, 
	        $status,
			$exception);
	}
public function httpAction ( ) { $ status = self :: STATUS_SUCCESS ; $ responses = array ( ) ; $ exception = null ; $ data = null ; $ debug = $ this -> getRouteParam ( 'debug' , false ) ; try { $ service = $ this -> fetchService ( ) ; $ operation = $ service ? $ this -> fetchOperation ( ) : false ; if ( ! $ service ) { throw new ServiceNotFoundException ( "Route doesn't contain service information" ) ; } elseif ( ! $ operation ) { throw new OperationNotFoundException ( "Route doesn't contain operation information" ) ; } try { $ params = $ this -> fetchParams ( ) ; } catch ( \ Exception $ e ) { $ status = self :: STATUS_MALFORMED_REQUEST ; $ exception = $ e ; } if ( $ status === self :: STATUS_SUCCESS ) { if ( isset ( $ params [ self :: HEADER_FORCE_CONTENT_HTML ] ) ) { if ( $ params [ self :: HEADER_FORCE_CONTENT_HTML ] ) { $ this -> getRequest ( ) -> getHeaders ( ) -> addHeaders ( [ self :: HEADER_FORCE_CONTENT_HTML => true ] ) ; } unset ( $ params [ self :: HEADER_FORCE_CONTENT_HTML ] ) ; } $ data = $ this -> exec ( $ service , $ operation , $ params , Command :: CONTEXT_HTTP ) ; } } catch ( PermissionDeniedException $ exception ) { $ status = self :: STATUS_PERMISSION_DENIED ; } catch ( NotFoundException $ exception ) { $ status = self :: STATUS_NOT_FOUND ; } catch ( ServiceException $ exception ) { $ status = self :: STATUS_UNKNOWN_EXCEPTION ; } catch ( \ Exception $ exception ) { $ status = self :: STATUS_UNKNOWN_EXCEPTION ; } // Log error if ( $ exception ) { error_log ( $ exception -> getMessage ( ) . ' (' . $ exception -> getFile ( ) . ':' . $ exception -> getLine ( ) . ')' ) ; if ( $ debug ) { throw $ exception ; } } return $ this -> prepareHttpResponse ( $ data , $ status , $ exception ) ; }
Performs service operation matched by HTTP router

@throws \Exception
@return Response
Performs service operation matched by HTTP router