public static function get(string $param, string $appname = null)
    {
        if (isset(self::$framework_paths[$param])) {
            if (!is_array(self::$framework_paths[$param]) &&
                strpos(self::$framework_paths[$param], "%app_name%") !== false) {
                if ($appname != null) {
                    return (str_replace(
                        "%app_name%",
                        $appname,
                        self::$framework_paths[$param]
                    ));
                } elseif (isset(self::$framework_paths["app.call"])) {
                    return (str_replace(
                        "%app_name%",
                        self::$framework_paths["app.call"],
                        self::$framework_paths[$param]
                    ));
                } else {
                    throw new Server500(new ArrayObject(array("explain" =>
                        "Undefined [app.call] index", "solution" =>
                        "Please refer to the framework documentation to get the proper path.")));
                }
            } else {
                return (self::$framework_paths[$param]);
            }
        } else {
            throw new Server500(new ArrayObject(array("explain" =>
                "Undefined [$param] path", "solution" =>
                "Please refer to the framework documentation to get the proper path.")));
        }
    }
public static function get(string $param, string $appname = null)
    {
        if (isset(self::$framework_paths[$param])) {
            if (!is_array(self::$framework_paths[$param]) &&
                strpos(self::$framework_paths[$param], "%app_name%") !== false) {
                if ($appname != null) {
                    return (str_replace(
                        "%app_name%",
                        $appname,
                        self::$framework_paths[$param]
                    ));
                } elseif (isset(self::$framework_paths["app.call"])) {
                    return (str_replace(
                        "%app_name%",
                        self::$framework_paths["app.call"],
                        self::$framework_paths[$param]
                    ));
                } else {
                    throw new Server500(new ArrayObject(array("explain" =>
                        "Undefined [app.call] index", "solution" =>
                        "Please refer to the framework documentation to get the proper path.")));
                }
            } else {
                return (self::$framework_paths[$param]);
            }
        } else {
            throw new Server500(new ArrayObject(array("explain" =>
                "Undefined [$param] path", "solution" =>
                "Please refer to the framework documentation to get the proper path.")));
        }
    }
public static function get ( string $ param , string $ appname = null ) { if ( isset ( self :: $ framework_paths [ $ param ] ) ) { if ( ! is_array ( self :: $ framework_paths [ $ param ] ) && strpos ( self :: $ framework_paths [ $ param ] , "%app_name%" ) !== false ) { if ( $ appname != null ) { return ( str_replace ( "%app_name%" , $ appname , self :: $ framework_paths [ $ param ] ) ) ; } elseif ( isset ( self :: $ framework_paths [ "app.call" ] ) ) { return ( str_replace ( "%app_name%" , self :: $ framework_paths [ "app.call" ] , self :: $ framework_paths [ $ param ] ) ) ; } else { throw new Server500 ( new ArrayObject ( array ( "explain" => "Undefined [app.call] index" , "solution" => "Please refer to the framework documentation to get the proper path." ) ) ) ; } } else { return ( self :: $ framework_paths [ $ param ] ) ; } } else { throw new Server500 ( new ArrayObject ( array ( "explain" => "Undefined [$param] path" , "solution" => "Please refer to the framework documentation to get the proper path." ) ) ) ; } }
Get a path value in framework_path
@param string $param Parameter name (index name)
@param string $appname App name (default set to null)
@return mixed The path value
@throws Server500 If parameter name does not exist
Get a path value in framework_path