[ Index ] |
|
Code source de PRADO 3.0.6 |
[Code source] [Imprimer] [Statistiques]
TPageService class file.
Author: | Qiang Xue <qiang.xue@gmail.com> |
Copyright: | Copyright © 2005 PradoSoft |
License: | http://www.pradosoft.com/license/ |
Version: | $Id: TPageService.php 1508 2006-11-25 20:42:54Z xue $ |
Poids: | 753 lignes (24 kb) |
Inclus ou requis: | 1 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
TPageService:: (19 méthodes):
__construct()
init()
initPageContext()
determineRequestedPagePath()
loadPageConfig()
getTemplateManager()
setTemplateManager()
getThemeManager()
setThemeManager()
getRequestedPagePath()
getRequestedPage()
getDefaultPage()
setDefaultPage()
getBasePath()
setBasePath()
setBasePageClass()
getBasePageClass()
run()
constructUrl()
TPageConfiguration:: (9 méthodes):
getProperties()
getAliases()
getUsings()
getModules()
getParameters()
getRules()
loadConfigurationFiles()
loadFromFile()
loadXmlElement()
Classe: TPageService - X-Ref
TPageService class.__construct() X-Ref |
Constructor. Sets default service ID to 'page'. |
init($config) X-Ref |
Initializes the service. This method is required by IService interface and is invoked by application. param: TXmlElement service configuration |
initPageContext($pageConfig) X-Ref |
Initializes page context. Page context includes path alias settings, namespace usages, parameter initialization, module loadings, page initial properties and authorization rules. param: TPageConfiguration |
determineRequestedPagePath() X-Ref |
Determines the requested page path. return: string page path requested |
loadPageConfig($pagePath,$config=null) X-Ref |
Collects configuration for a page. param: string page path in the format of Path.To.Page param: TXmlElement additional configuration return: TPageConfiguration |
getTemplateManager() X-Ref |
return: TTemplateManager template manager |
setTemplateManager(TTemplateManager $value) X-Ref |
param: TTemplateManager template manager |
getThemeManager() X-Ref |
return: TThemeManager theme manager |
setThemeManager(TThemeManager $value) X-Ref |
param: TThemeManager theme manager |
getRequestedPagePath() X-Ref |
return: string the requested page path |
getRequestedPage() X-Ref |
return: TPage the requested page |
getDefaultPage() X-Ref |
return: string default page path to be served if no explicit page is request. Defaults to 'Home'. |
setDefaultPage($value) X-Ref |
param: string default page path to be served if no explicit page is request |
getBasePath() X-Ref |
return: string the root directory for storing pages. Defaults to the 'pages' directory under the application base path. |
setBasePath($value) X-Ref |
param: string root directory (in namespace form) storing pages |
setBasePageClass($value) X-Ref |
Sets the base page class name (in namespace format). If a page only has a template file without page class file, this base page class will be instantiated. param: string class name |
getBasePageClass() X-Ref |
return: string base page class name in namespace format. Defaults to 'TPage'. |
run() X-Ref |
Runs the service. This will create the requested page, initializes it with the property values specified in the configuration, and executes the page. |
constructUrl($pagePath,$getParams=null,$encodeAmpersand=true,$encodeGetItems=true) X-Ref |
Constructs a URL with specified page path and GET parameters. param: string page path param: array list of GET parameters, null if no GET parameters required param: boolean whether to encode the ampersand in URL, defaults to true. param: boolean whether to encode the GET parameters (their names and values), defaults to true. return: string URL for the page and GET parameters |
Classe: TPageConfiguration - X-Ref
TPageConfiguration classgetProperties() X-Ref |
Returns list of page initial property values. Each array element represents a single property with the key being the property name and the value the initial property value. return: array list of page initial property values |
getAliases() X-Ref |
Returns list of path alias definitions. The definitions are aggregated (top-down) from configuration files along the path to the specified page. Each array element represents a single alias definition, with the key being the alias name and the value the absolute path. return: array list of path alias definitions |
getUsings() X-Ref |
Returns list of namespaces to be used. The namespaces are aggregated (top-down) from configuration files along the path to the specified page. Each array element represents a single namespace usage, with the value being the namespace to be used. return: array list of namespaces to be used |
getModules() X-Ref |
Returns list of module configurations. The module configurations are aggregated (top-down) from configuration files along the path to the specified page. Each array element represents a single module configuration, with the key being the module ID and the value the module configuration. Each module configuration is stored in terms of an array with the following content ([0]=>module type, [1]=>module properties, [2]=>complete module configuration) The module properties are an array of property values indexed by property names. The complete module configuration is a TXmlElement object representing the raw module configuration which may contain contents enclosed within module tags. return: array list of module configurations to be used |
getParameters() X-Ref |
Returns list of parameter definitions. The parameter definitions are aggregated (top-down) from configuration files along the path to the specified page. Each array element represents a single parameter definition, with the key being the parameter ID and the value the parameter definition. A parameter definition can be either a string representing a string-typed parameter, or an array. The latter defines a component-typed parameter whose format is as follows, ([0]=>component type, [1]=>component properties) The component properties are an array of property values indexed by property names. return: array list of parameter definitions to be used |
getRules() X-Ref |
Returns list of authorization rules. The authorization rules are aggregated (bottom-up) from configuration files along the path to the specified page. return: TAuthorizationRuleCollection collection of authorization rules |
loadConfigurationFiles($pagePath,$basePath) X-Ref |
Loads configuration for a page specified in a path format. param: string path to the page (dot-connected format) param: string root path for pages |
loadFromFile($fname,$page) X-Ref |
Loads a specific config file. param: string config file name param: string page name, null if page is not required |
loadXmlElement($dom,$configPath,$page) X-Ref |
Loads a specific configuration xml element. param: TXmlElement config xml element param: string base path corresponding to this xml element param: string page name, null if page is not required |
Généré le : Sun Feb 25 21:07:04 2007 | par Balluche grâce à PHPXref 0.7 |