Class: atkThemeCompiler
Source Location: /ui/class.atkthemecompiler.inc
Class atkThemeCompiler
Class Overview
|
Compiles cache for current theme.
The compiler scans the theme directory and file structure and builds a compiled file that contains the exact location of every themeable element. If a theme is derived from another theme, the compiled theme contains the sum of the parts, so a single compiled theme file contains every information that ATK needs about the theme.
Located in /ui/class.atkthemecompiler.inc [line 37]
Wiki documentation
Author(s):
Information Tags:
|
Methods
|
Method Summary
| void |
compile() |
Compile a theme file for a certain theme. |
| String |
findTheme() |
Find the location on disk of a theme with a certain name. |
Methods
void compile(
String
$name
)
|
|
Compile a theme file for a certain theme.
Parameters:
|
String |
$name: |
The name of the theme to compile. |
String findTheme(
String
$name,
&$location, String
$location
)
|
|
Find the location on disk of a theme with a certain name.
Parameters:
|
String |
$name: |
Name of the theme |
|
String |
$location: |
The location of the theme ("atk", "app" or "auto") If set to auto, the method changes the $location value to the actual location. |
|
|
&$location: |
|
API Tags:
| Return: | The path relative to atk root, where the theme is located |
array readStructure(
String
$name, [String
$location = "auto"]
)
|
|
Parse theme structure.
This method parses the themes directory and file structure and converts it to a dataset containing all theme attributes and the exact location of all themable files.
This method also takes inheritance into account. If the theme derives from another theme, the info for said theme is included too. This is done recursively so themes can derive from any number of base themes.
All themes are implicitly derived from the 'default' theme unless they specify otherwise in their themedef.inc file.
Parameters:
|
String |
$name: |
The name of the theme |
|
String |
$location: |
The location of the theme ("atk", "app" or "auto") |
API Tags:
| Return: | Theme dData structure |
void scanModulePath(
String
$theme,
&$data, String
$data
)
|
|
Traverse module path.
Traverses the module path and remembers the physical location of all theme files.
Parameters:
|
String |
$theme: |
The name of the theme |
|
String |
$data: |
Reference to the data array in which to report the file locations |
|
|
&$data: |
|
void scanThemePath(
String
$path, String
$abspath,
&$data, String
$data
)
|
|
Traverse theme path.
Traverses the theme path and remembers the physical location of all theme files.
Parameters:
|
String |
$path: |
The path of the theme, relative to atkroot. |
|
String |
$abspath: |
The absolute path of the theme |
|
String |
$data: |
Reference to the data array in which to report the file locations |
|
|
&$data: |
|
Array _dirContents(
string
$path
)
|
|
Get files for a directory
Parameters:
|
string |
$path: |
The directory to traverse |
API Tags:
| Return: | with files from the traversed directory |