TComponent class
TComponent is the base class for all PRADO components. TComponent implements the protocol of defining, using properties and events.
A property is defined by a getter method, and/or a setter method. Properties can be accessed in the way like accessing normal object members. Reading or writing a property will cause the invocation of the corresponding getter or setter method, e.g.,
Since Prado 3.2 a new class of javascript-friendly properties have been introduced to better deal with potential security problems like cross-site scripting issues. All the data that gets sent clientside inside a javascript block is now encoded by default. Sometimes there's the need to bypass this encoding and be able to send raw javascript code. This new class of javascript-friendly properties are identified by their name starting with 'js' (case insensitive):
An event is defined by the presence of a method whose name starts with 'on'. The event name is the method name and is thus case-insensitive. An event can be attached with one or several methods (called event handlers). An event can be raised by calling raiseEvent method, upon which the attached event handlers will be invoked automatically in the order they are attached to the event. Event handlers must have the following signature,
Located in /TComponent.php (line 99)
Class | Description |
---|---|
TCacheDependency | TCacheDependency class. |
TDummyDataSource | TDummyDataSource class |
TList | TList class |
TMap | TMap class |
TPagedDataSource | TPagedDataSource class |
TQueue | TQueue class |
TStack | TStack class |
TActiveRecord | Base class for active records. |
TActiveRecordGateway | TActiveRecordGateway excutes the SQL command queries and returns the data record as arrays (for most finder methods). |
TActiveRecordManager | TActiveRecordManager provides the default DB connection, default active record gateway, and table meta data inspector. |
TOracleTableInfo | TDbTableInfo class describes the meta data of a database table. |
TDbCommandBuilder | TDbCommandBuilder provides basic methods to create query commands for tables giving by setTableInfo the property. |
TDbMetaData | TDbMetaData is the base class for retrieving metadata information, such as table and columns information, from a database connection. |
TDbTableColumn | TDbTableColumn class describes the column meta data of the schema for a database table. |
TDbTableInfo | TDbTableInfo class describes the meta data of a database table. |
TDataGatewayCommand | TDataGatewayCommand is command builder and executor class for TTableGateway and TActiveRecordGateway. |
TSqlCriteria | Search criteria for TDbDataGateway. |
TTableGateway | TTableGateway class provides several find methods to get data from the database and update, insert, and delete methods. |
TDiscriminator | The TDiscriminator corresponds to the <discriminator> tag within a <resultMap>. |
TSubMap | TSubMap class defines a submapping value and the corresponding <resultMap> |
TParameterMap | TParameterMap corresponds to the <parameterMap> element. |
TParameterProperty | TParameterProperty corresponds to the <property> tag and defines one object property for the <parameterMap> |
TResultMap | TResultMap corresponds to <resultMap> mapping tag. |
TResultProperty | TResultProperty corresponds a <property> tags inside a <resultMap> tag. |
TSqlMapCacheModel | TSqlMapCacheModel corresponds to the <cacheModel> sql mapping configuration tag. |
TSqlMapStatement | TSqlMapStatement class corresponds to <statement> element. |
TSqlMapTypeHandler | A simple interface for implementing custom type handlers. |
TCachingStatement | TCacheingStatement class. |
TMappedStatement | TMappedStatement class executes SQL mapped statements. Mapped Statements can hold any SQL statement and use Parameter Maps and Result Maps for input and output. |
TSqlMapObjectCollectionTree | TSQLMapObjectCollectionTree class. |
TResultSetListItemParameter | TResultSetListItemParameter class |
TResultSetMapItemParameter | TResultSetMapItemParameter class. |
TPreparedStatement | TpreparedStatement class. |
TStaticSql | TStaticSql class. |
TSqlMapGateway | DataMapper client, a fascade to provide access the rest of the DataMapper framework. It provides three core functions: |
TSqlMapManager | TSqlMapManager class holds the sqlmap configuation result maps, statements parameter maps and a type handler factory. |
TDbCommand | TDbCommand class. |
TDbConnection | TDbConnection class |
TDbDataReader | TDbDataReader class. |
TDbTransaction | TDbTransaction class. |
Translation | Translation class. |
TTextWriter | TTextWriter class. |
TAuthorizationRule | TAuthorizationRule class |
TUser | TUser class |
TApplication | TApplication class. |
TApplicationConfiguration | TApplicationConfiguration class. |
TApplicationComponent | TApplicationComponent class |
TEventParameter | TEventParameter class. |
TComponentReflection | TComponentReflection class. |
TLogger | TLogger class. |
TPageConfiguration | TPageConfiguration class |
THttpCookie | THttpCookie class. |
TUri | TUri class |
TUrlMappingPattern | TUrlMappingPattern class. |
TAutoCompleteTemplate | TAutoCompleteTemplate class. |
TBaseActiveControl | TBaseActiveControl class provided additional basic property for every active control. An instance of TBaseActiveControl or its decendent TBaseActiveCallbackControl is created by TActiveControlAdapter::getBaseActiveControl() method. |
TCachePageStatePersister | TCachePageStatePersister class |
TClientSideOptions | TClientSideOptions abstract class. |
TCompositeLiteral | TCompositeLiteral class |
TPageStatePersister | TPageStatePersister class |
TSessionPageStatePersister | TSessionPageStatePersister class |
TDataSourceSelectParameters | TDataSourceSelectParameters class |
TDataSourceView | TDataSourceView class |
TFont | TFont class |
TMetaTag | TMetaTag class. |
THotSpot | THotSpot class. |
TListItem | TListItem class. |
TRepeatInfo | TRepeatInfo class. |
TStyle | TStyle class |
TWebControlDecorator | TWebControlDecorator class |
TWizardSideBarTemplate | TWizardSideBarTemplate class. |
TWizardSideBarListItemTemplate | TWizardSideBarListItemTemplate class. |
TWizardNavigationTemplate | TWizardNavigationTemplate class. |
TXmlElement | TXmlElement class. |
Processes an object that is created during parsing template.
The object can be either a component or a static text string. This method can be overridden to customize the handling of newly created objects in template. Only framework developers and control developers should use this method.
Attaches an event handler to an event.
The handler must be a valid PHP callback, i.e., a string referring to a global function name, or an array containing two elements with the first element being an object and the second element a method name of the object. In Prado, you can also use method path to refer to an event handler. For example, array($object,'Parent.buttonClicked') uses a method path that refers to the method $object->Parent->buttonClicked(...).
The event handler must be of the following signature,
This is a convenient method to add an event handler. It is equivalent to getEventHandlers($name)->add($handler). For complete management of event handlers, use getEventHandlers to get the event handler list first, and then do various TList operations to append, insert or remove event handlers. You may also do these operations like getting and setting properties, e.g.,
Determines whether a property can be read.
A property can be read if the class has a getter method for the property name. Note, property name is case-insensitive.
Determines whether a property can be set.
A property can be written if the class has a setter method for the property name. Note, property name is case-insensitive.
This method is invoked after the component is instantiated by a template.
When this method is invoked, the component's properties have been initialized. The default implementation of this method will invoke the potential parent component's addParsedObject. This method can be overridden.
Detaches an existing event handler.
This method is the opposite of attachEventHandler.
Evaluates a PHP expression in the context of this control.
Evaluates a list of PHP statements.
Returns the list of attached event handlers for an event.
Evaluates a property path.
A property path is a sequence of property names concatenated by '.' character. For example, 'Parent.Page' refers to the 'Page' property of the component's 'Parent' property value (which should be a component also).
Determines whether an event is defined.
An event is defined if the class has a method whose name is the event name prefixed with 'on'. Note, event name is case-insensitive.
Determines whether a property is defined.
A property is defined if there is a getter or setter method defined in the class. Note, property names are case-insensitive.
Raises an event.
This method represents the happening of an event and will invoke all attached event handlers for the event.
Sets a value to a property path.
A property path is a sequence of property names concatenated by '.' character. For example, 'Parent.Page' refers to the 'Page' property of the component's 'Parent' property value (which should be a component also).
Calls a method.
Do not call this method. This is a PHP magic method that we override to allow using the following syntax to call a property setter or getter.
Returns a property value or an event handler list by property or event name.
Do not call this method. This is a PHP magic method that we override to allow using the following syntax to read a property:
Sets value of a component property.
Do not call this method. This is a PHP magic method that we override to allow using the following syntax to set a property or attach an event handler.
Returns an array with the names of all variables of that object that should be serialized.
Do not call this method. This is a PHP magic method that will be called automatically prior to any serialization.
Do not call this method. This is a PHP magic method that will be called automatically after any unserialization; it can perform reinitialization tasks on the object.
Documentation generated on Mon, 25 Jun 2012 14:37:36 +0200 by phpDocumentor 1.4.3