|
Moodle
2.2.1
http://www.collinsharper.com
|
Static Public Member Functions | |
| static | rewrite ($css, $currentDir, $docRoot=null, $symlinks=array()) |
| static | prepend ($css, $path) |
| static | rewriteRelative ($uri, $realCurrentDir, $realDocRoot, $symlinks=array()) |
Static Public Attributes | |
| static | $debugText = '' |
Static Protected Member Functions | |
| static | _realpath ($path) |
Static Protected Attributes | |
| static | $className = 'Minify_CSS_UriRewriter' |
Definition at line 13 of file UriRewriter.php.
| static _realpath | ( | $ | path | ) | [static, protected] |
Get realpath with any trailing slash removed. If realpath() fails, just remove the trailing slash.
| string | $path |
Definition at line 262 of file UriRewriter.php.

| string path to prepend | ( | $ | css, |
| $ | path | ||
| ) | [static] |
Prepend a path to relative URIs in CSS files
| string | $css | |
| string | $path | The path to prepend. |
Definition at line 94 of file UriRewriter.php.

Rewrite file relative URIs as root relative in CSS files
| string | $css | |
| string | $currentDir | The directory of the current CSS file. |
| string | $docRoot | The document root of the web site in which the CSS file resides (default = $_SERVER['DOCUMENT_ROOT']). |
| array | $symlinks | (default = array()) If the CSS file is stored in a symlink-ed directory, provide an array of link paths to target paths, where the link paths are within the document root. Because paths need to be normalized for this to work, use "//" to substitute the doc root in the link paths (the array keys). E.g.: array('//symlink' => '/real/target/path') // unix array('//static' => 'D:\staticStorage') // Windows |
Definition at line 50 of file UriRewriter.php.


| static rewriteRelative | ( | $ | uri, |
| $ | realCurrentDir, | ||
| $ | realDocRoot, | ||
| $ | symlinks = array() |
||
| ) | [static] |
Rewrite a file relative URI as root relative
Minify_CSS_UriRewriter::rewriteRelative( '../img/hello.gif' , '/home/user/www/css' // path of CSS file , '/home/user/www' // doc root ); // returns '/img/hello.gif'
// example where static files are stored in a symlinked directory Minify_CSS_UriRewriter::rewriteRelative( 'hello.gif' , '/var/staticFiles/theme' , '/home/user/www' , array('/home/user/www/static' => '/var/staticFiles') ); // returns '/static/theme/hello.gif'
| string | $uri | file relative URI |
| string | $realCurrentDir | realpath of the current file's directory. |
| string | $realDocRoot | realpath of the site document root. |
| array | $symlinks | (default = array()) If the file is stored in a symlink-ed directory, provide an array of link paths to real target paths, where the link paths "appear" to be within the document root. E.g.: array('/home/foo/www/not/real/path' => '/real/target/path') // unix array('C:\htdocs\not\real' => 'D:\real\target\path') // Windows |
Definition at line 213 of file UriRewriter.php.
$className = 'Minify_CSS_UriRewriter' [static, protected] |
Definition at line 20 of file UriRewriter.php.
$debugText = '' [static] |
Definition at line 26 of file UriRewriter.php.