System
[ class tree: System ] [ index: System ] [ all elements ]

Class: TModule

Source Location: /TModule.php

Class Overview

TComponent
   |
   --TModule

TModule class

Class Details

[line 40]
TModule class

TModule provides a way for organizing pages and sharing data among them.

TModule mainly introduces the concept of namespace partition. TModule cannot be rendered. It serves as the parent of data components such as DB components and logic components such as actions. So TModule may be considered a place for centralizing model and control while pages are more oriented to presentation.

Namespace: System

Events

  • OnLoad, Occurs right before the requested member page starts execution.
  • OnUnload, Occurs right after the requested member page finishes execution.




version:  v1.0, last update on 2004/08/13 21:44:52
author:  Qiang Xue <qiang.xue@gmail.com>


[ Top ]

Variables

Methods


Inherited Variables

Inherited Methods

Class: TComponent

TComponent::__construct()
Constructor.
TComponent::addChild()
Adds a child component.
TComponent::addParsedObject()
Handles a component or string met in template.
TComponent::attachEventHandler()
Attaches a handler function to an event.
TComponent::bindProperty()
Sets up the binding between a property and an expression.
TComponent::canGetProperty()
Determines whether a property can be read.
TComponent::canSetProperty()
Determines whether a property can be written.
TComponent::createComponent()
Creates a child component.
TComponent::dataBind()
Performs the databinding for this component.
TComponent::evaluateExpression()
Evaluates a PHP expression.
TComponent::evaluateStatements()
Evaluates a list of PHP statements.
TComponent::findObject()
Finds an object by its ID path.
TComponent::getApplication()
TComponent::getChild()
TComponent::getChildren()
TComponent::getDefinition()
Returns or builds a component definition.
TComponent::getGlobalization()
Returns the Globalization instance for the application.
TComponent::getID()
TComponent::getModule()
Returns the module object that contains the component or the page containing the component.
TComponent::getPage()
TComponent::getParent()
TComponent::getPropertyInitValue()
Gets the initial value of a property.
TComponent::getPropertyType()
Returns the type of a property
TComponent::getRequest()
Returns the request object associated with application.
TComponent::getServiceManager()
Returns the service manager for this application.
TComponent::getSession()
Returns the session object associated with the application.
TComponent::getSessionState()
Returns a session variable.
TComponent::getUniqueID()
Returns the unique ID of the component.
TComponent::getUser()
Returns the user object associated with the application.
TComponent::hasChildren()
TComponent::hasEvent()
Determines whether an event is defined.
TComponent::hasProperty()
Determines whether a property is defined.
TComponent::initProperties()
Initializes the property values.
TComponent::instantiateTemplate()
Parses a template string and instantiates the content.
TComponent::onDataBinding()
This method is invoked when dataBind is invoked for the component.
TComponent::raiseEvent()
Invokes all attached event handler functions for a particular event.
TComponent::removeChild()
Removes a child component.
TComponent::removeChildren()
Removes all child components.
TComponent::setAttribute()
Sets an attribute.
TComponent::setDefinition()
Sets a component definition.
TComponent::setID()
Sets a component ID.
TComponent::setParent()
Sets the parent of this component.
TComponent::setPropertyInitValue()
Sets the initial value of a property.
TComponent::setRoot()
Sets the root component in the component hierarchy.
TComponent::setSessionState()
Sets a session variable.
TComponent::unbindProperty()
Breaks the binding between a property and an expression.
TComponent::__get()
Returns a property value by name or a child component by ID.
TComponent::__set()
Sets value of a component property.

Class Variables

$parameters = array()

[line 46]

module level user parameters



access:  protected

Type:   array


[ Top ]



Class Methods


constructor __construct [line 51]

TModule __construct( )

Constructor.



Overrides TComponent::__construct() (Constructor.)

[ Top ]

method getUserParameter [line 70]

mixed getUserParameter( string $name)



return:  the parameter value, null if parameter doesn't exist.
access:  public


Parameters:

string   $name   the parameter name

[ Top ]

method getUserParameters [line 105]

array getUserParameters( )



return:  list of user parameters (name=>value pairs)
access:  public


[ Top ]

method loadConfig [line 62]

void loadConfig( mixed $config)

Reads the configuration provided in the app spec.

This method is automatically invoked by the framework after the module is created.




access:  public


Parameters:

mixed   $config   the configuration

[ Top ]

method onLoad [line 117]

void onLoad( TEventParameter $param)

This method is invoked right before a member page starts execution.

The method raises 'OnLoad' event. If you override this method, be sure to call the parent implementation so that the event handlers are invoked.




access:  public


Parameters:

TEventParameter   $param   event parameter to be passed to the event handlers

[ Top ]

method onUnload [line 129]

void onUnload( TEventParameter $param)

This method is invoked right after a member page finishes execution.

The method raises 'OnUnload' event. If you override this method, be sure to call the parent implementation so that the event handlers are invoked.




access:  public


Parameters:

TEventParameter   $param   event parameter to be passed to the event handlers

[ Top ]

method setUserParameter [line 81]

void setUserParameter( string $name, mixed $value)

Sets a user parameter.

If the value is null, the corresponding parameter will be cleared.




access:  public


Parameters:

string   $name   the parameter name
mixed   $value   the parameter value

[ Top ]

method setUserParameters [line 97]

void setUserParameters( array $params)

Sets a list of user parameters.



access:  public


Parameters:

array   $params   list of parameters (name=>value pairs)

[ Top ]


© 2004-2005 PRADO Software Group. All Rights Reserved.