Class rex_path

Utility class to generate absolute paths.

Package: redaxo\core
Author: gharlan
Located at redaxo/src/core/lib/util/path.php

Methods summary

public static
# init( mixed $pathprovider )

Initializes the class.

public static string
# base( string $file = '' )

Returns the base/root path.

public static string
# frontend( string $file = '' )

Returns the path to the frontend (the document root).

public static string
# frontendController( )

Returns the path to the frontend-controller (index.php from frontend).

public static string
# backend( string $file = '' )

Returns the path to the backend (folder where the backend controller is placed).

public static string
# backendController( )

Returns the path to the backend-controller (index.php from backend).

public static string
# media( string $file = '' )

Returns the path to the media-folder.

public static string
# assets( string $file = '' )

Returns the path to the assets folder.

public static string
# coreAssets( string $file = '' )

Returns the path to the assets folder of the core, which contains all assets required by the core to work properly.

public static string
# addonAssets( string $addon, string $file = '' )

Returns the path to the public assets folder of the given addon.

public static string
# pluginAssets( string $addon, string $plugin, string $file = '' )

Returns the path to the public assets folder of the given plugin of the given addon.

public static string
# bin( string $file = '' )

Returns the path to the bin folder.

public static string
# data( string $file = '' )

Returns the path to the data folder.

public static string
# coreData( string $file = '' )

Returns the path to the data folder of the core.

public static string
# addonData( string $addon, string $file = '' )

Returns the path to the data folder of the given addon.

public static string
# pluginData( string $addon, string $plugin, string $file = '' )

Returns the path to the data folder of the given plugin of the given addon.

public static string
# cache( string $file = '' )

Returns the path to the cache folder.

public static string
# coreCache( string $file = '' )

Returns the path to the cache folder of the core.

public static string
# addonCache( string $addon, string $file = '' )

Returns the path to the cache folder of the given addon.

public static string
# pluginCache( string $addon, string $plugin, string $file = '' )

Returns the path to the cache folder of the given plugin.

public static string
# src( string $file = '' )

Returns the path to the src folder.

public static string
# core( string $file = '' )

Returns the path to the actual core.

public static string
# addon( string $addon, string $file = '' )

Returns the base path to the folder of the given addon.

public static string
# plugin( string $addon, string $plugin, string $file = '' )

Returns the base path to the folder of the plugin of the given addon.

public static string
# absolute( string $relPath )

Converts a relative path to an absolute.

public static string
# relative( string $absPath, null|string $basePath = null )

Converts an absolute path to a relative one.

public static string
# basename( string $path )

Returns the basename (filename) of the path independent of directory separator (/ or ).

Properties summary

protected static mixed $pathprovider