src/Slashworks/AppBundle/Command/ApiCommand.php
private function _makeCall($oRemoteApp)
        {

            // get class
            $this->getContainer()->get('API');
            // do call
            Api::$_container = $this->getContainer();
            $aReturn = Api::call('getData', array(
                array(
                    'log'    => $oRemoteApp->getIncludelog(),
                    'format' => 'json'
                )
            ), $oRemoteApp->getFullApiUrl(), $oRemoteApp->getPublicKey(), $oRemoteApp);

            // build json response
            $sStatuscode = $aReturn['statuscode'];
            $aReturn     = json_decode($aReturn['result'], true);
            if (!isset($aReturn['status'])) {
                $aReturn['status'] = true;
            }
            $aReturn['statuscode'] = $sStatuscode;

            if($sStatuscode != 200) {
                $this->getContainer()->get('logger')->error("ERROR in ".__FILE__." on line ".__LINE__." - ".json_encode($aReturn), array("Method"    => __METHOD__,
                                                                     "RemoteApp" => $oRemoteApp->getName(),
                                                                     "RemoteURL" => $oRemoteApp->getFullApiUrl()
                ));
            }

            return $aReturn;
        }
private function _makeCall($oRemoteApp)
        {

            // get class
            $this->getContainer()->get('API');
            // do call
            Api::$_container = $this->getContainer();
            $aReturn = Api::call('getData', array(
                array(
                    'log'    => $oRemoteApp->getIncludelog(),
                    'format' => 'json'
                )
            ), $oRemoteApp->getFullApiUrl(), $oRemoteApp->getPublicKey(), $oRemoteApp);

            // build json response
            $sStatuscode = $aReturn['statuscode'];
            $aReturn     = json_decode($aReturn['result'], true);
            if (!isset($aReturn['status'])) {
                $aReturn['status'] = true;
            }
            $aReturn['statuscode'] = $sStatuscode;

            if($sStatuscode != 200) {
                $this->getContainer()->get('logger')->error("ERROR in ".__FILE__." on line ".__LINE__." - ".json_encode($aReturn), array("Method"    => __METHOD__,
                                                                     "RemoteApp" => $oRemoteApp->getName(),
                                                                     "RemoteURL" => $oRemoteApp->getFullApiUrl()
                ));
            }

            return $aReturn;
        }
private function _makeCall ( $ oRemoteApp ) { // get class $ this -> getContainer ( ) -> get ( 'API' ) ; // do call Api :: $ _container = $ this -> getContainer ( ) ; $ aReturn = Api :: call ( 'getData' , array ( array ( 'log' => $ oRemoteApp -> getIncludelog ( ) , 'format' => 'json' ) ) , $ oRemoteApp -> getFullApiUrl ( ) , $ oRemoteApp -> getPublicKey ( ) , $ oRemoteApp ) ; // build json response $ sStatuscode = $ aReturn [ 'statuscode' ] ; $ aReturn = json_decode ( $ aReturn [ 'result' ] , true ) ; if ( ! isset ( $ aReturn [ 'status' ] ) ) { $ aReturn [ 'status' ] = true ; } $ aReturn [ 'statuscode' ] = $ sStatuscode ; if ( $ sStatuscode != 200 ) { $ this -> getContainer ( ) -> get ( 'logger' ) -> error ( "ERROR in " . __FILE__ . " on line " . __LINE__ . " - " . json_encode ( $ aReturn ) , array ( "Method" => __METHOD__ , "RemoteApp" => $ oRemoteApp -> getName ( ) , "RemoteURL" => $ oRemoteApp -> getFullApiUrl ( ) ) ) ; } return $ aReturn ; }
perform api call

@param RemoteApp $oRemoteApp

@return mixed
perform api call