TPageService class.
TPageService implements the service for serving user page requests.
Pages that are available to client users are stored under a directory specified by BasePath. The directory may contain subdirectories. Pages serving for a similar goal are usually placed under the same directory. A directory may contain a configuration file config.xml whose content is similar to that of application configuration file.
A page is requested via page path, which is a dot-connected directory names appended by the page name. Assume '<BasePath>/Users/Admin' is the directory containing the page 'Update'. Then the page can be requested via 'Users.Admin.Update'. By default, the BasePath of the page service is the "pages" directory under the application base path. You may change this default by setting BasePath with a different path you prefer.
Page name refers to the file name (without extension) of the page template. In order to differentiate from the common control template files, the extension name of the page template files must be '.page'. If there is a PHP file with the same page name under the same directory as the template file, that file will be considered as the page class file and the file name is the page class name. If such a file is not found, the page class is assumed as TPage.
Modules can be configured and loaded in page directory configurations. Configuration of a module in a subdirectory will overwrite its parent directory's configuration, if both configurations refer to the same module.
By default, TPageService will automatically load two modules:
Located in /Web/Services/TPageService.php (line 76)
TComponent | --TApplicationComponent | --TService | --TPageService
Applies a page configuration.
Constructs a URL with specified page path and GET parameters.
Creates a page instance based on requested page path.
Determines the requested page path.
Initializes the service.
This method is required by IService interface and is invoked by application.
Initializes page context.
Page context includes path alias settings, namespace usages, parameter initialization, module loadings, page initial properties and authorization rules.
Collects configuration for a page.
Runs the service.
This will create the requested page, initializes it with the property values specified in the configuration, and executes the page.
Executes a page.
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.
Inherited From TService
TService::getEnabled()
TService::getID()
TService::init()
TService::run()
TService::setEnabled()
TService::setID()
Inherited From TApplicationComponent
TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Documentation generated on Mon, 21 Apr 2008 11:35:49 -0400 by phpDocumentor 1.3.0RC4