public function getAllHostsPerConfigActivity():Renderer
    {
        $file = (array) JL::open(FEnv::get("framework.config.hosts.dev.file"));
        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]")));
        }
        $alloweddev = count((array)$file['allowed']);
        if (in_array("*", (array)$file['allowed'])) {
            $alloweddev = "ALL";
        }
        $denieddev = count((array)$file['denied']);
        if (in_array("*", (array)$file['denied'])) {
            $denieddev = "ALL";
        }
        $editdev = $this->generateRoute(
            "iumio_manager_hosts_manager_edit",
            array("env" => "dev"),
            null,
            true
        );
        $editsavedev = $this->generateRoute(
            "iumio_manager_hosts_manager_edit_save",
            array("env" => "dev"),
            null,
            true
        );

        $file2 = (array) JL::open(FEnv::get("framework.config.hosts.prod.file"));
        if (!(isset($file['allowed'])) || !(isset($file['denied']))) {
            throw new Server500(new \ArrayObject(array("explain" => "Undefined key allowed or denied in host.prod.json",
                "solution" => "Add the correct tags [allowed, denied]")));
        }
        $allowedprod= count((array)$file2['allowed']);
        if (in_array("*", (array)$file2['allowed'])) {
            $allowedprod = "ALL";
        }
        $deniedprod = count((array)$file2['denied']);
        if (in_array("*", (array)$file2['denied'])) {
            $deniedprod = "ALL";
        }
        if (in_array("", (array)$file2['denied'])) {
            $deniedprod = "None";
        }
        $editprod = $this->generateRoute(
            "iumio_manager_hosts_manager_edit",
            array("env" => "prod"),
            null,
            true
        );
        $editsaveprod = $this->generateRoute(
            "iumio_manager_hosts_manager_edit_save",
            array("env" => "prod"),
            null,
            true
        );
        
        $rs = array(
            "dev" => array(
                "allowed" => $alloweddev, "denied" => $denieddev, "edit" => $editdev, "save" => $editsavedev
            ),
            "prod" => array(
                "allowed" => $allowedprod, "denied" => $deniedprod, "edit" => $editprod, "save" => $editsaveprod
            ),
        );
        
        return ((new Renderer())->jsonRenderer(array("code" => 200,
            "results" => $rs)));
    }
public function getAllHostsPerConfigActivity():Renderer
    {
        $file = (array) JL::open(FEnv::get("framework.config.hosts.dev.file"));
        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]")));
        }
        $alloweddev = count((array)$file['allowed']);
        if (in_array("*", (array)$file['allowed'])) {
            $alloweddev = "ALL";
        }
        $denieddev = count((array)$file['denied']);
        if (in_array("*", (array)$file['denied'])) {
            $denieddev = "ALL";
        }
        $editdev = $this->generateRoute(
            "iumio_manager_hosts_manager_edit",
            array("env" => "dev"),
            null,
            true
        );
        $editsavedev = $this->generateRoute(
            "iumio_manager_hosts_manager_edit_save",
            array("env" => "dev"),
            null,
            true
        );

        $file2 = (array) JL::open(FEnv::get("framework.config.hosts.prod.file"));
        if (!(isset($file['allowed'])) || !(isset($file['denied']))) {
            throw new Server500(new \ArrayObject(array("explain" => "Undefined key allowed or denied in host.prod.json",
                "solution" => "Add the correct tags [allowed, denied]")));
        }
        $allowedprod= count((array)$file2['allowed']);
        if (in_array("*", (array)$file2['allowed'])) {
            $allowedprod = "ALL";
        }
        $deniedprod = count((array)$file2['denied']);
        if (in_array("*", (array)$file2['denied'])) {
            $deniedprod = "ALL";
        }
        if (in_array("", (array)$file2['denied'])) {
            $deniedprod = "None";
        }
        $editprod = $this->generateRoute(
            "iumio_manager_hosts_manager_edit",
            array("env" => "prod"),
            null,
            true
        );
        $editsaveprod = $this->generateRoute(
            "iumio_manager_hosts_manager_edit_save",
            array("env" => "prod"),
            null,
            true
        );
        
        $rs = array(
            "dev" => array(
                "allowed" => $alloweddev, "denied" => $denieddev, "edit" => $editdev, "save" => $editsavedev
            ),
            "prod" => array(
                "allowed" => $allowedprod, "denied" => $deniedprod, "edit" => $editprod, "save" => $editsaveprod
            ),
        );
        
        return ((new Renderer())->jsonRenderer(array("code" => 200,
            "results" => $rs)));
    }
public function getAllHostsPerConfigActivity ( ) : Renderer { $ file = ( array ) JL :: open ( FEnv :: get ( "framework.config.hosts.dev.file" ) ) ; 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]" ) ) ) ; } $ alloweddev = count ( ( array ) $ file [ 'allowed' ] ) ; if ( in_array ( "*" , ( array ) $ file [ 'allowed' ] ) ) { $ alloweddev = "ALL" ; } $ denieddev = count ( ( array ) $ file [ 'denied' ] ) ; if ( in_array ( "*" , ( array ) $ file [ 'denied' ] ) ) { $ denieddev = "ALL" ; } $ editdev = $ this -> generateRoute ( "iumio_manager_hosts_manager_edit" , array ( "env" => "dev" ) , null , true ) ; $ editsavedev = $ this -> generateRoute ( "iumio_manager_hosts_manager_edit_save" , array ( "env" => "dev" ) , null , true ) ; $ file2 = ( array ) JL :: open ( FEnv :: get ( "framework.config.hosts.prod.file" ) ) ; if ( ! ( isset ( $ file [ 'allowed' ] ) ) || ! ( isset ( $ file [ 'denied' ] ) ) ) { throw new Server500 ( new \ ArrayObject ( array ( "explain" => "Undefined key allowed or denied in host.prod.json" , "solution" => "Add the correct tags [allowed, denied]" ) ) ) ; } $ allowedprod = count ( ( array ) $ file2 [ 'allowed' ] ) ; if ( in_array ( "*" , ( array ) $ file2 [ 'allowed' ] ) ) { $ allowedprod = "ALL" ; } $ deniedprod = count ( ( array ) $ file2 [ 'denied' ] ) ; if ( in_array ( "*" , ( array ) $ file2 [ 'denied' ] ) ) { $ deniedprod = "ALL" ; } if ( in_array ( "" , ( array ) $ file2 [ 'denied' ] ) ) { $ deniedprod = "None" ; } $ editprod = $ this -> generateRoute ( "iumio_manager_hosts_manager_edit" , array ( "env" => "prod" ) , null , true ) ; $ editsaveprod = $ this -> generateRoute ( "iumio_manager_hosts_manager_edit_save" , array ( "env" => "prod" ) , null , true ) ; $ rs = array ( "dev" => array ( "allowed" => $ alloweddev , "denied" => $ denieddev , "edit" => $ editdev , "save" => $ editsavedev ) , "prod" => array ( "allowed" => $ allowedprod , "denied" => $ deniedprod , "edit" => $ editprod , "save" => $ editsaveprod ) , ) ; return ( ( new Renderer ( ) ) -> jsonRenderer ( array ( "code" => 200 , "results" => $ rs ) ) ) ; }
Get Hosts list
@throws
Get Hosts list