public function getoneConfigActivity(string $env):Renderer
    {
        if (!in_array($env, array("dev", "prod"))) {
            throw new Server500(new \ArrayObject(array("explain" => "Undefined environment $env", "solution" =>
            "Environment must be [dev or prod]")));
        }

        $file = (array) JL::open(FEnv::get("framework.config").'hosts/hosts.'.$env.'.json');
        if (!(isset($file['allowed'])) || !(isset($file['denied']))) {
            throw new Server500(new \ArrayObject(array("explain" => "Undefined key allowed or denied in host.dev.json",
                "solution" => "Add the correct tags [allowed, denied]")));
        }

        $allowed = ((array)$file['allowed']);
        $denied = ((array)$file['denied']);


        return ((new Renderer())->jsonRenderer(array("code" => 200,
            "results" => array("allowed" => implode(";", $allowed), "denied" => implode(";", $denied)))));
    }
public function getoneConfigActivity(string $env):Renderer
    {
        if (!in_array($env, array("dev", "prod"))) {
            throw new Server500(new \ArrayObject(array("explain" => "Undefined environment $env", "solution" =>
            "Environment must be [dev or prod]")));
        }

        $file = (array) JL::open(FEnv::get("framework.config").'hosts/hosts.'.$env.'.json');
        if (!(isset($file['allowed'])) || !(isset($file['denied']))) {
            throw new Server500(new \ArrayObject(array("explain" => "Undefined key allowed or denied in host.dev.json",
                "solution" => "Add the correct tags [allowed, denied]")));
        }

        $allowed = ((array)$file['allowed']);
        $denied = ((array)$file['denied']);


        return ((new Renderer())->jsonRenderer(array("code" => 200,
            "results" => array("allowed" => implode(";", $allowed), "denied" => implode(";", $denied)))));
    }
public function getoneConfigActivity ( string $ env ) : Renderer { if ( ! in_array ( $ env , array ( "dev" , "prod" ) ) ) { throw new Server500 ( new \ ArrayObject ( array ( "explain" => "Undefined environment $env" , "solution" => "Environment must be [dev or prod]" ) ) ) ; } $ file = ( array ) JL :: open ( FEnv :: get ( "framework.config" ) . 'hosts/hosts.' . $ env . '.json' ) ; if ( ! ( isset ( $ file [ 'allowed' ] ) ) || ! ( isset ( $ file [ 'denied' ] ) ) ) { throw new Server500 ( new \ ArrayObject ( array ( "explain" => "Undefined key allowed or denied in host.dev.json" , "solution" => "Add the correct tags [allowed, denied]" ) ) ) ; } $ allowed = ( ( array ) $ file [ 'allowed' ] ) ; $ denied = ( ( array ) $ file [ 'denied' ] ) ; return ( ( new Renderer ( ) ) -> jsonRenderer ( array ( "code" => 200 , "results" => array ( "allowed" => implode ( ";" , $ allowed ) , "denied" => implode ( ";" , $ denied ) ) ) ) ) ; }
Get one hosts config
@param string $env Database environment name
@return Renderer
@throws
Get one hosts config