final public static function checkLibrariesRequired()
    {
        $base =  __DIR__."/../../";
        foreach (self::$libs as $lib => $val) {
            if (!is_dir($base.$lib) || !self::checkIsReadable($base.$lib) ||
                !self::checkIsWritable($base.$lib) || self::isDirEmpty($base.$lib)) {
                return (json_encode(array("code" => 500, "results" => "NOK", "libsr" => $lib, "msg" => $val)));
            }
        }

        foreach (self::$php_extensions as $lib => $val) {
            if (!extension_loaded($lib)) {
                return (json_encode(array("code" => 500, "results" => "NOK", "libsr" => $lib, "msg" => $val)));
            }
        }

        return (json_encode(array("code" => 200, "results" => "OK")));
    }
final public static function checkLibrariesRequired()
    {
        $base =  __DIR__."/../../";
        foreach (self::$libs as $lib => $val) {
            if (!is_dir($base.$lib) || !self::checkIsReadable($base.$lib) ||
                !self::checkIsWritable($base.$lib) || self::isDirEmpty($base.$lib)) {
                return (json_encode(array("code" => 500, "results" => "NOK", "libsr" => $lib, "msg" => $val)));
            }
        }

        foreach (self::$php_extensions as $lib => $val) {
            if (!extension_loaded($lib)) {
                return (json_encode(array("code" => 500, "results" => "NOK", "libsr" => $lib, "msg" => $val)));
            }
        }

        return (json_encode(array("code" => 200, "results" => "OK")));
    }
final public static function checkLibrariesRequired ( ) { $ base = __DIR__ . "/../../" ; foreach ( self :: $ libs as $ lib => $ val ) { if ( ! is_dir ( $ base . $ lib ) || ! self :: checkIsReadable ( $ base . $ lib ) || ! self :: checkIsWritable ( $ base . $ lib ) || self :: isDirEmpty ( $ base . $ lib ) ) { return ( json_encode ( array ( "code" => 500 , "results" => "NOK" , "libsr" => $ lib , "msg" => $ val ) ) ) ; } } foreach ( self :: $ php_extensions as $ lib => $ val ) { if ( ! extension_loaded ( $ lib ) ) { return ( json_encode ( array ( "code" => 500 , "results" => "NOK" , "libsr" => $ lib , "msg" => $ val ) ) ) ; } } return ( json_encode ( array ( "code" => 200 , "results" => "OK" ) ) ) ; }
Check if librairies required are installed
@return int Are installed or not
Check if librairies required are installed