![]() |
Xataface
2.0alpha2
Xataface Application Framework
|
A Class that manages, builds, and maintains dependencies of javacripts. More...
Public Member Functions | |
| ignore ($script) | |
| isIgnored ($script) | |
| ignoreCss ($stylesheet) | |
| __construct () | |
| setMinify ($minify) | |
| getMinify () | |
| setUseCache ($cache) | |
| getUseCache () | |
| mergeCSSPaths () | |
| getScripts () | |
| clearScripts () | |
| copyTo (Dataface_JavascriptTool $target) | |
| addPath ($path, $url) | |
| removePath ($path) | |
| getPaths () | |
| clearPaths () | |
| import ($path) | |
| whereis ($script) | |
| which ($script) | |
| getURL () | |
| getContents () | |
| getHtml () | |
| unimport ($script) | |
| compile ($clean=false) | |
| _includeStringCallback ($matches) | |
| _importCallback ($matches) | |
| clearCache () | |
Static Public Member Functions | |
| static | getInstance ($type=null) |
Protected Member Functions | |
| decorateContents ($contents, $script) | |
| _compile ($scripts, $passthru=false, $onceOnly=true) | |
A Class that manages, builds, and maintains dependencies of javacripts.
Definition at line 7 of file JavascriptTool.php.
| __construct | ( | ) |
Constructor.
Definition at line 114 of file JavascriptTool.php.
|
protected |
Compiles a set of javascripts specified byt the $scripts array. This respects the //!require and //!include directives which includes other javascript files inline.
| mixed | $scripts | Either a string with a path to a script, or an array of paths. |
| array | &$included | An "out" array to keep track of which scripts have been included. This is an associative array with key value pairs. The key is the relative path to the script within the include paths. The value is the path to the file on the file system. |
Definition at line 521 of file JavascriptTool.php.
| _importCallback | ( | $matches | ) |
Definition at line 590 of file JavascriptTool.php.
| _includeStringCallback | ( | $matches | ) |
Definition at line 586 of file JavascriptTool.php.
| addPath | ( | $path, | |
| $url | |||
| ) |
Adds a path to the list of include paths (where the tool looks for scripts).
| string | $path | The Filesystem path to the directory. |
| string | $url | The corresponding URL to access this path. |
Definition at line 200 of file JavascriptTool.php.
| clearCache | ( | ) |
Definition at line 610 of file JavascriptTool.php.
| clearPaths | ( | ) |
Definition at line 222 of file JavascriptTool.php.
| clearScripts | ( | ) |
Definition at line 175 of file JavascriptTool.php.
| compile | ( | $clean = false | ) |
Definition at line 410 of file JavascriptTool.php.
| copyTo | ( | Dataface_JavascriptTool | $target | ) |
Definition at line 181 of file JavascriptTool.php.
|
protected |
Definition at line 502 of file JavascriptTool.php.
| getContents | ( | ) |
Returns the contents of the compiled script (loads it from the cached file).
Definition at line 268 of file JavascriptTool.php.
| getHtml | ( | ) |
Definition at line 273 of file JavascriptTool.php.
|
static |
Returns a reference to the singleton instance.
Definition at line 95 of file JavascriptTool.php.
| getMinify | ( | ) |
Gets whether to minify the output or not.
Definition at line 132 of file JavascriptTool.php.
| getPaths | ( | ) |
Returns the include paths as an associative array. [filesystem path] => [url]
Definition at line 218 of file JavascriptTool.php.
| getScripts | ( | ) |
Gets the scripts that are currently set to be compiled in this tool. This doesn't include all subscripts.
Definition at line 171 of file JavascriptTool.php.
| getURL | ( | ) |
Returns the URL to the resulting script. This precompiles the cached script if it isn't already compiled or is dirty.
Definition at line 260 of file JavascriptTool.php.
| getUseCache | ( | ) |
Definition at line 146 of file JavascriptTool.php.
| ignore | ( | $script | ) |
Definition at line 77 of file JavascriptTool.php.
| ignoreCss | ( | $stylesheet | ) |
Definition at line 86 of file JavascriptTool.php.
| import | ( | $path | ) |
Adds a script to the list of top-level scripts to be compiled in this bundle.
| string | $path | The relative path to the script. |
Definition at line 230 of file JavascriptTool.php.
| isIgnored | ( | $script | ) |
Definition at line 82 of file JavascriptTool.php.
| mergeCSSPaths | ( | ) |
Merges the paths of the internal CSS tool with the paths of the singleton CSS tool instance.
Definition at line 155 of file JavascriptTool.php.
| removePath | ( | $path | ) |
Removes a path from the list of include paths.
| string | $path | The file system path to remove. |
Definition at line 209 of file JavascriptTool.php.
| setMinify | ( | $minify | ) |
Sets whether to minify the output or not.
| boolean | $minify |
Definition at line 123 of file JavascriptTool.php.
| setUseCache | ( | $cache | ) |
| boolean | $cache |
Definition at line 139 of file JavascriptTool.php.
| unimport | ( | $script | ) |
Definition at line 288 of file JavascriptTool.php.
| whereis | ( | $script | ) |
Definition at line 235 of file JavascriptTool.php.
| which | ( | $script | ) |
Definition at line 246 of file JavascriptTool.php.
1.8.1.2