Public Member Functions | |
| getFolder ($folder=NULL) | |
| Gets the folder the module is residing in or another one therein. | |
| getName () | |
| Gets the name of this module. | |
| getDependencies () | |
| Dependencies of this module. | |
| getAuthors () | |
| Gets the authors of this module. | |
| getLicense () | |
| Gets the license of the module. | |
| getVersion () | |
| Gets the version number of the module. | |
| getWebLink () | |
| Gets the link to the web page for this module. | |
| getSourceFolder () | |
| Gets this modules source folder. | |
| getPageFolder () | |
| Gets this modules pages folder. | |
| getTemplateFolder () | |
| Gets this modules templates folder. | |
| getLanguageFolder () | |
| Gets this modules language folder. | |
| init () | |
| Initializes the module. | |
| getPageFiles (&$newest) | |
| Returns page files of this module. | |
| getTemplateFiles (&$newest, $suffixes= 'tpl') | |
| Provides template files of this module. | |
| getPagePrefix ($returnUrlPrefix=false) | |
| Returns the configured page prefix for the module. | |
Static Public Member Functions | |
| static | get ($name, $throwException=true) |
| Get the module with give name. | |
| static | getFolderNameForExtension ($extension) |
| static | getForAlias ($alias, $throwException=true) |
| Gets the module that contains a file with given alias. | |
| static | getLanguageFolders ($alias, $throwException=true) |
| static | aliasToTplFile ($alias, $throwException=true) |
| static | aliasToCssFile ($alias, $throwException=true) |
| static | aliasToJsFile ($alias, $throwException=true) |
| static | fileToAlias ($file) |
| static | getAll () |
| Gets all modules mapped by their name. | |
| static | getAllCallback () |
| Callback for getAll(), does the job without using the cache. | |
| static | assureIsModuleFolder (spunQ_Folder $folder) |
| Assures that a folder is a valid module folder. | |
| static | parseDocComment (spunQ_File $file) |
| Parses the first doc comment in the file. | |
| static | parseDocCommentCallback ($file) |
| Callback for parseDocComment(). | |
| static | aliasToTemplateFilesRecursive ($alias, $extension, $throwException=true) |
| static | aliasToFile ($alias, $extension= 'tpl', $throwException=true) |
| static | versionsCompatible ($expected, $actual) |
| Checks if an actual version string matches the required version. | |
Protected Member Functions | |
| __construct () | |
| Constructor. | |
| checkDependencies () | |
Static Protected Member Functions | |
| static | createFromDocComment ($folder, $doc) |
| Creates an object from a valid module folder and its index' doc comment. | |
Protected Attributes | |
| $folder | |
| The folder the module is residing in. | |
| $name | |
| The name of this module. | |
| $dependencies = array() | |
| Dependencies of this module. | |
| $authors | |
| The authors of this module. | |
| $license | |
| The license of the module. | |
| $version | |
| The version number of the module. | |
| $webLink | |
| A link to a web page to get the module from. | |
Static Private Member Functions | |
| static | getCache () |
| Provides a callback cache to use for various operations. | |
Static Private Attributes | |
| static | $extensionToFolderName |
| static | $fileToAliasCache = array() |
| static | $aliasToTemplateFilesRecursiveCache = array() |
| Cache for aliasToTemplateFilesRecursive(). | |
| static | $cache = NULL |
| The cache to use for various operations. | |
Definition at line 29 of file init/Module.class.php.
| spunQ_Module::__construct | ( | ) | [protected] |
| static spunQ_Module::assureIsModuleFolder | ( | spunQ_Folder $ | folder | ) | [static] |
Assures that a folder is a valid module folder.
See class docs for the specification of a module folder.
| $folder | The folder to check. |
| spunQ_ConfigurationError |
Definition at line 191 of file init/Module.class.php.
| static spunQ_Module::createFromDocComment | ( | $ | folder, | |
| $ | doc | |||
| ) | [static, protected] |
Creates an object from a valid module folder and its index' doc comment.
| $folder | The module's folder | |
| $doc | The doc comments of the modules index file as returned by parseDocComment(). |
| spunQ_DocumentationError |
Definition at line 325 of file init/Module.class.php.
| static spunQ_Module::get | ( | $ | name, | |
| $ | throwException = true | |||
| ) | [static] |
Get the module with give name.
| $name | The name of the module | |
| $throwException | Whether an exception should be thrown if no module with given name was found. The function will return NULL if this is false and the module was not found. |
| spunQ_UnresolvedAliasException |
Definition at line 40 of file init/Module.class.php.
| static spunQ_Module::getAll | ( | ) | [static] |
Gets all modules mapped by their name.
Definition at line 156 of file init/Module.class.php.
| static spunQ_Module::getAllCallback | ( | ) | [static] |
Callback for getAll(), does the job without using the cache.
| spunQ_ConfigurationError |
Definition at line 165 of file init/Module.class.php.
| spunQ_Module::getAuthors | ( | ) |
Gets the authors of this module.
Definition at line 479 of file init/Module.class.php.
| static spunQ_Module::getCache | ( | ) | [static, private] |
Provides a callback cache to use for various operations.
Registered operations are 'getAll' and 'parseDocComment' for the according functions.
Definition at line 368 of file init/Module.class.php.
| spunQ_Module::getDependencies | ( | ) |
Dependencies of this module.
A list of module names, optionally suffixed with a version number. Examples:
spunQ3 1.0strg.user 0.4strg.blog 2.4.3Definition at line 471 of file init/Module.class.php.
| spunQ_Module::getFolder | ( | $ | folder = NULL |
) |
Gets the folder the module is residing in or another one therein.
| $folder | An optional folder name. Passing this parameter is equivalent to calling $this->getFolder()->getFolder($folder);. |
Definition at line 445 of file init/Module.class.php.
| static spunQ_Module::getForAlias | ( | $ | alias, | |
| $ | throwException = true | |||
| ) | [static] |
Gets the module that contains a file with given alias.
Tries to find a module whose name is the prefix of the alias.
| $alias | The alias to find module for. | |
| $throwException | Whether the function should throw an exception if no module was found. |
false. Definition at line 75 of file init/Module.class.php.
| spunQ_Module::getLanguageFolder | ( | ) |
Gets this modules language folder.
Definition at line 535 of file init/Module.class.php.
| spunQ_Module::getLicense | ( | ) |
Gets the license of the module.
Definition at line 487 of file init/Module.class.php.
| spunQ_Module::getName | ( | ) |
| spunQ_Module::getPageFiles | ( | &$ | newest | ) |
Returns page files of this module.
| $newest | The newest page file's timestamp. Useful for caching. |
Definition at line 582 of file init/Module.class.php.
| spunQ_Module::getPageFolder | ( | ) |
Gets this modules pages folder.
Definition at line 519 of file init/Module.class.php.
| spunQ_Module::getPagePrefix | ( | $ | returnUrlPrefix = false |
) |
Returns the configured page prefix for the module.
| $returnUrlPrefix | Returns prefix with leading slash to be used in URLs. |
Definition at line 629 of file init/Module.class.php.
| spunQ_Module::getSourceFolder | ( | ) |
Gets this modules source folder.
Definition at line 511 of file init/Module.class.php.
| spunQ_Module::getTemplateFiles | ( | &$ | newest, | |
| $ | suffixes = 'tpl' | |||
| ) |
Provides template files of this module.
| $newest | The newest file's timestamp. Useful for caching. | |
| $suffixes | The method can operate on different file types. An array of strings may be provided here, where the string must be either of 'js', 'css' or 'tpl'. |
Definition at line 603 of file init/Module.class.php.
| spunQ_Module::getTemplateFolder | ( | ) |
Gets this modules templates folder.
Definition at line 527 of file init/Module.class.php.
| spunQ_Module::getVersion | ( | ) |
Gets the version number of the module.
Definition at line 495 of file init/Module.class.php.
| spunQ_Module::getWebLink | ( | ) |
Gets the link to the web page for this module.
Definition at line 503 of file init/Module.class.php.
| spunQ_Module::init | ( | ) |
Initializes the module.
Calls its index file.
Definition at line 569 of file init/Module.class.php.
| static spunQ_Module::parseDocComment | ( | spunQ_File $ | file | ) | [static] |
Parses the first doc comment in the file.
| $file | The file to extract and parse doc comment from. |
Definition at line 204 of file init/Module.class.php.
| static spunQ_Module::parseDocCommentCallback | ( | $ | file | ) | [static] |
Callback for parseDocComment().
| $file | The file to extract and parse doc comment from. |
Definition at line 218 of file init/Module.class.php.
| static spunQ_Module::versionsCompatible | ( | $ | expected, | |
| $ | actual | |||
| ) | [static] |
Checks if an actual version string matches the required version.
A version string consists of 3 parts:
| $expected | The expected version number. Must consist of 1-3 numeric values separated by periods. | |
| $actual | The expected version number. Must consist of exactly 3 numeric values separated by periods. |
Definition at line 304 of file init/Module.class.php.
spunQ_Module::$aliasToTemplateFilesRecursiveCache = array() [static, private] |
Cache for aliasToTemplateFilesRecursive().
Definition at line 234 of file init/Module.class.php.
spunQ_Module::$authors [protected] |
The authors of this module.
Definition at line 411 of file init/Module.class.php.
spunQ_Module::$cache = NULL [static, private] |
The cache to use for various operations.
Definition at line 360 of file init/Module.class.php.
spunQ_Module::$dependencies = array() [protected] |
Dependencies of this module.
A list of module names, optionally suffixed with a version number. Examples:
spunQ3 1.0strg.user 0.4strg.blog 2.4.3Definition at line 405 of file init/Module.class.php.
spunQ_Module::$extensionToFolderName [static, private] |
Initial value:
array(
'js' => 'tpl',
'tpl' => 'tpl',
'css' => 'tpl',
'form' => 'form',
'page' => 'page',
'php' => 'src',
)
Definition at line 51 of file init/Module.class.php.
spunQ_Module::$folder [protected] |
The folder the module is residing in.
Definition at line 386 of file init/Module.class.php.
spunQ_Module::$license [protected] |
spunQ_Module::$name [protected] |
spunQ_Module::$version [protected] |
spunQ_Module::$webLink [protected] |
A link to a web page to get the module from.
Definition at line 429 of file init/Module.class.php.
1.5.9