src/Controller/MelisCoreMicroServiceController.php
public function microServicesListAction()
    {

        $view         = new ViewModel();
        $translator   = $this->getServiceLocator()->get('translator');
        $apiKey       = trim($this->params()->fromRoute('api_key', ''));
        $userExists   = false;
        $microservice = array();
        $userApiData  = $this->getMicroServiceAuthTable()->getUserByApiKey($apiKey)->current(); 
        $apiStatus    = '';
        $toolTranslator = $this->getServiceLocator()->get('MelisCoreTranslation');
        

        

        if($userApiData) {
            
            $apiStatus = $userApiData->msoa_status;
            // to validate the API key if it's Active or Inactvie
            if($apiStatus){
                $config       = $this->getServiceLocator()->get('MelisCoreConfig');
                $microservice = $config->getItem('microservice');
             
                // set the langauge 
                $melisLangTable = $this->serviceLocator->get('MelisCore\Model\Tables\MelisLangTable');
                $langData = $melisLangTable->getEntryById($userApiData->usr_lang_id)->current();
                if($langData) {
                    $container = new Container('meliscore');
                    $container['melis-lang-locale'] = $langData->lang_locale;
                }

                //Exclude array 'conf' key
                if(array_key_exists('conf',$microservice)){
                    unset($microservice['conf']);
                }
                $userExists   = true;

            }else{
                $message = 'tr_meliscore_microservice_api_key_inactive';

                echo "&nbsp;&nbsp;" .$translator->translate($message);
            }
         
        }
        else{

        }
     
        $view->userExists   = $userExists;
        $view->microservice = $microservice;
        $view->apiKey       = $apiKey;
        $view->title       = 'tr_meliscore_microservice_title';
        return $view;
    }
public function microServicesListAction()
    {

        $view         = new ViewModel();
        $translator   = $this->getServiceLocator()->get('translator');
        $apiKey       = trim($this->params()->fromRoute('api_key', ''));
        $userExists   = false;
        $microservice = array();
        $userApiData  = $this->getMicroServiceAuthTable()->getUserByApiKey($apiKey)->current(); 
        $apiStatus    = '';
        $toolTranslator = $this->getServiceLocator()->get('MelisCoreTranslation');
        

        

        if($userApiData) {
            
            $apiStatus = $userApiData->msoa_status;
            // to validate the API key if it's Active or Inactvie
            if($apiStatus){
                $config       = $this->getServiceLocator()->get('MelisCoreConfig');
                $microservice = $config->getItem('microservice');
             
                // set the langauge 
                $melisLangTable = $this->serviceLocator->get('MelisCore\Model\Tables\MelisLangTable');
                $langData = $melisLangTable->getEntryById($userApiData->usr_lang_id)->current();
                if($langData) {
                    $container = new Container('meliscore');
                    $container['melis-lang-locale'] = $langData->lang_locale;
                }

                //Exclude array 'conf' key
                if(array_key_exists('conf',$microservice)){
                    unset($microservice['conf']);
                }
                $userExists   = true;

            }else{
                $message = 'tr_meliscore_microservice_api_key_inactive';

                echo "&nbsp;&nbsp;" .$translator->translate($message);
            }
         
        }
        else{

        }
     
        $view->userExists   = $userExists;
        $view->microservice = $microservice;
        $view->apiKey       = $apiKey;
        $view->title       = 'tr_meliscore_microservice_title';
        return $view;
    }
public function microServicesListAction ( ) { $ view = new ViewModel ( ) ; $ translator = $ this -> getServiceLocator ( ) -> get ( 'translator' ) ; $ apiKey = trim ( $ this -> params ( ) -> fromRoute ( 'api_key' , '' ) ) ; $ userExists = false ; $ microservice = array ( ) ; $ userApiData = $ this -> getMicroServiceAuthTable ( ) -> getUserByApiKey ( $ apiKey ) -> current ( ) ; $ apiStatus = '' ; $ toolTranslator = $ this -> getServiceLocator ( ) -> get ( 'MelisCoreTranslation' ) ; if ( $ userApiData ) { $ apiStatus = $ userApiData -> msoa_status ; // to validate the API key if it's Active or Inactvie if ( $ apiStatus ) { $ config = $ this -> getServiceLocator ( ) -> get ( 'MelisCoreConfig' ) ; $ microservice = $ config -> getItem ( 'microservice' ) ; // set the langauge  $ melisLangTable = $ this -> serviceLocator -> get ( 'MelisCore\Model\Tables\MelisLangTable' ) ; $ langData = $ melisLangTable -> getEntryById ( $ userApiData -> usr_lang_id ) -> current ( ) ; if ( $ langData ) { $ container = new Container ( 'meliscore' ) ; $ container [ 'melis-lang-locale' ] = $ langData -> lang_locale ; } //Exclude array 'conf' key if ( array_key_exists ( 'conf' , $ microservice ) ) { unset ( $ microservice [ 'conf' ] ) ; } $ userExists = true ; } else { $ message = 'tr_meliscore_microservice_api_key_inactive' ; echo "&nbsp;&nbsp;" . $ translator -> translate ( $ message ) ; } } else { } $ view -> userExists = $ userExists ; $ view -> microservice = $ microservice ; $ view -> apiKey = $ apiKey ; $ view -> title = 'tr_meliscore_microservice_title' ; return $ view ; }
generate all available list of Microservices
generate all available list of Microservices