summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/I18N/Translation.php60
-rw-r--r--framework/Log/TLogRouter.php4
-rw-r--r--framework/Security/TAuthManager.php20
-rw-r--r--framework/TApplication.php62
-rw-r--r--framework/TComponent.php30
-rw-r--r--framework/Web/UI/TControl.php43
-rw-r--r--framework/Web/UI/TPage.php52
-rw-r--r--framework/Web/UI/TTemplateManager.php2
-rw-r--r--framework/Web/UI/TThemeManager.php2
-rw-r--r--framework/Web/UI/WebControls/TBaseDataList.php4
-rw-r--r--framework/Web/UI/WebControls/TBoundColumn.php4
-rw-r--r--framework/Web/UI/WebControls/TBulletedList.php8
-rw-r--r--framework/Web/UI/WebControls/TButton.php22
-rw-r--r--framework/Web/UI/WebControls/TButtonColumn.php2
-rw-r--r--framework/Web/UI/WebControls/TCheckBox.php10
-rw-r--r--framework/Web/UI/WebControls/TCustomValidator.php8
-rw-r--r--framework/Web/UI/WebControls/TDataBoundControl.php10
-rw-r--r--framework/Web/UI/WebControls/TDataGrid.php40
-rw-r--r--framework/Web/UI/WebControls/TDataList.php42
-rw-r--r--framework/Web/UI/WebControls/TDataSourceControl.php2
-rw-r--r--framework/Web/UI/WebControls/TDataSourceView.php2
-rw-r--r--framework/Web/UI/WebControls/TFileUpload.php6
-rw-r--r--framework/Web/UI/WebControls/THiddenField.php6
-rw-r--r--framework/Web/UI/WebControls/THyperLinkColumn.php2
-rw-r--r--framework/Web/UI/WebControls/TImageButton.php24
-rw-r--r--framework/Web/UI/WebControls/TLinkButton.php22
-rw-r--r--framework/Web/UI/WebControls/TListControl.php8
-rw-r--r--framework/Web/UI/WebControls/TRadioButton.php4
-rw-r--r--framework/Web/UI/WebControls/TRepeater.php22
-rw-r--r--framework/Web/UI/WebControls/TTextBox.php5
30 files changed, 257 insertions, 271 deletions
diff --git a/framework/I18N/Translation.php b/framework/I18N/Translation.php
index 8f45ff64..91cfd6ee 100644
--- a/framework/I18N/Translation.php
+++ b/framework/I18N/Translation.php
@@ -2,11 +2,11 @@
/**
* Translation, static.
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the BSD License.
*
- * Copyright(c) 2004 by Xiang Wei Zhuo.
+ * Copyright(c) 2004 by Xiang Wei Zhuo.
*
* To contact the author write to {@link mailto:qiang.xue@gmail.com Qiang Xue}
* The latest version of PRADO can be obtained from:
@@ -21,11 +21,11 @@
* Get the MessageFormat class.
*/
Prado::using('System.I18N.core.MessageFormat');
-
+
/**
* Translation class.
- *
+ *
* Provides translation using a static MessageFormatter.
*
* @author Xiang Wei Zhuo <weizhuo[at]gmail[dot]com>
@@ -34,19 +34,19 @@ Prado::using('System.I18N.core.MessageFormat');
*/
class Translation extends TComponent
{
-
+
/**
* The string formatter. This is a class static variable.
- * @var MessageFormat
- */
+ * @var MessageFormat
+ */
protected static $formatter;
-
+
/**
* Initialize the TTranslate translation components
*/
public static function init()
- {
+ {
//initialized the default class wide formatter
if(is_null(self::$formatter))
{
@@ -55,49 +55,49 @@ class Translation extends TComponent
$source = MessageSource::factory($config['type'],
$config['source'],
$config['filename']);
-
+
$source->setCulture($app->getCulture());
-
+
if($config['cache'])
$source->setCache(new MessageCache($config['cache']));
-
+
self::$formatter = new MessageFormat($source, $app->getCharset());
//save the message on end request
Prado::getApplication()->attachEventHandler(
- 'EndRequest', array('Translation', 'saveMessages'));
- }
+ 'OnEndRequest', array('Translation', 'saveMessages'));
+ }
}
-
+
/**
* Get the static formatter from this component.
- * @return MessageFormat formattter.
+ * @return MessageFormat formattter.
* @see localize()
*/
public static function formatter()
{
return self::$formatter;
}
-
+
/**
* Save untranslated messages to the catalogue.
*/
public static function saveMessages()
{
static $onceonly = true;
-
+
if($onceonly && !is_null($formatter = self::$formatter))
{
$app = Prado::getApplication()->getGlobalization();
$config = $app->getTranslationConfiguration();
if(isset($config['autosave']))
- {
+ {
$formatter->getSource()->setCulture($app->getCulture());
$formatter->getSource()->save($config['catalogue']);
}
$onceonly = false;
- }
- }
+ }
+ }
}
/**
@@ -106,15 +106,15 @@ class Translation extends TComponent
* @param array a set of parameters to substitute.
* @param string a different catalogue to find the localize text.
* @param string the input AND output charset.
- * @return string localized text.
+ * @return string localized text.
* @see TTranslate::formatter()
* @see TTranslate::init()
*/
function localize($text, $parameters=array(), $catalogue=null, $charset=null)
{
-
+
$app = Prado::getApplication()->getGlobalization();
-
+
$params = array();
foreach($parameters as $key => $value)
$params['{'.$key.'}'] = $value;
@@ -127,17 +127,17 @@ function localize($text, $parameters=array(), $catalogue=null, $charset=null)
if(empty($catalogue) && isset($config['catalogue']))
$catalogue = $config['catalogue'];
-
+
//globalization charset
- $appCharset = is_null($app) ? '' : $app->getCharset();
-
+ $appCharset = is_null($app) ? '' : $app->getCharset();
+
//default charset
$defaultCharset = (is_null($app)) ? 'UTF-8' : $app->getDefaultCharset();
-
+
//fall back
- if(empty($charset)) $charset = $appCharset;
+ if(empty($charset)) $charset = $appCharset;
if(empty($charset)) $charset = $defaultCharset;
-
+
return Translation::formatter()->format($text,$params,$catalogue,$charset);
}
diff --git a/framework/Log/TLogRouter.php b/framework/Log/TLogRouter.php
index 6979849f..3292c4d3 100644
--- a/framework/Log/TLogRouter.php
+++ b/framework/Log/TLogRouter.php
@@ -68,8 +68,8 @@ class TLogRouter extends TModule
throw new TConfigurationException('logrouter_configfile_invalid',$this->_configFile);
}
$this->loadConfig($config);
- //$this->getApplication()->attachEventHandler('Error',array($this,'collectLogs'));
- $this->getApplication()->attachEventHandler('EndRequest',array($this,'collectLogs'));
+ //$this->getApplication()->attachEventHandler('OnError',array($this,'collectLogs'));
+ $this->getApplication()->attachEventHandler('OnEndRequest',array($this,'collectLogs'));
}
/**
diff --git a/framework/Security/TAuthManager.php b/framework/Security/TAuthManager.php
index 327104cc..ca0be56e 100644
--- a/framework/Security/TAuthManager.php
+++ b/framework/Security/TAuthManager.php
@@ -76,9 +76,9 @@ class TAuthManager extends TModule
throw new TConfigurationException('authmanager_usermanager_invalid',$this->_userManager);
$this->_userManager=$users;
}
- $application->attachEventHandler('Authentication',array($this,'doAuthentication'));
- $application->attachEventHandler('EndRequest',array($this,'leave'));
- $application->attachEventHandler('Authorization',array($this,'doAuthorization'));
+ $application->attachEventHandler('OnAuthentication',array($this,'doAuthentication'));
+ $application->attachEventHandler('OnEndRequest',array($this,'leave'));
+ $application->attachEventHandler('OnAuthorization',array($this,'doAuthorization'));
$this->_initialized=true;
}
@@ -177,17 +177,17 @@ class TAuthManager extends TModule
/**
* Performs the real authentication work.
- * An Authenticate event will be raised if there is any handler attached to it.
+ * An OnAuthenticate event will be raised if there is any handler attached to it.
* If the application already has a non-null user, it will return without further authentication.
* Otherwise, user information will be restored from session data.
- * @param mixed parameter to be passed to Authenticate event
+ * @param mixed parameter to be passed to OnAuthenticate event
* @throws TConfigurationException if session module does not exist.
*/
public function onAuthenticate($param)
{
$application=$this->getApplication();
- if($this->hasEventHandler('Authenticate'))
- $this->raiseEvent('Authenticate',$this,$application);
+ if($this->hasEventHandler('OnAuthenticate'))
+ $this->raiseEvent('OnAuthenticate',$this,$application);
if($application->getUser()!==null)
return;
@@ -204,13 +204,13 @@ class TAuthManager extends TModule
* Authorization rules obtained from the application will be used to check
* if a user is allowed. If authorization fails, the response status code
* will be set as 401 and the application terminates.
- * @param mixed parameter to be passed to Authenticate event
+ * @param mixed parameter to be passed to OnAuthorize event
*/
public function onAuthorize($param)
{
$application=$this->getApplication();
- if($this->hasEventHandler('Authorize'))
- $this->raiseEvent('Authorize',$this,$application);
+ if($this->hasEventHandler('OnAuthorize'))
+ $this->raiseEvent('OnAuthorize',$this,$application);
if(!$application->getAuthorizationRules()->isUserAllowed($application->getUser(),$application->getRequest()->getRequestType()))
{
$application->getResponse()->setStatusCode(401);
diff --git a/framework/TApplication.php b/framework/TApplication.php
index d0c9a6d9..fde385b7 100644
--- a/framework/TApplication.php
+++ b/framework/TApplication.php
@@ -377,7 +377,7 @@ class TApplication extends TComponent
/**
* Loads global values from persistent storage.
- * This method is invoked when {@link onLoadState LoadState} event is raised.
+ * This method is invoked when {@link onLoadState OnLoadState} event is raised.
* After this method, values that are stored in previous requests become
* available to the current request via {@link getGlobalState}.
*/
@@ -388,7 +388,7 @@ class TApplication extends TComponent
/**
* Saves global values into persistent storage.
- * This method is invoked when {@link onSaveState SaveState} event is raised.
+ * This method is invoked when {@link onSaveState OnSaveState} event is raised.
*/
protected function saveGlobals()
{
@@ -796,21 +796,21 @@ class TApplication extends TComponent
}
/**
- * Raises Error event.
+ * Raises OnError event.
* This method is invoked when an exception is raised during the lifecycles
* of the application.
* @param mixed event parameter
*/
public function onError($param)
{
- if($this->hasEventHandler('Error'))
- $this->raiseEvent('Error',$this,$param);
+ if($this->hasEventHandler('OnError'))
+ $this->raiseEvent('OnError',$this,$param);
else
$this->getErrorHandler()->handleError($this,$param);
}
/**
- * Raises BeginRequest event.
+ * Raises OnBeginRequest event.
* At the time when this method is invoked, application modules are loaded
* and initialized, user request is resolved and the corresponding service
* is loaded and initialized. The application is about to start processing
@@ -819,131 +819,131 @@ class TApplication extends TComponent
*/
public function onBeginRequest($param)
{
- $this->raiseEvent('BeginRequest',$this,$param);
+ $this->raiseEvent('OnBeginRequest',$this,$param);
}
/**
- * Raises Authentication event.
+ * Raises OnAuthentication event.
* This method is invoked when the user request needs to be authenticated.
* @param mixed event parameter
*/
public function onAuthentication($param)
{
- $this->raiseEvent('Authentication',$this,$param);
+ $this->raiseEvent('OnAuthentication',$this,$param);
}
/**
- * Raises PostAuthentication event.
+ * Raises OnPostAuthentication event.
* This method is invoked right after the user request is authenticated.
* @param mixed event parameter
*/
public function onPostAuthentication($param)
{
- $this->raiseEvent('PostAuthentication',$this,$param);
+ $this->raiseEvent('OnPostAuthentication',$this,$param);
}
/**
- * Raises Authorization event.
+ * Raises OnAuthorization event.
* This method is invoked when the user request needs to be authorized.
* @param mixed event parameter
*/
public function onAuthorization($param)
{
- $this->raiseEvent('Authorization',$this,$param);
+ $this->raiseEvent('OnAuthorization',$this,$param);
}
/**
- * Raises PostAuthorization event.
+ * Raises OnPostAuthorization event.
* This method is invoked right after the user request is authorized.
* @param mixed event parameter
*/
public function onPostAuthorization($param)
{
- $this->raiseEvent('PostAuthorization',$this,$param);
+ $this->raiseEvent('OnPostAuthorization',$this,$param);
}
/**
- * Raises LoadState event.
+ * Raises OnLoadState event.
* This method is invoked when the application needs to load state (probably stored in session).
* @param mixed event parameter
*/
public function onLoadState($param)
{
$this->loadGlobals();
- $this->raiseEvent('LoadState',$this,$param);
+ $this->raiseEvent('OnLoadState',$this,$param);
}
/**
- * Raises PostLoadState event.
+ * Raises OnPostLoadState event.
* This method is invoked right after the application state has been loaded.
* @param mixed event parameter
*/
public function onPostLoadState($param)
{
- $this->raiseEvent('PostLoadState',$this,$param);
+ $this->raiseEvent('OnPostLoadState',$this,$param);
}
/**
- * Raises PreRunService event.
+ * Raises OnPreRunService event.
* This method is invoked right before the service is to be run.
* @param mixed event parameter
*/
public function onPreRunService($param)
{
- $this->raiseEvent('PreRunService',$this,$param);
+ $this->raiseEvent('OnPreRunService',$this,$param);
}
/**
- * Raises RunService event.
+ * Raises OnRunService event.
* This method is invoked when the service runs.
* @param mixed event parameter
*/
public function onRunService($param)
{
- $this->raiseEvent('RunService',$this,$param);
+ $this->raiseEvent('OnRunService',$this,$param);
if($this->_service)
$this->_service->run();
}
/**
- * Raises PostRunService event.
+ * Raises OnPostRunService event.
* This method is invoked right after the servie is run.
* @param mixed event parameter
*/
public function onPostRunService($param)
{
- $this->raiseEvent('PostRunService',$this,$param);
+ $this->raiseEvent('OnPostRunService',$this,$param);
}
/**
- * Raises SaveState event.
+ * Raises OnSaveState event.
* This method is invoked when the application needs to save state (probably stored in session).
* @param mixed event parameter
*/
public function onSaveState($param)
{
- $this->raiseEvent('SaveState',$this,$param);
+ $this->raiseEvent('OnSaveState',$this,$param);
$this->saveGlobals();
}
/**
- * Raises PostSaveState event.
+ * Raises OnPostSaveState event.
* This method is invoked right after the application state has been saved.
* @param mixed event parameter
*/
public function onPostSaveState($param)
{
- $this->raiseEvent('PostSaveState',$this,$param);
+ $this->raiseEvent('OnPostSaveState',$this,$param);
}
/**
- * Raises EndRequest event.
+ * Raises OnEndRequest event.
* This method is invoked when the application completes the processing of the request.
* @param mixed event parameter
*/
public function onEndRequest($param)
{
- $this->raiseEvent('EndRequest',$this,$param);
+ $this->raiseEvent('OnEndRequest',$this,$param);
}
}
diff --git a/framework/TComponent.php b/framework/TComponent.php
index aa060750..cc5fa1b5 100644
--- a/framework/TComponent.php
+++ b/framework/TComponent.php
@@ -35,8 +35,8 @@
* in the format of concatenated words, with the first letter of each word
* capitalized (e.g. DisplayMode, ItemStyle).
*
- * An event is defined by the presence of a method whose name is the event name prefixed with 'on'.
- * The event name is 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 {@link raiseEvent} method, upon which
* the attached event handlers will be invoked automatically in the order they
@@ -48,15 +48,15 @@
* and $param refers to a structure that may contain event-specific information.
* To raise an event (assuming named as 'Click') of a component, use
* <code>
- * $component->raiseEvent('Click');
+ * $component->raiseEvent('OnClick');
* </code>
* To attach an event handler to an event, use one of the following ways,
* <code>
- * $component->Click=$callback; // or $component->Click->add($callback);
- * $$component->attachEventHandler('Click',$callback);
+ * $component->OnClick=$callback; // or $component->OnClick->add($callback);
+ * $$component->attachEventHandler('OnClick',$callback);
* </code>
- * The first two ways make use of the fact that $component->Click refers to
- * the event handler list {@link TList} for the 'Click' event.
+ * The first two ways make use of the fact that $component->OnClick refers to
+ * the event handler list {@link TList} for the 'OnClick' event.
* The variable $callback contains the definition of the event handler that can
* be either a string referring to a global function name, or an array whose
* first element refers to an object and second element a method name/path that
@@ -115,7 +115,7 @@ class TComponent
// getting a property
return $this->$getter();
}
- else if(method_exists($this,'on'.$name))
+ else if(strncasecmp($name,'on',2)===0 && method_exists($this,$name))
{
// getting an event (handler list)
$name=strtolower($name);
@@ -148,7 +148,7 @@ class TComponent
{
$this->$setter($value);
}
- else if(method_exists($this,'on'.$name))
+ else if(strncasecmp($name,'on',2)===0 && method_exists($this,$name))
{
$this->attachEventHandler($name,$value);
}
@@ -244,7 +244,7 @@ class TComponent
*/
public function hasEvent($name)
{
- return method_exists($this,'on'.$name);
+ return strncasecmp($name,'on',2)===0 && method_exists($this,$name);
}
/**
@@ -263,7 +263,7 @@ class TComponent
*/
public function getEventHandlers($name)
{
- if(method_exists($this,'on'.$name))
+ if(strncasecmp($name,'on',2)===0 && method_exists($this,$name))
{
$name=strtolower($name);
if(!isset($this->_e[$name]))
@@ -299,13 +299,13 @@ class TComponent
* event handlers. You may also do these operations like
* getting and setting properties, e.g.,
* <code>
- * $component->Click[]=array($object,'buttonClicked');
- * $component->Click->insert(0,array($object,'buttonClicked'));
+ * $component->OnClick[]=array($object,'buttonClicked');
+ * $component->OnClick->insert(0,array($object,'buttonClicked'));
* </code>
* which are equivalent to the following
* <code>
- * $component->getEventHandlers('Click')->add(array($object,'buttonClicked'));
- * $component->getEventHandlers('Click')->insert(0,array($object,'buttonClicked'));
+ * $component->getEventHandlers('OnClick')->add(array($object,'buttonClicked'));
+ * $component->getEventHandlers('OnClick')->insert(0,array($object,'buttonClicked'));
* </code>
*
* @param string the event name
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php
index 418a0646..a87563b4 100644
--- a/framework/Web/UI/TControl.php
+++ b/framework/Web/UI/TControl.php
@@ -544,17 +544,6 @@ class TControl extends TComponent
}
/**
- * Returns a value indicating whether this control type can take attributes in template.
- * This method can be overriden.
- * Only framework developers and control developers should use this method.
- * @return boolean whether the control allows attributes in template (default=true)
- */
- public function getAllowCustomAttributes()
- {
- return true;
- }
-
- /**
* @return boolean whether viewstate is enabled
*/
public function getEnableViewState($checkParents=false)
@@ -1094,62 +1083,62 @@ class TControl extends TComponent
}
/**
- * This method is invoked when the control enters 'Init' stage.
- * The method raises 'Init' event.
+ * This method is invoked when the control enters 'OnInit' stage.
+ * The method raises 'OnInit' event.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onInit($param)
{
- $this->raiseEvent('Init',$this,$param);
+ $this->raiseEvent('OnInit',$this,$param);
}
/**
- * This method is invoked when the control enters 'Load' stage.
- * The method raises 'Load' event.
+ * This method is invoked when the control enters 'OnLoad' stage.
+ * The method raises 'OnLoad' event.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onLoad($param)
{
- $this->raiseEvent('Load',$this,$param);
+ $this->raiseEvent('OnLoad',$this,$param);
}
/**
- * Raises 'DataBinding' event.
+ * Raises 'OnDataBinding' event.
* This method is invoked when {@link dataBind} is invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onDataBinding($param)
{
- $this->raiseEvent('DataBinding',$this,$param);
+ $this->raiseEvent('OnDataBinding',$this,$param);
}
/**
- * This method is invoked when the control enters 'Unload' stage.
- * The method raises 'Unload' event.
+ * This method is invoked when the control enters 'OnUnload' stage.
+ * The method raises 'OnUnload' event.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onUnload($param)
{
- $this->raiseEvent('Unload',$this,$param);
+ $this->raiseEvent('OnUnload',$this,$param);
}
/**
- * This method is invoked when the control enters 'PreRender' stage.
- * The method raises 'PreRender' event.
+ * This method is invoked when the control enters 'OnPreRender' stage.
+ * The method raises 'OnPreRender' event.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onPreRender($param)
{
- $this->raiseEvent('PreRender',$this,$param);
+ $this->raiseEvent('OnPreRender',$this,$param);
}
/**
@@ -1270,7 +1259,7 @@ class TControl extends TComponent
*/
protected function onSaveState($param)
{
- $this->raiseEvent('SaveState',$this,$param);
+ $this->raiseEvent('OnSaveState',$this,$param);
}
/**
@@ -1281,7 +1270,7 @@ class TControl extends TComponent
*/
protected function onLoadState($param)
{
- $this->raiseEvent('LoadState',$this,$param);
+ $this->raiseEvent('OnLoadState',$this,$param);
}
/**
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php
index 1dcc0b99..c58ebefe 100644
--- a/framework/Web/UI/TPage.php
+++ b/framework/Web/UI/TPage.php
@@ -389,69 +389,69 @@ class TPage extends TTemplateControl
}
/**
- * Raises PreInit event.
- * This method is invoked right before {@link onInit Init} stage.
+ * Raises OnPreInit event.
+ * This method is invoked right before {@link onInit OnInit} stage.
* You may override this method to provide additional initialization that
- * should be done before {@link onInit Init} (e.g. setting {@link setTheme Theme} or
+ * should be done before {@link onInit OnInit} (e.g. setting {@link setTheme Theme} or
* {@link setStyleSheetTheme StyleSheetTheme}).
* Remember to call the parent implementation to ensure PreInit event is raised.
* @param mixed event parameter
*/
protected function onPreInit($param)
{
- $this->raiseEvent('PreInit',$this,$param);
+ $this->raiseEvent('OnPreInit',$this,$param);
}
/**
- * Raises InitComplete event.
- * This method is invoked right after {@link onInit Init} stage and before {@link onLoad Load} stage.
+ * Raises OnInitComplete event.
+ * This method is invoked right after {@link onInit OnInit} stage and before {@link onLoad OnLoad} stage.
* You may override this method to provide additional initialization that
- * should be done after {@link onInit Init}.
+ * should be done after {@link onInit OnInit}.
* Remember to call the parent implementation to ensure InitComplete event is raised.
* @param mixed event parameter
*/
protected function onInitComplete($param)
{
- $this->raiseEvent('InitComplete',$this,$param);
+ $this->raiseEvent('OnInitComplete',$this,$param);
}
/**
- * Raises PreLoad event.
- * This method is invoked right before {@link onLoad Load} stage.
+ * Raises OnPreLoad event.
+ * This method is invoked right before {@link onLoad OnLoad} stage.
* You may override this method to provide additional page loading logic that
- * should be done before {@link onLoad Load}.
+ * should be done before {@link onLoad OnLoad}.
* Remember to call the parent implementation to ensure PreLoad event is raised.
* @param mixed event parameter
*/
protected function onPreLoad($param)
{
- $this->raiseEvent('PreLoad',$this,$param);
+ $this->raiseEvent('OnPreLoad',$this,$param);
}
/**
- * Raises LoadComplete event.
- * This method is invoked right after {@link onLoad Load} stage.
+ * Raises OnLoadComplete event.
+ * This method is invoked right after {@link onLoad OnLoad} stage.
* You may override this method to provide additional page loading logic that
- * should be done after {@link onLoad Load}.
+ * should be done after {@link onLoad OnLoad}.
* Remember to call the parent implementation to ensure LoadComplete event is raised.
* @param mixed event parameter
*/
protected function onLoadComplete($param)
{
- $this->raiseEvent('LoadComplete',$this,$param);
+ $this->raiseEvent('OnLoadComplete',$this,$param);
}
/**
- * Raises PreRenderComplete event.
- * This method is invoked right after {@link onPreRender PreRender} stage.
+ * Raises OnPreRenderComplete event.
+ * This method is invoked right after {@link onPreRender OnPreRender} stage.
* You may override this method to provide additional preparation for page rendering
- * that should be done after {@link onPreRender PreRender}.
+ * that should be done after {@link onPreRender OnPreRender}.
* Remember to call the parent implementation to ensure PreRenderComplete event is raised.
* @param mixed event parameter
*/
protected function onPreRenderComplete($param)
{
- $this->raiseEvent('PreRenderComplete',$this,$param);
+ $this->raiseEvent('OnPreRenderComplete',$this,$param);
$cs=$this->getClientScript();
if($this->_theme)
{
@@ -470,15 +470,15 @@ class TPage extends TTemplateControl
}
/**
- * Raises SaveStateComplete event.
- * This method is invoked right after {@link onSaveState SaveState} stage.
+ * Raises OnSaveStateComplete event.
+ * This method is invoked right after {@link onSaveState OnSaveState} stage.
* You may override this method to provide additional logic after page state is saved.
* Remember to call the parent implementation to ensure SaveStateComplete event is raised.
* @param mixed event parameter
*/
protected function onSaveStateComplete($param)
{
- $this->raiseEvent('SaveStateComplete',$this,$param);
+ $this->raiseEvent('OnSaveStateComplete',$this,$param);
}
/**
@@ -620,7 +620,7 @@ class TPage extends TTemplateControl
/**
* Processes post data.
* @param TMap post data to be processed
- * @param boolean whether this method is invoked before {@link onLoad Load}.
+ * @param boolean whether this method is invoked before {@link onLoad OnLoad}.
*/
protected function processPostData($postData,$beforeLoad)
{
@@ -661,7 +661,7 @@ class TPage extends TTemplateControl
}
/**
- * Raises PostDataChangedEvent for controls whose data have been changed due to the postback.
+ * Raises OnPostDataChangedEvent for controls whose data have been changed due to the postback.
*/
private function raiseChangedEvents()
{
@@ -670,7 +670,7 @@ class TPage extends TTemplateControl
}
/**
- * Raises PostBack event.
+ * Raises OnPostBack event.
*/
private function raisePostBackEvent()
{
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php
index b293c4bc..5a2ba069 100644
--- a/framework/Web/UI/TTemplateManager.php
+++ b/framework/Web/UI/TTemplateManager.php
@@ -301,8 +301,6 @@ class TTemplate extends TComponent implements ITemplate
{
if($control->hasProperty($name))
$this->configureProperty($control,$name,$value);
- else if($control->getAllowCustomAttributes())
- $this->configureAttribute($control,$name,$value);
else
throw new TTemplateRuntimeException('template_property_undefined',get_class($control),$name);
}
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php
index 83b29255..f2243e7c 100644
--- a/framework/Web/UI/TThemeManager.php
+++ b/framework/Web/UI/TThemeManager.php
@@ -333,8 +333,6 @@ class TTheme extends TComponent
else
throw new TConfigurationException('theme_property_readonly',$type,$name);
}
- else if($control->getAllowCustomAttributes())
- $control->getAttributes()->add($name,$value);
else
throw new TConfigurationException('theme_property_undefined',$type,$name);
}
diff --git a/framework/Web/UI/WebControls/TBaseDataList.php b/framework/Web/UI/WebControls/TBaseDataList.php
index 351fbbc9..c68be5f9 100644
--- a/framework/Web/UI/WebControls/TBaseDataList.php
+++ b/framework/Web/UI/WebControls/TBaseDataList.php
@@ -230,14 +230,14 @@ abstract class TBaseDataList extends TDataBoundControl
}
/**
- * Raises SelectedIndexChanged event.
+ * Raises OnSelectedIndexChanged event.
* This method is invoked when a different item is selected
* in a data listing control between posts to the server.
* @param mixed event parameter
*/
public function onSelectedIndexChanged($param)
{
- $this->raiseEvent('SelectedIndexChanged',$this,$param);
+ $this->raiseEvent('OnSelectedIndexChanged',$this,$param);
}
}
diff --git a/framework/Web/UI/WebControls/TBoundColumn.php b/framework/Web/UI/WebControls/TBoundColumn.php
index 84f52034..e9dc0412 100644
--- a/framework/Web/UI/WebControls/TBoundColumn.php
+++ b/framework/Web/UI/WebControls/TBoundColumn.php
@@ -108,13 +108,13 @@ class TBoundColumn extends TDataGridColumn
$control=$textBox;
}
if(($dataField=$this->getDataField())!=='')
- $control->attachEventHandler('DataBinding',array($this,'dataBindColumn'));
+ $control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
break;
case 'Item':
case 'AlternatingItem':
case 'SelectedItem':
if(($dataField=$this->getDataField())!=='')
- $cell->attachEventHandler('DataBinding',array($this,'dataBindColumn'));
+ $cell->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
break;
}
}
diff --git a/framework/Web/UI/WebControls/TBulletedList.php b/framework/Web/UI/WebControls/TBulletedList.php
index 63183233..d36268ce 100644
--- a/framework/Web/UI/WebControls/TBulletedList.php
+++ b/framework/Web/UI/WebControls/TBulletedList.php
@@ -29,7 +29,7 @@ Prado::using('System.Web.UI.WebControls.TListControl');
* is displayed as a hyperlink whose URL is given by the item value, and the
* {@link setTarget Target} property can be used to specify the target browser window;
* When the mode is 'LinkButton', each item is displayed as a link button which
- * posts back to the page if a user clicks on that and the event {@link onClick Click}
+ * posts back to the page if a user clicks on that and the event {@link onClick OnClick}
* will be raised under such a circumstance.
*
* @author Qiang Xue <qiang.xue@gmail.com>
@@ -55,7 +55,7 @@ class TBulletedList extends TListControl implements IPostBackEventHandler
* This method is required by {@link IPostBackEventHandler} interface.
* If {@link getCausesValidation CausesValidation} is true, it will
* invoke the page's {@link TPage::validate validate} method first.
- * It will raise {@link onClick Click} events.
+ * It will raise {@link onClick OnClick} events.
* This method is mainly used by framework and control developers.
* @param TEventParameter the event parameter
*/
@@ -202,14 +202,14 @@ class TBulletedList extends TListControl implements IPostBackEventHandler
}
/**
- * Raises 'Click' event.
+ * Raises 'OnClick' event.
* This method is invoked when the {@link getDisplayMode DisplayMode} is 'LinkButton'
* and end-users click on one of the buttons.
* @param TBulletedListEventParameter event parameter.
*/
public function onClick($param)
{
- $this->raiseEvent('Click',$this,$param);
+ $this->raiseEvent('OnClick',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/TButton.php b/framework/Web/UI/WebControls/TButton.php
index 02f35389..968a783a 100644
--- a/framework/Web/UI/WebControls/TButton.php
+++ b/framework/Web/UI/WebControls/TButton.php
@@ -22,7 +22,7 @@
* associated with the button. This allows you to create multiple TLinkButton
* components on a Web page and programmatically determine which one is clicked
* with what parameter. You can provide an event handler for
- * {@link onCommand Command} event to programmatically control the actions performed
+ * {@link onCommand OnCommand} event to programmatically control the actions performed
* when the command button is clicked. In the event handler, you can determine
* the {@link setCommandName CommandName} property value and
* the {@link setCommandParameter CommandParameter} property value
@@ -33,7 +33,7 @@
* A <b>submit</b> button does not have a command name associated with the button
* and clicking on it simply posts the Web page back to the server.
* By default, a TButton component is a submit button.
- * You can provide an event handler for the {@link onClick Click} event
+ * You can provide an event handler for the {@link onClick OnClick} event
* to programmatically control the actions performed when the submit button is clicked.
*
* Clicking on button can trigger form validation, if
@@ -118,26 +118,26 @@ class TButton extends TWebControl implements IPostBackEventHandler
/**
* This method is invoked when the button is clicked.
- * The method raises 'Click' event to fire up the event handlers.
+ * The method raises 'OnClick' event to fire up the event handlers.
* If you override this method, be sure to call the parent implementation
* so that the event handler can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
public function onClick($param)
{
- $this->raiseEvent('Click',$this,$param);
+ $this->raiseEvent('OnClick',$this,$param);
}
/**
* This method is invoked when the button is clicked.
- * The method raises 'Command' event to fire up the event handlers.
+ * The method raises 'OnCommand' event to fire up the event handlers.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TCommandEventParameter event parameter to be passed to the event handlers
*/
public function onCommand($param)
{
- $this->raiseEvent('Command',$this,$param);
+ $this->raiseEvent('OnCommand',$this,$param);
$this->raiseBubbleEvent($this,$param);
}
@@ -146,7 +146,7 @@ class TButton extends TWebControl implements IPostBackEventHandler
* This method is required by {@link IPostBackEventHandler} interface.
* If {@link getCausesValidation CausesValidation} is true, it will
* invoke the page's {@link TPage::validate validate} method first.
- * It will raise {@link onClick Click} and {@link onCommand Command} events.
+ * It will raise {@link onClick OnClick} and {@link onCommand OnCommand} events.
* This method is mainly used by framework and control developers.
* @param TEventParameter the event parameter
*/
@@ -191,7 +191,7 @@ class TButton extends TWebControl implements IPostBackEventHandler
}
/**
- * @return string the command name associated with the {@link onCommand Command} event.
+ * @return string the command name associated with the {@link onCommand OnCommand} event.
*/
public function getCommandName()
{
@@ -199,7 +199,7 @@ class TButton extends TWebControl implements IPostBackEventHandler
}
/**
- * Sets the command name associated with the {@link onCommand Command} event.
+ * Sets the command name associated with the {@link onCommand OnCommand} event.
* @param string the text caption to be set
*/
public function setCommandName($value)
@@ -208,7 +208,7 @@ class TButton extends TWebControl implements IPostBackEventHandler
}
/**
- * @return string the parameter associated with the {@link onCommand Command} event
+ * @return string the parameter associated with the {@link onCommand OnCommand} event
*/
public function getCommandParameter()
{
@@ -216,7 +216,7 @@ class TButton extends TWebControl implements IPostBackEventHandler
}
/**
- * Sets the parameter associated with the {@link onCommand Command} event.
+ * Sets the parameter associated with the {@link onCommand OnCommand} event.
* @param string the text caption to be set
*/
public function setCommandParameter($value)
diff --git a/framework/Web/UI/WebControls/TButtonColumn.php b/framework/Web/UI/WebControls/TButtonColumn.php
index 34b4ba51..4555aa24 100644
--- a/framework/Web/UI/WebControls/TButtonColumn.php
+++ b/framework/Web/UI/WebControls/TButtonColumn.php
@@ -186,7 +186,7 @@ class TButtonColumn extends TDataGridColumn
$button->setCausesValidation($this->getCausesValidation());
$button->setValidationGroup($this->getValidationGroup());
if($this->getDataTextField()!=='')
- $button->attachEventHandler('DataBinding',array($this,'dataBindColumn'));
+ $button->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
$cell->getControls()->add($button);
}
}
diff --git a/framework/Web/UI/WebControls/TCheckBox.php b/framework/Web/UI/WebControls/TCheckBox.php
index 385eca06..ae6dc8e4 100644
--- a/framework/Web/UI/WebControls/TCheckBox.php
+++ b/framework/Web/UI/WebControls/TCheckBox.php
@@ -20,10 +20,10 @@
* property.
*
* To determine whether the TCheckBox component is checked, test the {@link getChecked Checked}
- * property. The {@link onCheckedChanged CheckedChanged} event is raised when
+ * property. The {@link onCheckedChanged OnCheckedChanged} event is raised when
* the {@link getChecked Checked} state of the TCheckBox component changes
* between posts to the server. You can provide an event handler for
- * the {@link onCheckedChanged CheckedChanged} event to to programmatically
+ * the {@link onCheckedChanged OnCheckedChanged} event to to programmatically
* control the actions performed when the state of the TCheckBox component changes
* between posts to the server.
*
@@ -71,7 +71,7 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl
/**
* Raises postdata changed event.
- * This method raises {@link onCheckedChanged CheckedChanged} event.
+ * This method raises {@link onCheckedChanged OnCheckedChanged} event.
* This method is primarly used by framework developers.
*/
public function raisePostDataChangedEvent()
@@ -87,14 +87,14 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl
}
/**
- * Raises <b>CheckedChanged</b> event when {@link getChecked Checked} changes value during postback.
+ * Raises <b>OnCheckedChanged</b> event when {@link getChecked Checked} changes value during postback.
* If you override this method, be sure to call the parent implementation
* so that the event delegates can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onCheckedChanged($param)
{
- $this->raiseEvent('CheckedChanged',$this,$param);
+ $this->raiseEvent('OnCheckedChanged',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/TCustomValidator.php b/framework/Web/UI/WebControls/TCustomValidator.php
index 546f015b..e92ae828 100644
--- a/framework/Web/UI/WebControls/TCustomValidator.php
+++ b/framework/Web/UI/WebControls/TCustomValidator.php
@@ -22,7 +22,7 @@ Prado::using('System.Web.UI.WebControls.TBaseValidator');
* server-side or client-side or both) on an input component.
*
* To create a server-side validation function, provide a handler for
- * the {@link onServerValidate ServerValidate} event that performs the validation.
+ * the {@link onServerValidate OnServerValidate} event that performs the validation.
* The data string of the input control to validate can be accessed
* by {@link TServerValidateEventParameter::getValue Value} of the event parameter.
* The result of the validation should be stored in the
@@ -84,17 +84,17 @@ class TCustomValidator extends TBaseValidator
/**
* This method is invoked when the server side validation happens.
- * It will raise the <b>ServerValidate</b> event.
+ * It will raise the <b>OnServerValidate</b> event.
* The method also allows derived classes to handle the event without attaching a delegate.
* <b>Note</b> The derived classes should call parent implementation
- * to ensure the <b>ServerValidate</b> event is raised.
+ * to ensure the <b>OnServerValidate</b> event is raised.
* @param string the value to be validated
* @return boolean whether the value is valid
*/
public function onServerValidate($value)
{
$param=new TServerValidateEventParameter($value,true);
- $this->raiseEvent('ServerValidate',$this,$param);
+ $this->raiseEvent('OnServerValidate',$this,$param);
return $param->getIsValid();
}
diff --git a/framework/Web/UI/WebControls/TDataBoundControl.php b/framework/Web/UI/WebControls/TDataBoundControl.php
index aa177f07..5145b532 100644
--- a/framework/Web/UI/WebControls/TDataBoundControl.php
+++ b/framework/Web/UI/WebControls/TDataBoundControl.php
@@ -229,7 +229,7 @@ abstract class TDataBoundControl extends TWebControl
if(($view=$dataSource->getView($this->getDataMember()))===null)
throw new TInvalidDataValueException('databoundcontrol_datamember_invalid',$this->getDataMember());
if($this->_currentViewIsFromDataSourceID=$this->getUsingDataSourceID())
- $view->attachEventHandler('DataSourceViewChanged',array($this,'dataSourceViewChanged'));
+ $view->attachEventHandler('OnDataSourceViewChanged',array($this,'dataSourceViewChanged'));
$this->_currentView=$view;
}
else
@@ -264,17 +264,17 @@ abstract class TDataBoundControl extends TWebControl
abstract protected function performDataBinding($data);
/**
- * Raises <b>DataBound</b> event.
+ * Raises <b>OnDataBound</b> event.
* This method should be invoked after a databind is performed.
* It is mainly used by framework and component developers.
*/
public function onDataBound($param)
{
- $this->raiseEvent('DataBound',$this,$param);
+ $this->raiseEvent('OnDataBound',$this,$param);
}
/**
- * Sets page's <b>PreLoad</b> event handler as {@link onPagePreLoad}.
+ * Sets page's <b>OnPreLoad</b> event handler as {@link onPagePreLoad}.
* If viewstate is disabled and the current request is a postback,
* {@link setRequiresDataBinding RequiresDataBinding} will be set true.
* This method overrides the parent implementation.
@@ -284,7 +284,7 @@ abstract class TDataBoundControl extends TWebControl
{
parent::onInit($param);
$page=$this->getPage();
- $page->attachEventHandler('PreLoad',array($this,'onPagePreLoad'));
+ $page->attachEventHandler('OnPreLoad',array($this,'onPagePreLoad'));
}
/**
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php
index 318fc8b3..646ead01 100644
--- a/framework/Web/UI/WebControls/TDataGrid.php
+++ b/framework/Web/UI/WebControls/TDataGrid.php
@@ -554,12 +554,12 @@ class TDataGrid extends TBaseDataList
/**
* Handles <b>BubbleEvent</b>.
* This method overrides parent's implementation to handle
- * {@link onItemCommand ItemCommand} event which is bubbled from
+ * {@link onItemCommand OnItemCommand} event which is bubbled from
* {@link TDataGridItem} child controls.
* If the event parameter is {@link TDataGridCommandEventParameter} and
* the command name is a recognized one, which includes 'select', 'edit',
* 'delete', 'update', and 'cancel' (case-insensitive), then a
- * corresponding command event is also raised (such as {@link onEditCommand EditCommand}).
+ * corresponding command event is also raised (such as {@link onEditCommand OnEditCommand}).
* This method should only be used by control developers.
* @param TControl the sender of the event
* @param TEventParameter event parameter
@@ -619,100 +619,100 @@ class TDataGrid extends TBaseDataList
}
/**
- * Raises <b>CancelCommand</b> event.
+ * Raises <b>OnCancelCommand</b> event.
* This method is invoked when a button control raises<b>Command</b> event
* with<b>cancel</b> command name.
* @param TDataGridCommandEventParameter event parameter
*/
public function onCancelCommand($param)
{
- $this->raiseEvent('CancelCommand',$this,$param);
+ $this->raiseEvent('OnCancelCommand',$this,$param);
}
/**
- * Raises <b>DeleteCommand</b> event.
+ * Raises <b>OnDeleteCommand</b> event.
* This method is invoked when a button control raises <b>Command</b> event
* with <b>delete</b> command name.
* @param TDataGridCommandEventParameter event parameter
*/
public function onDeleteCommand($param)
{
- $this->raiseEvent('DeleteCommand',$this,$param);
+ $this->raiseEvent('OnDeleteCommand',$this,$param);
}
/**
- * Raises <b>EditCommand</b> event.
+ * Raises <b>OnEditCommand</b> event.
* This method is invoked when a button control raises <b>Command</b> event
* with <b>edit</b> command name.
* @param TDataGridCommandEventParameter event parameter
*/
public function onEditCommand($param)
{
- $this->raiseEvent('EditCommand',$this,$param);
+ $this->raiseEvent('OnEditCommand',$this,$param);
}
/**
- * Raises <b>ItemCommand</b> event.
+ * Raises <b>OnItemCommand</b> event.
* This method is invoked when a button control raises <b>Command</b> event.
* @param TDataGridItemCommandEventParameter event parameter
*/
public function onItemCommand($param)
{
- $this->raiseEvent('ItemCommand',$this,$param);
+ $this->raiseEvent('OnItemCommand',$this,$param);
}
/**
- * Raises <b>SortCommand</b> event.
+ * Raises <b>OnSortCommand</b> event.
* This method is invoked when a button control raises <b>Command</b> event
* with <b>sort</b> command name.
* @param TDataGridSortCommandEventParameter event parameter
*/
public function onSortCommand($param)
{
- $this->raiseEvent('SortCommand',$this,$param);
+ $this->raiseEvent('OnSortCommand',$this,$param);
}
/**
- * Raises <b>UpdateCommand</b> event.
+ * Raises <b>OnUpdateCommand</b> event.
* This method is invoked when a button control raises <b>Command</b> event
* with <b>update</b> command name.
* @param TDataGridCommandEventParameter event parameter
*/
public function onUpdateCommand($param)
{
- $this->raiseEvent('UpdateCommand',$this,$param);
+ $this->raiseEvent('OnUpdateCommand',$this,$param);
}
/**
- * Raises <b>ItemCreated</b> event.
+ * Raises <b>OnItemCreated</b> event.
* This method is invoked right after a datagrid item is created and before
* added to page hierarchy.
* @param TDataGridItemEventParameter event parameter
*/
public function onItemCreated($param)
{
- $this->raiseEvent('ItemCreated',$this,$param);
+ $this->raiseEvent('OnItemCreated',$this,$param);
}
/**
- * Raises <b>ItemDataBound</b> event.
+ * Raises <b>OnItemDataBound</b> event.
* This method is invoked for each datagrid item after it performs
* databinding.
* @param TDataGridItemEventParameter event parameter
*/
public function onItemDataBound($param)
{
- $this->raiseEvent('ItemDataBound',$this,$param);
+ $this->raiseEvent('OnItemDataBound',$this,$param);
}
/**
- * Raises <b>PageIndexChanged</b> event.
+ * Raises <b>OnPageIndexChanged</b> event.
* This method is invoked when current page is changed.
* @param TDataGridPageChangedEventParameter event parameter
*/
public function onPageIndexChanged($param)
{
- $this->raiseEvent('PageIndexChanged',$this,$param);
+ $this->raiseEvent('OnPageIndexChanged',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/TDataList.php b/framework/Web/UI/WebControls/TDataList.php
index 6f61f8ef..38045f77 100644
--- a/framework/Web/UI/WebControls/TDataList.php
+++ b/framework/Web/UI/WebControls/TDataList.php
@@ -71,20 +71,20 @@ Prado::using('System.Web.UI.WebControls.TRepeatInfo');
* The header and footer items can be accessed by {@link getHeader Header}
* and {@link getFooter Footer} properties, respectively.
*
- * When TDataList creates an item, it will raise an {@link onItemCreated ItemCreated}
+ * When TDataList creates an item, it will raise an {@link onItemCreated OnItemCreated}
* so that you may customize the newly created item.
* When databinding is performed by TDataList, for each item once it has finished
- * databinding, an {@link onItemDataBound ItemDataBound} event will be raised.
+ * databinding, an {@link onItemDataBound OnItemDataBound} event will be raised.
*
- * When an item is selected by an end-user, a {@link onSelectedIndexChanged SelectedIndexChanged}
+ * When an item is selected by an end-user, a {@link onSelectedIndexChanged OnSelectedIndexChanged}
* event will be raised. Note, the selected index may not be actually changed.
* The event mainly informs the server side that the end-user has made a selection.
*
- * TDataList raises an {@link onItemCommand ItemCommand} whenever a button control
+ * TDataList raises an {@link onItemCommand OnItemCommand} whenever a button control
* within some TDataList item raises a <b>Command</b> event. If the command name
* is one of the followings: 'edit', 'update', 'select', 'delete', 'cancel' (case-insensitive),
* another event will also be raised. For example, if the command name is 'edit',
- * then the new event is {@link onEditCommand SelectCommand}.
+ * then the new event is {@link onEditCommand OnSelectCommand}.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
@@ -603,12 +603,12 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs
/**
* Handles <b>BubbleEvent</b>.
* This method overrides parent's implementation to handle
- * {@link onItemCommand ItemCommand} event which is bubbled from
+ * {@link onItemCommand OnItemCommand} event which is bubbled from
* {@link TDataListItem} child controls.
* If the event parameter is {@link TDataListCommandEventParameter} and
* the command name is a recognized one, which includes 'select', 'edit',
* 'delete', 'update', and 'cancel' (case-insensitive), then a
- * corresponding command event is also raised (such as {@link onEditCommand EditCommand}).
+ * corresponding command event is also raised (such as {@link onEditCommand OnEditCommand}).
* This method should only be used by control developers.
* @param TControl the sender of the event
* @param TEventParameter event parameter
@@ -652,7 +652,7 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs
/**
- * Raises <b>ItemCreated</b> event.
+ * Raises <b>OnItemCreated</b> event.
* This method is invoked after a data list item is created and instantiated with
* template, but before added to the page hierarchy.
* The {@link TDataListItem} control responsible for the event
@@ -663,11 +663,11 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs
*/
public function onItemCreated($param)
{
- $this->raiseEvent('ItemCreated',$this,$param);
+ $this->raiseEvent('OnItemCreated',$this,$param);
}
/**
- * Raises <b>ItemDataBound</b> event.
+ * Raises <b>OnItemDataBound</b> event.
* This method is invoked right after an item is data bound.
* The {@link TDataListItem} control responsible for the event
* can be determined from the event parameter.
@@ -677,62 +677,62 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs
*/
public function onItemDataBound($param)
{
- $this->raiseEvent('ItemDataBound',$this,$param);
+ $this->raiseEvent('OnItemDataBound',$this,$param);
}
/**
- * Raises <b>ItemCommand</b> event.
+ * Raises <b>OnItemCommand</b> event.
* This method is invoked when a child control of the data list
* raises an <b>Command</b> event.
* @param TDataListCommandEventParameter event parameter
*/
protected function onItemCommand($param)
{
- $this->raiseEvent('ItemCommand',$this,$param);
+ $this->raiseEvent('OnItemCommand',$this,$param);
}
/**
- * Raises <b>EditCommand</b> event.
+ * Raises <b>OnEditCommand</b> event.
* This method is invoked when a child control of the data list
* raises an <b>Command</b> event and the command name is 'edit' (case-insensitive).
* @param TDataListCommandEventParameter event parameter
*/
protected function onEditCommand($param)
{
- $this->raiseEvent('EditCommand',$this,$param);
+ $this->raiseEvent('OnEditCommand',$this,$param);
}
/**
- * Raises <b>DeleteCommand</b> event.
+ * Raises <b>OnDeleteCommand</b> event.
* This method is invoked when a child control of the data list
* raises an <b>Command</b> event and the command name is 'delete' (case-insensitive).
* @param TDataListCommandEventParameter event parameter
*/
protected function onDeleteCommand($param)
{
- $this->raiseEvent('DeleteCommand',$this,$param);
+ $this->raiseEvent('OnDeleteCommand',$this,$param);
}
/**
- * Raises <b>UpdateCommand</b> event.
+ * Raises <b>OnUpdateCommand</b> event.
* This method is invoked when a child control of the data list
* raises an <b>Command</b> event and the command name is 'update' (case-insensitive).
* @param TDataListCommandEventParameter event parameter
*/
protected function onUpdateCommand($param)
{
- $this->raiseEvent('UpdateCommand',$this,$param);
+ $this->raiseEvent('OnUpdateCommand',$this,$param);
}
/**
- * Raises <b>CancelCommand</b> event.
+ * Raises <b>OnCancelCommand</b> event.
* This method is invoked when a child control of the data list
* raises an <b>Command</b> event and the command name is 'cancel' (case-insensitive).
* @param TDataListCommandEventParameter event parameter
*/
protected function onCancelCommand($param)
{
- $this->raiseEvent('CancelCommand',$this,$param);
+ $this->raiseEvent('OnCancelCommand',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/TDataSourceControl.php b/framework/Web/UI/WebControls/TDataSourceControl.php
index eaf39199..51b06f9a 100644
--- a/framework/Web/UI/WebControls/TDataSourceControl.php
+++ b/framework/Web/UI/WebControls/TDataSourceControl.php
@@ -47,7 +47,7 @@ abstract class TDataSourceControl extends TControl implements IDataSource
public function onDataSourceChanged($param)
{
- $this->raiseEvent('DataSourceChanged',$this,$param);
+ $this->raiseEvent('OnDataSourceChanged',$this,$param);
}
public function focus()
diff --git a/framework/Web/UI/WebControls/TDataSourceView.php b/framework/Web/UI/WebControls/TDataSourceView.php
index ceed981f..ab79e74c 100644
--- a/framework/Web/UI/WebControls/TDataSourceView.php
+++ b/framework/Web/UI/WebControls/TDataSourceView.php
@@ -171,7 +171,7 @@ abstract class TDataSourceView extends TComponent
protected function onDataSourceViewChanged($param)
{
- $this->raiseEvent('DataSourceViewChanged',$this,$param);
+ $this->raiseEvent('OnDataSourceViewChanged',$this,$param);
}
}
diff --git a/framework/Web/UI/WebControls/TFileUpload.php b/framework/Web/UI/WebControls/TFileUpload.php
index ba47f4d9..4a3d3a08 100644
--- a/framework/Web/UI/WebControls/TFileUpload.php
+++ b/framework/Web/UI/WebControls/TFileUpload.php
@@ -23,7 +23,7 @@
* file size information. If the upload is not successful, {@link getErrorCode ErrorCode}
* contains the error code describing the cause of failure.
*
- * TFileUpload raises {@link onFileUpload FileUpload} event if a file is uploaded
+ * TFileUpload raises {@link onFileUpload OnFileUpload} event if a file is uploaded
* (whether it succeeds or not).
*
* @author Marcus Nyeholt <tanus@users.sourceforge.net>, Qiang Xue <qiang.xue@gmail.com>
@@ -224,14 +224,14 @@ class TFileUpload extends TWebControl implements IPostBackDataHandler, IValidata
/**
* This method is invoked when a file is uploaded during a postback.
- * The method raises <b>FileUpload</b> event to fire up the event handler.
+ * The method raises <b>OnFileUpload</b> event to fire up the event handler.
* If you override this method, be sure to call the parent implementation
* so that the event delegates can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onFileUpload($param)
{
- $this->raiseEvent('FileUpload',$this,$param);
+ $this->raiseEvent('OnFileUpload',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/THiddenField.php b/framework/Web/UI/WebControls/THiddenField.php
index fe758c6b..7b112b0f 100644
--- a/framework/Web/UI/WebControls/THiddenField.php
+++ b/framework/Web/UI/WebControls/THiddenField.php
@@ -15,7 +15,7 @@
*
* THiddenField displays a hidden input field on a Web page.
* The value of the input field can be accessed via {@link getValue Value} property.
- * If upon postback the value is changed, a {@link onValueChanged ValueChanged}
+ * If upon postback the value is changed, a {@link onValueChanged OnValueChanged}
* event will be raised.
*
* @author Qiang Xue <qiang.xue@gmail.com>
@@ -94,14 +94,14 @@ class THiddenField extends TControl implements IPostBackDataHandler
/**
* This method is invoked when the value of the {@link getValue Value} property changes between posts to the server.
- * The method raises 'ValueChanged' event to fire up the event delegates.
+ * The method raises 'OnValueChanged' event to fire up the event delegates.
* If you override this method, be sure to call the parent implementation
* so that the attached event handlers can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
public function onValueChanged($param)
{
- $this->raiseEvent('ValueChanged',$this,$param);
+ $this->raiseEvent('OnValueChanged',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/THyperLinkColumn.php b/framework/Web/UI/WebControls/THyperLinkColumn.php
index 34991845..6a14ea5b 100644
--- a/framework/Web/UI/WebControls/THyperLinkColumn.php
+++ b/framework/Web/UI/WebControls/THyperLinkColumn.php
@@ -176,7 +176,7 @@ class THyperLinkColumn extends TDataGridColumn
$link->setNavigateUrl($this->getNavigateUrl());
$link->setTarget($this->getTarget());
if($this->getDataTextField()!=='' || $this->getDataNavigateUrlField()!=='')
- $link->attachEventHandler('DataBinding',array($this,'dataBindColumn'));
+ $link->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
$cell->getControls()->add($link);
}
}
diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php
index 7674cf56..dfa1752c 100644
--- a/framework/Web/UI/WebControls/TImageButton.php
+++ b/framework/Web/UI/WebControls/TImageButton.php
@@ -27,7 +27,7 @@ Prado::using('System.Web.UI.WebControls.TImage');
* associated with the button. This allows you to create multiple TLinkButton
* components on a Web page and programmatically determine which one is clicked
* with what parameter. You can provide an event handler for
- * {@link onCommand Command} event to programmatically control the actions performed
+ * {@link onCommand OnCommand} event to programmatically control the actions performed
* when the command button is clicked. In the event handler, you can determine
* the {@link setCommandName CommandName} property value and
* the {@link setCommandParameter CommandParameter} property value
@@ -38,9 +38,9 @@ Prado::using('System.Web.UI.WebControls.TImage');
* A <b>submit</b> button does not have a command name associated with the button
* and clicking on it simply posts the Web page back to the server.
* By default, a TImageButton control is a submit button.
- * You can provide an event handler for the {@link onClick Click} event
+ * You can provide an event handler for the {@link onClick OnClick} event
* to programmatically control the actions performed when the submit button is clicked.
- * The coordinates of the clicking point can be obtained from the {@link onClick Click}
+ * The coordinates of the clicking point can be obtained from the {@link onClick OnClick}
* event parameter, which is of type {@link TImageClickEventParameter}.
*
* Clicking on button can trigger form validation, if
@@ -147,26 +147,26 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
/**
* This method is invoked when the button is clicked.
- * The method raises 'Click' event to fire up the event handlers.
+ * The method raises 'OnClick' event to fire up the event handlers.
* If you override this method, be sure to call the parent implementation
* so that the event handler can be invoked.
* @param TImageClickEventParameter event parameter to be passed to the event handlers
*/
public function onClick($param)
{
- $this->raiseEvent('Click',$this,$param);
+ $this->raiseEvent('OnClick',$this,$param);
}
/**
* This method is invoked when the button is clicked.
- * The method raises 'Command' event to fire up the event handlers.
+ * The method raises 'OnCommand' event to fire up the event handlers.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TCommandEventParameter event parameter to be passed to the event handlers
*/
public function onCommand($param)
{
- $this->raiseEvent('Command',$this,$param);
+ $this->raiseEvent('OnCommand',$this,$param);
$this->raiseBubbleEvent($this,$param);
}
@@ -175,7 +175,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
* This method is required by {@link IPostBackEventHandler} interface.
* If {@link getCausesValidation CausesValidation} is true, it will
* invoke the page's {@link TPage::validate validate} method first.
- * It will raise {@link onClick Click} and {@link onCommand Command} events.
+ * It will raise {@link onClick OnClick} and {@link onCommand OnCommand} events.
* This method is mainly used by framework and control developers.
* @param TEventParameter the event parameter
*/
@@ -204,7 +204,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
}
/**
- * @return string the command name associated with the {@link onCommand Command} event.
+ * @return string the command name associated with the {@link onCommand OnCommand} event.
*/
public function getCommandName()
{
@@ -212,7 +212,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
}
/**
- * Sets the command name associated with the {@link onCommand Command} event.
+ * Sets the command name associated with the {@link onCommand OnCommand} event.
* @param string the text caption to be set
*/
public function setCommandName($value)
@@ -221,7 +221,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
}
/**
- * @return string the parameter associated with the {@link onCommand Command} event
+ * @return string the parameter associated with the {@link onCommand OnCommand} event
*/
public function getCommandParameter()
{
@@ -229,7 +229,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
}
/**
- * Sets the parameter associated with the {@link onCommand Command} event.
+ * Sets the parameter associated with the {@link onCommand OnCommand} event.
* @param string the text caption to be set
*/
public function setCommandParameter($value)
diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php
index 113a3a69..c24119e5 100644
--- a/framework/Web/UI/WebControls/TLinkButton.php
+++ b/framework/Web/UI/WebControls/TLinkButton.php
@@ -24,7 +24,7 @@
* associated with the button. This allows you to create multiple TLinkButton
* components on a Web page and programmatically determine which one is clicked
* with what parameter. You can provide an event handler for
- * {@link onCommand Command} event to programmatically control the actions performed
+ * {@link onCommand OnCommand} event to programmatically control the actions performed
* when the command button is clicked. In the event handler, you can determine
* the {@link setCommandName CommandName} property value and
* the {@link setCommandParameter CommandParameter} property value
@@ -35,7 +35,7 @@
* A <b>submit</b> button does not have a command name associated with the button
* and clicking on it simply posts the Web page back to the server.
* By default, a TLinkButton component is a submit button.
- * You can provide an event handler for the {@link onClick Click} event
+ * You can provide an event handler for the {@link onClick OnClick} event
* to programmatically control the actions performed when the submit button is clicked.
*
* Clicking on button can trigger form validation, if
@@ -138,7 +138,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
}
/**
- * @return string the command name associated with the {@link onCommand Command} event.
+ * @return string the command name associated with the {@link onCommand OnCommand} event.
*/
public function getCommandName()
{
@@ -146,7 +146,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
}
/**
- * Sets the command name associated with the {@link onCommand Command} event.
+ * Sets the command name associated with the {@link onCommand OnCommand} event.
* @param string the text caption to be set
*/
public function setCommandName($value)
@@ -155,7 +155,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
}
/**
- * @return string the parameter associated with the {@link onCommand Command} event
+ * @return string the parameter associated with the {@link onCommand OnCommand} event
*/
public function getCommandParameter()
{
@@ -163,7 +163,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
}
/**
- * Sets the parameter associated with the {@link onCommand Command} event.
+ * Sets the parameter associated with the {@link onCommand OnCommand} event.
* @param string the text caption to be set
*/
public function setCommandParameter($value)
@@ -209,7 +209,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
* This method is required by {@link IPostBackEventHandler} interface.
* If {@link getCausesValidation CausesValidation} is true, it will
* invoke the page's {@link TPage::validate validate} method first.
- * It will raise {@link onClick Click} and {@link onCommand Command} events.
+ * It will raise {@link onClick OnClick} and {@link onCommand OnCommand} events.
* This method is mainly used by framework and control developers.
* @param TEventParameter the event parameter
*/
@@ -223,26 +223,26 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
/**
* This method is invoked when the button is clicked.
- * The method raises 'Click' event to fire up the event handlers.
+ * The method raises 'OnClick' event to fire up the event handlers.
* If you override this method, be sure to call the parent implementation
* so that the event handler can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
public function onClick($param)
{
- $this->raiseEvent('Click',$this,$param);
+ $this->raiseEvent('OnClick',$this,$param);
}
/**
* This method is invoked when the button is clicked.
- * The method raises 'Command' event to fire up the event handlers.
+ * The method raises 'OnCommand' event to fire up the event handlers.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TCommandEventParameter event parameter to be passed to the event handlers
*/
public function onCommand($param)
{
- $this->raiseEvent('Command',$this,$param);
+ $this->raiseEvent('OnCommand',$this,$param);
$this->raiseBubbleEvent($this,$param);
}
}
diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php
index d15a7bf1..38a43173 100644
--- a/framework/Web/UI/WebControls/TListControl.php
+++ b/framework/Web/UI/WebControls/TListControl.php
@@ -497,25 +497,25 @@ abstract class TListControl extends TDataBoundControl
}
/**
- * Raises SelectedIndexChanged event when selection is changed.
+ * Raises OnSelectedIndexChanged event when selection is changed.
* This method is invoked when the list control has its selection changed
* by end-users.
* @param TEventParameter event parameter
*/
public function onSelectedIndexChanged($param)
{
- $this->raiseEvent('SelectedIndexChanged',$this,$param);
+ $this->raiseEvent('OnSelectedIndexChanged',$this,$param);
}
/**
- * Raises TextChanged event when selection is changed.
+ * Raises OnTextChanged event when selection is changed.
* This method is invoked when the list control has its selection changed
* by end-users.
* @param TEventParameter event parameter
*/
public function onTextChanged($param)
{
- $this->raiseEvent('TextChanged',$this,$param);
+ $this->raiseEvent('OnTextChanged',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/TRadioButton.php b/framework/Web/UI/WebControls/TRadioButton.php
index d965b64f..ee53107a 100644
--- a/framework/Web/UI/WebControls/TRadioButton.php
+++ b/framework/Web/UI/WebControls/TRadioButton.php
@@ -29,10 +29,10 @@ Prado::using('System.Web.UI.WebControls.TRadioButtonList');
* property.
*
* To determine whether the TRadioButton component is checked, test the {@link getChecked Checked}
- * property. The {@link onCheckedChanged CheckedChanged} event is raised when
+ * property. The {@link onCheckedChanged OnCheckedChanged} event is raised when
* the {@link getChecked Checked} state of the TRadioButton component changes
* between posts to the server. You can provide an event handler for
- * the {@link onCheckedChanged CheckedChanged} event to to programmatically
+ * the {@link onCheckedChanged OnCheckedChanged} event to to programmatically
* control the actions performed when the state of the TRadioButton component changes
* between posts to the server.
*
diff --git a/framework/Web/UI/WebControls/TRepeater.php b/framework/Web/UI/WebControls/TRepeater.php
index a75fd63e..92d87b64 100644
--- a/framework/Web/UI/WebControls/TRepeater.php
+++ b/framework/Web/UI/WebControls/TRepeater.php
@@ -39,15 +39,15 @@ Prado::using('System.Web.UI.WebControls.TDataBoundControl');
* The header and footer items can be accessed by {@link getHeader Header}
* and {@link getFooter Footer} properties, respectively.
*
- * When TRepeater creates an item, it will raise an {@link onItemCreated ItemCreated}
+ * When TRepeater creates an item, it will raise an {@link onItemCreated OnItemCreated}
* so that you may customize the newly created item.
* When databinding is performed by TRepeater, for each item once it has finished
- * databinding, an {@link onItemDataBound ItemDataBound} event will be raised.
+ * databinding, an {@link onItemDataBound OnItemDataBound} event will be raised.
*
- * TRepeater raises an {@link onItemCommand ItemCommand} whenever a button control
+ * TRepeater raises an {@link onItemCommand OnItemCommand} whenever a button control
* within some repeater item raises a <b>Command</b> event. Therefore,
* you can handle all sorts of <b>Command</b> event in a central place by
- * writing an event handler for {@link onItemCommand ItemCommand}.
+ * writing an event handler for {@link onItemCommand OnItemCommand}.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
@@ -415,7 +415,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer
/**
* Handles <b>BubbleEvent</b>.
* This method overrides parent's implementation to handle
- * {@link onItemCommand ItemCommand} event which is bubbled from
+ * {@link onItemCommand OnItemCommand} event which is bubbled from
* {@link TRepeaterItem} child controls.
* This method should only be used by control developers.
* @param TControl the sender of the event
@@ -434,7 +434,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer
}
/**
- * Raises <b>ItemCreated</b> event.
+ * Raises <b>OnItemCreated</b> event.
* This method is invoked after a repeater item is created and instantiated with
* template, but before added to the page hierarchy.
* The {@link TRepeaterItem} control responsible for the event
@@ -445,11 +445,11 @@ class TRepeater extends TDataBoundControl implements INamingContainer
*/
protected function onItemCreated($param)
{
- $this->raiseEvent('ItemCreated',$this,$param);
+ $this->raiseEvent('OnItemCreated',$this,$param);
}
/**
- * Raises <b>ItemDataBound</b> event.
+ * Raises <b>OnItemDataBound</b> event.
* This method is invoked right after an item is data bound.
* The {@link TRepeaterItem} control responsible for the event
* can be determined from the event parameter.
@@ -459,11 +459,11 @@ class TRepeater extends TDataBoundControl implements INamingContainer
*/
protected function onItemDataBound($param)
{
- $this->raiseEvent('ItemDataBound',$this,$param);
+ $this->raiseEvent('OnItemDataBound',$this,$param);
}
/**
- * Raises <b>ItemCommand</b> event.
+ * Raises <b>OnItemCommand</b> event.
* This method is invoked after a button control in
* a template raises <b>Command</b> event.
* The {@link TRepeaterItem} control responsible for the event
@@ -478,7 +478,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer
*/
protected function onItemCommand($param)
{
- $this->raiseEvent('ItemCommand',$this,$param);
+ $this->raiseEvent('OnItemCommand',$this,$param);
}
}
diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php
index 276982ac..12f90c7b 100644
--- a/framework/Web/UI/WebControls/TTextBox.php
+++ b/framework/Web/UI/WebControls/TTextBox.php
@@ -212,15 +212,16 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable
}
/**
+ * Raises <b>OnTextChanged</b> event.
* This method is invoked when the value of the {@link getText Text}
- * property changes on postback. The method raises <b>TextChanged</b> event.
+ * property changes on postback.
* If you override this method, be sure to call the parent implementation to ensure
* the invocation of the attached event handlers.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onTextChanged($param)
{
- $this->raiseEvent('TextChanged',$this,$param);
+ $this->raiseEvent('OnTextChanged',$this,$param);
}
/**