public function consoleAction()
	{
	    $request   = $this->getRequest();
	    $service   = $this->fetchService();
	    $operation = $this->fetchOperation();
	    $query     = $this->fetchConsoleQuery();
	    
	    if (!$request instanceof ConsoleRequest) {
	        throw new \RuntimeException('You can only use this action from a console!');
	    }
	    
	    // Check flags
	    $verbose = $request->getParam('verbose') || $request->getParam('v');
	    $silent = $request->getParam('silent') || $request->getParam('s');
	    
	    $params = Json::decode(
            $query,
            Json::TYPE_ARRAY
        );
	    
	    try {
	        $data = $this->exec($service, $operation, $params, Command::CONTEXT_CLI);
	        return $this->prepareConsoleResponse($data, null, $verbose, $silent);
	    } catch (\Exception $exception) {
	        error_log($exception->getMessage() . ' (' . $exception->getFile().':'.$exception->getLine().')');
	        
	        return $this->prepareConsoleResponse(null, $exception, $verbose, $silent);
	    }
	}
public function consoleAction()
	{
	    $request   = $this->getRequest();
	    $service   = $this->fetchService();
	    $operation = $this->fetchOperation();
	    $query     = $this->fetchConsoleQuery();
	    
	    if (!$request instanceof ConsoleRequest) {
	        throw new \RuntimeException('You can only use this action from a console!');
	    }
	    
	    // Check flags
	    $verbose = $request->getParam('verbose') || $request->getParam('v');
	    $silent = $request->getParam('silent') || $request->getParam('s');
	    
	    $params = Json::decode(
            $query,
            Json::TYPE_ARRAY
        );
	    
	    try {
	        $data = $this->exec($service, $operation, $params, Command::CONTEXT_CLI);
	        return $this->prepareConsoleResponse($data, null, $verbose, $silent);
	    } catch (\Exception $exception) {
	        error_log($exception->getMessage() . ' (' . $exception->getFile().':'.$exception->getLine().')');
	        
	        return $this->prepareConsoleResponse(null, $exception, $verbose, $silent);
	    }
	}
public function consoleAction ( ) { $ request = $ this -> getRequest ( ) ; $ service = $ this -> fetchService ( ) ; $ operation = $ this -> fetchOperation ( ) ; $ query = $ this -> fetchConsoleQuery ( ) ; if ( ! $ request instanceof ConsoleRequest ) { throw new \ RuntimeException ( 'You can only use this action from a console!' ) ; } // Check flags $ verbose = $ request -> getParam ( 'verbose' ) || $ request -> getParam ( 'v' ) ; $ silent = $ request -> getParam ( 'silent' ) || $ request -> getParam ( 's' ) ; $ params = Json :: decode ( $ query , Json :: TYPE_ARRAY ) ; try { $ data = $ this -> exec ( $ service , $ operation , $ params , Command :: CONTEXT_CLI ) ; return $ this -> prepareConsoleResponse ( $ data , null , $ verbose , $ silent ) ; } catch ( \ Exception $ exception ) { error_log ( $ exception -> getMessage ( ) . ' (' . $ exception -> getFile ( ) . ':' . $ exception -> getLine ( ) . ')' ) ; return $ this -> prepareConsoleResponse ( null , $ exception , $ verbose , $ silent ) ; } }
Performs service operation routed by console router
Performs service operation routed by console router