summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/Javascripts/TJavaScript.php7
-rw-r--r--framework/Web/Javascripts/TJavaScriptLiteral.php57
-rw-r--r--framework/Web/Javascripts/TJavaScriptString.php31
-rw-r--r--framework/Web/Services/TFeedService.php5
-rw-r--r--framework/Web/Services/TJsonResponse.php2
-rw-r--r--framework/Web/Services/TJsonRpcProtocol.php5
-rw-r--r--framework/Web/Services/TJsonService.php7
-rw-r--r--framework/Web/Services/TPageConfiguration.php8
-rw-r--r--framework/Web/Services/TPageService.php21
-rw-r--r--framework/Web/Services/TRpcApiProvider.php2
-rw-r--r--framework/Web/Services/TRpcServer.php2
-rw-r--r--framework/Web/Services/TRpcService.php6
-rw-r--r--framework/Web/Services/TSoapServer.php10
-rw-r--r--framework/Web/Services/TSoapService.php6
-rw-r--r--framework/Web/Services/TXmlRpcProtocol.php3
-rw-r--r--framework/Web/TAssetManager.php9
-rw-r--r--framework/Web/TCacheHttpSession.php1
-rw-r--r--framework/Web/THttpCookie.php3
-rw-r--r--framework/Web/THttpCookieCollection.php3
-rw-r--r--framework/Web/THttpRequest.php23
-rw-r--r--framework/Web/THttpRequestUrlFormat.php2
-rw-r--r--framework/Web/THttpResponse.php17
-rw-r--r--framework/Web/THttpResponseAdapter.php2
-rw-r--r--framework/Web/THttpSession.php17
-rw-r--r--framework/Web/TSessionIterator.php4
-rw-r--r--framework/Web/TUri.php3
-rw-r--r--framework/Web/TUrlManager.php4
-rw-r--r--framework/Web/TUrlMapping.php10
-rw-r--r--framework/Web/TUrlMappingPattern.php6
-rw-r--r--framework/Web/UI/ActiveControls/IActiveControl.php29
-rw-r--r--framework/Web/UI/ActiveControls/ICallbackEventHandler.php33
-rw-r--r--framework/Web/UI/ActiveControls/TAutoCompleteTemplate.php2
-rw-r--r--framework/Web/UI/ActiveControls/TBaseActiveControl.php2
-rw-r--r--framework/Web/UI/ActiveControls/TCallbackClientScript.php2
-rw-r--r--framework/Web/UI/ActiveControls/TCallbackEventParameter.php2
-rw-r--r--framework/Web/UI/ActiveControls/TDropContainerEventParameter.php2
-rw-r--r--framework/Web/UI/IBindable.php29
-rw-r--r--framework/Web/UI/IRenderable.php31
-rw-r--r--framework/Web/UI/JuiControls/TJuiAutoCompleteTemplate.php2
-rw-r--r--framework/Web/UI/JuiControls/TJuiSelectableTemplate.php2
-rw-r--r--framework/Web/UI/JuiControls/TJuiSortableTemplate.php2
-rw-r--r--framework/Web/UI/TBroadcastEventParameter.php2
-rw-r--r--framework/Web/UI/TCachePageStatePersister.php7
-rw-r--r--framework/Web/UI/TClientScriptManager.php13
-rw-r--r--framework/Web/UI/TClientSideOptions.php6
-rw-r--r--framework/Web/UI/TCommandEventParameter.php2
-rw-r--r--framework/Web/UI/TCompositeLiteral.php4
-rw-r--r--framework/Web/UI/TControl.php19
-rw-r--r--framework/Web/UI/TControlAdapter.php2
-rw-r--r--framework/Web/UI/TControlCollection.php3
-rw-r--r--framework/Web/UI/TForm.php2
-rw-r--r--framework/Web/UI/THtmlWriter.php3
-rw-r--r--framework/Web/UI/TPage.php310
-rw-r--r--framework/Web/UI/TPageStatePersister.php3
-rw-r--r--framework/Web/UI/TSessionPageStatePersister.php5
-rw-r--r--framework/Web/UI/TTemplate.php14
-rw-r--r--framework/Web/UI/TTemplateControl.php10
-rw-r--r--framework/Web/UI/TTemplateControlInheritable.php3
-rw-r--r--framework/Web/UI/TTemplateManager.php10
-rw-r--r--framework/Web/UI/TTheme.php8
-rw-r--r--framework/Web/UI/TThemeManager.php9
-rw-r--r--framework/Web/UI/WebControls/TBulletedListEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TDataGridColumn.php2
-rw-r--r--framework/Web/UI/WebControls/TDataGridItemEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TDataGridPageChangedEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TDataGridPagerEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TDataGridSortCommandEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TDataListItemEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TDataSourceSelectParameters.php2
-rw-r--r--framework/Web/UI/WebControls/TDataSourceView.php2
-rw-r--r--framework/Web/UI/WebControls/TFont.php2
-rw-r--r--framework/Web/UI/WebControls/THotSpot.php2
-rw-r--r--framework/Web/UI/WebControls/TImageClickEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TImageMapEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TListItem.php2
-rw-r--r--framework/Web/UI/WebControls/TMetaTag.php2
-rw-r--r--framework/Web/UI/WebControls/TOutputCacheCalculateKeyEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TOutputCacheCheckDependencyEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TPagerPageChangedEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TRepeatInfo.php2
-rw-r--r--framework/Web/UI/WebControls/TRepeaterItemEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TServerValidateEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TStyle.php2
-rw-r--r--framework/Web/UI/WebControls/TWebControlDecorator.php2
-rw-r--r--framework/Web/UI/WebControls/TWizardNavigationEventParameter.php2
-rw-r--r--framework/Web/UI/WebControls/TWizardNavigationTemplate.php2
-rw-r--r--framework/Web/UI/WebControls/TWizardSideBarListItemTemplate.php2
-rw-r--r--framework/Web/UI/WebControls/TWizardSideBarTemplate.php2
88 files changed, 601 insertions, 302 deletions
diff --git a/framework/Web/Javascripts/TJavaScript.php b/framework/Web/Javascripts/TJavaScript.php
index eedeb5a2..847903a7 100644
--- a/framework/Web/Javascripts/TJavaScript.php
+++ b/framework/Web/Javascripts/TJavaScript.php
@@ -9,6 +9,10 @@
* @package Prado\Web\Javascripts
*/
+namespace Prado\Web\Javascripts;
+use Prado\Web\THttpUtility;
+use Prado\Prado;
+
/**
* TJavaScript class.
*
@@ -291,7 +295,7 @@ class TJavaScript
$msg = 'Unknown error';
break;
}
- throw new Exception("JSON error ($err): $msg");
+ throw new \Exception("JSON error ($err): $msg");
}
/**
@@ -302,7 +306,6 @@ class TJavaScript
*/
public static function JSMin($code)
{
- Prado::using('System.Web.Javascripts.JSMin');
return JSMin::minify($code);
}
}
diff --git a/framework/Web/Javascripts/TJavaScriptLiteral.php b/framework/Web/Javascripts/TJavaScriptLiteral.php
new file mode 100644
index 00000000..f1b67709
--- /dev/null
+++ b/framework/Web/Javascripts/TJavaScriptLiteral.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * TComponent, TPropertyValue classes
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ *
+ * Global Events, intra-object events, Class behaviors, expanded behaviors
+ * @author Brad Anderson <javalizard@mac.com>
+ *
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @package Prado\Web\Javascripts
+ */
+
+namespace Prado\Web\Javascripts;
+
+/**
+ * TJavaScriptLiteral class that encloses string literals that are not
+ * supposed to be escaped by {@link TJavaScript::encode() }
+ *
+ * Since Prado 3.2 all the data that gets sent clientside inside a javascript statement
+ * is encoded by default to avoid any kind of injection.
+ * Sometimes there's the need to bypass this encoding and send raw javascript code.
+ * To ensure that a string doesn't get encoded by {@link TJavaScript::encode() },
+ * construct a new TJavaScriptLiteral:
+ * <code>
+ * // a javascript test string
+ * $js="alert('hello')";
+ * // the string in $raw will not be encoded when sent clientside inside a javascript block
+ * $raw=new TJavaScriptLiteral($js);
+ * // shortened form
+ * $raw=_js($js);
+ * </code>
+ *
+ * @package Prado\Web\Javascripts
+ * @since 3.2.0
+ */
+class TJavaScriptLiteral
+{
+ protected $_s;
+
+ public function __construct($s)
+ {
+ $this->_s = $s;
+ }
+
+ public function __toString()
+ {
+ return (string)$this->_s;
+ }
+
+ public function toJavaScriptLiteral()
+ {
+ return $this->__toString();
+ }
+} \ No newline at end of file
diff --git a/framework/Web/Javascripts/TJavaScriptString.php b/framework/Web/Javascripts/TJavaScriptString.php
new file mode 100644
index 00000000..826ea28f
--- /dev/null
+++ b/framework/Web/Javascripts/TJavaScriptString.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * TComponent, TPropertyValue classes
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ *
+ * Global Events, intra-object events, Class behaviors, expanded behaviors
+ * @author Brad Anderson <javalizard@mac.com>
+ *
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @package Prado\Web\Javascripts
+ */
+
+namespace Prado\Web\Javascripts;
+
+/**
+ * TJavaScriptString class is an internal class that marks strings that will be
+ * forcibly encoded when rendered inside a javascript block
+ *
+ * @package Prado\Web\Javascripts
+ * @since 3.2.0
+ */
+class TJavaScriptString extends TJavaScriptLiteral
+{
+ public function toJavaScriptLiteral()
+ {
+ return TJavaScript::jsonEncode((string)$this->_s,JSON_HEX_QUOT | JSON_HEX_APOS | JSON_HEX_TAG);
+ }
+} \ No newline at end of file
diff --git a/framework/Web/Services/TFeedService.php b/framework/Web/Services/TFeedService.php
index 9b0a937d..7b2ece8b 100644
--- a/framework/Web/Services/TFeedService.php
+++ b/framework/Web/Services/TFeedService.php
@@ -11,6 +11,9 @@
*/
namespace Prado\Web\Services;
+use Prado\TApplication;
+use Prado\Exceptions\TConfigurationException;
+use Prado\Exceptions\THttpException;
/**
* TFeedService class
@@ -57,7 +60,7 @@ namespace Prado\Web\Services;
* @package Prado\Web\Services
* @since 3.1
*/
-class TFeedService extends TService
+class TFeedService extends \Prado\TService
{
private $_feeds=array();
diff --git a/framework/Web/Services/TJsonResponse.php b/framework/Web/Services/TJsonResponse.php
index 3f7c1a44..401a7d79 100644
--- a/framework/Web/Services/TJsonResponse.php
+++ b/framework/Web/Services/TJsonResponse.php
@@ -24,7 +24,7 @@ namespace Prado\Web\Services;
* @package Prado\Web\Services
* @since 3.1
*/
-abstract class TJsonResponse extends TApplicationComponent
+abstract class TJsonResponse extends \Prado\TApplicationComponent
{
private $_id='';
diff --git a/framework/Web/Services/TJsonRpcProtocol.php b/framework/Web/Services/TJsonRpcProtocol.php
index 78b7cdc4..e0b30445 100644
--- a/framework/Web/Services/TJsonRpcProtocol.php
+++ b/framework/Web/Services/TJsonRpcProtocol.php
@@ -9,6 +9,7 @@
*/
namespace Prado\Web\Services;
+use Prado\Exceptions\THttpException;
/**
* TJsonRpcProtocol class
@@ -86,7 +87,7 @@ class TJsonRpcProtocol extends TRpcProtocol
{
throw $e;
}
- catch(Exception $e)
+ catch(\Exception $e)
{
return $this->createErrorResponse(new TRpcException('An internal error occured', '-32603'));
}
@@ -160,7 +161,7 @@ class TJsonRpcProtocol extends TRpcProtocol
{
$errnum = json_last_error();
if($errnum != JSON_ERROR_NONE)
- throw new Exception("JSON error: $msg", $err);
+ throw new \Exception("JSON error: $msg", $err);
}
/**
diff --git a/framework/Web/Services/TJsonService.php b/framework/Web/Services/TJsonService.php
index 0f800aff..e5481145 100644
--- a/framework/Web/Services/TJsonService.php
+++ b/framework/Web/Services/TJsonService.php
@@ -10,6 +10,11 @@
*/
namespace Prado\Web\Services;
+use Prado\TApplication;
+use Prado\Prado;
+use Prado\Exceptions\TConfigurationException;
+use Prado\Exceptions\THttpException;
+use Prado\Web\Javascripts\TJavaScript;
/**
* TJsonService class provides to end-users javascript content response in
@@ -51,7 +56,7 @@ namespace Prado\Web\Services;
* @package Prado\Web\Services
* @since 3.1
*/
-class TJsonService extends TService
+class TJsonService extends \Prado\TService
{
/**
* @var array registered services
diff --git a/framework/Web/Services/TPageConfiguration.php b/framework/Web/Services/TPageConfiguration.php
index fe11d3ee..a442ab1c 100644
--- a/framework/Web/Services/TPageConfiguration.php
+++ b/framework/Web/Services/TPageConfiguration.php
@@ -10,6 +10,12 @@
*/
namespace Prado\Web\Services;
+use Prado\Exceptions\TConfigurationException;
+use Prado\Prado;
+use Prado\Security\TAuthorizationRuleCollection;
+use Prado\TApplication;
+use Prado\Xml\TXmlElement;
+use Prado\Xml\TXmlDocument;
/**
* TPageConfiguration class
@@ -22,7 +28,7 @@ namespace Prado\Web\Services;
* @package Prado\Web\Services
* @since 3.0
*/
-class TPageConfiguration extends TComponent
+class TPageConfiguration extends \Prado\TComponent
{
/**
* @var array list of application configurations
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php
index 87640e5a..be865d89 100644
--- a/framework/Web/Services/TPageService.php
+++ b/framework/Web/Services/TPageService.php
@@ -10,13 +10,14 @@
*/
namespace Prado\Web\Services;
-
-/**
- * Include classes to be used by page service
- */
-Prado::using('System.Web.UI.TPage');
-Prado::using('System.Web.UI.TTemplateManager');
-Prado::using('System.Web.UI.TThemeManager');
+use Prado\Prado;
+use Prado\Exceptions\TConfigurationException;
+use Prado\Exceptions\THttpException;
+use Prado\Exceptions\TInvalidOperationException;
+use Prado\TApplication;
+use Prado\TApplicationMode;
+use Prado\Web\UI\TTemplateManager;
+use Prado\Web\UI\TThemeManager;
/**
* TPageService class.
@@ -74,7 +75,7 @@ Prado::using('System.Web.UI.TThemeManager');
* @package Prado\Web\Services
* @since 3.0
*/
-class TPageService extends TService
+class TPageService extends \Prado\TService
{
/**
* Configuration file name
@@ -112,7 +113,7 @@ class TPageService extends TService
* @var string clientscript manager class in namespace format
* @since 3.1.7
*/
- private $_clientScriptManagerClass='System.Web.UI.TClientScriptManager';
+ private $_clientScriptManagerClass='\Prado\Web\UI\TClientScriptManager';
/**
* @var string default page
*/
@@ -149,7 +150,7 @@ class TPageService extends TService
*/
public function init($config)
{
- Prado::trace("Initializing TPageService",'System.Web.Services.TPageService');
+ Prado::trace("Initializing TPageService",'\Prado\Web\Services\TPageService');
$pageConfig=$this->loadPageConfig($config);
diff --git a/framework/Web/Services/TRpcApiProvider.php b/framework/Web/Services/TRpcApiProvider.php
index c63ed44d..ce7b5838 100644
--- a/framework/Web/Services/TRpcApiProvider.php
+++ b/framework/Web/Services/TRpcApiProvider.php
@@ -43,7 +43,7 @@ namespace Prado\Web\Services;
* @package Prado\Web\Services
* @since 3.2
*/
-abstract class TRpcApiProvider extends TModule
+abstract class TRpcApiProvider extends \Prado\TModule
{
/**
* @var TRpcServer instance
diff --git a/framework/Web/Services/TRpcServer.php b/framework/Web/Services/TRpcServer.php
index 36130c9d..746246c7 100644
--- a/framework/Web/Services/TRpcServer.php
+++ b/framework/Web/Services/TRpcServer.php
@@ -25,7 +25,7 @@ namespace Prado\Web\Services;
* @package Prado\Web\Services
* @since 3.2
**/
-class TRpcServer extends TModule
+class TRpcServer extends \Prado\TModule
{
/**
* @var TRpcProtocol instance
diff --git a/framework/Web/Services/TRpcService.php b/framework/Web/Services/TRpcService.php
index 77bfe254..b1a2bd1d 100644
--- a/framework/Web/Services/TRpcService.php
+++ b/framework/Web/Services/TRpcService.php
@@ -9,6 +9,10 @@
*/
namespace Prado\Web\Services;
+use Prado\Exceptions\TConfigurationException;
+use Prado\Exceptions\THttpException;
+use Prado\Prado;
+use Prado\Xml\TXmlElement;
/**
* TRpcService class
@@ -53,7 +57,7 @@ namespace Prado\Web\Services;
* @package Prado\Web\Services
* @since 3.2
**/
-class TRpcService extends TService
+class TRpcService extends \Prado\TService
{
/**
* const string base api provider class which every API must extend
diff --git a/framework/Web/Services/TSoapServer.php b/framework/Web/Services/TSoapServer.php
index d6a04a4a..7bfa7d86 100644
--- a/framework/Web/Services/TSoapServer.php
+++ b/framework/Web/Services/TSoapServer.php
@@ -11,6 +11,10 @@
*/
namespace Prado\Web\Services;
+use Prado\Exceptions\TInvalidDataValueException;
+use Prado\TPropertyValue;
+use Prado\Prado;
+use Prado\TApplicationMode;
/**
* TSoapServer class.
@@ -23,7 +27,7 @@ namespace Prado\Web\Services;
* @package Prado\Web\Services
* @since 3.1
*/
-class TSoapServer extends TApplicationComponent
+class TSoapServer extends \Prado\TApplicationComponent
{
const WSDL_CACHE_PREFIX='wsdl.';
@@ -82,7 +86,7 @@ class TSoapServer extends TApplicationComponent
{
$server->handle();
}
- catch (Exception $e)
+ catch (\Exception $e)
{
if($this->getApplication()->getMode()===TApplicationMode::Debug)
$this->fault($e->getMessage(), $e->__toString());
@@ -143,7 +147,7 @@ class TSoapServer extends TApplicationComponent
{
if($this->getApplication()->getMode()===TApplicationMode::Debug)
ini_set("soap.wsdl_cache_enabled",0);
- $this->_server = new SoapServer($this->getWsdlUri(),$this->getOptions());
+ $this->_server = new \SoapServer($this->getWsdlUri(),$this->getOptions());
}
return $this->_server;
}
diff --git a/framework/Web/Services/TSoapService.php b/framework/Web/Services/TSoapService.php
index f77737e2..5760f63c 100644
--- a/framework/Web/Services/TSoapService.php
+++ b/framework/Web/Services/TSoapService.php
@@ -11,6 +11,10 @@
*/
namespace Prado\Web\Services;
+use Prado\Exceptions\THttpException;
+use Prado\Prado;
+use Prado\TApplication;
+use Prado\Xml\TXmlDocument;
/**
* TSoapService class
@@ -88,7 +92,7 @@ namespace Prado\Web\Services;
* @package Prado\Web\Services
* @since 3.1
*/
-class TSoapService extends TService
+class TSoapService extends \Prado\TService
{
const DEFAULT_SOAP_SERVER='TSoapServer';
private $_servers=array();
diff --git a/framework/Web/Services/TXmlRpcProtocol.php b/framework/Web/Services/TXmlRpcProtocol.php
index b200fe2e..9b62d7ab 100644
--- a/framework/Web/Services/TXmlRpcProtocol.php
+++ b/framework/Web/Services/TXmlRpcProtocol.php
@@ -9,6 +9,7 @@
*/
namespace Prado\Web\Services;
+use Prado\Exceptions\THttpException;
/**
* TXmlRpcProtocol class
@@ -80,7 +81,7 @@ class TXmlRpcProtocol extends TRpcProtocol
{
throw $e;
}
- catch(Exception $e)
+ catch(\Exception $e)
{
return $this->createErrorResponse(new TRpcException('An internal error occured'));
}
diff --git a/framework/Web/TAssetManager.php b/framework/Web/TAssetManager.php
index 2e9c0975..d6bcab6d 100644
--- a/framework/Web/TAssetManager.php
+++ b/framework/Web/TAssetManager.php
@@ -10,6 +10,13 @@
*/
namespace Prado\Web;
+use Prado\Exceptions\TConfigurationException;
+use Prado\Exceptions\TInvalidDataValueException;
+use Prado\Exceptions\TInvalidOperationException;
+use Prado\Prado;
+use Prado\TApplicationMode;
+use Prado\IO\TIOException;
+use Prado\IO\TTarFileExtractor;
/**
* TAssetManager class
@@ -42,7 +49,7 @@ namespace Prado\Web;
* @package Prado\Web
* @since 3.0
*/
-class TAssetManager extends TModule
+class TAssetManager extends \Prado\TModule
{
/**
* Default web accessible base path for storing private files
diff --git a/framework/Web/TCacheHttpSession.php b/framework/Web/TCacheHttpSession.php
index b06b1378..56c3ff61 100644
--- a/framework/Web/TCacheHttpSession.php
+++ b/framework/Web/TCacheHttpSession.php
@@ -12,6 +12,7 @@
*/
namespace Prado\Web;
+use Prado\Exceptions\TConfigurationException;
/**
* TCacheHttpSession class
diff --git a/framework/Web/THttpCookie.php b/framework/Web/THttpCookie.php
index 17208cff..4a72fcec 100644
--- a/framework/Web/THttpCookie.php
+++ b/framework/Web/THttpCookie.php
@@ -10,6 +10,7 @@
*/
namespace Prado\Web;
+use Prado\TPropertyValue;
/**
* THttpCookie class.
@@ -21,7 +22,7 @@ namespace Prado\Web;
* @package Prado\Web
* @since 3.0
*/
-class THttpCookie extends TComponent
+class THttpCookie extends \Prado\TComponent
{
/**
* @var string domain of the cookie
diff --git a/framework/Web/THttpCookieCollection.php b/framework/Web/THttpCookieCollection.php
index 8e99f131..46d1bbc6 100644
--- a/framework/Web/THttpCookieCollection.php
+++ b/framework/Web/THttpCookieCollection.php
@@ -10,6 +10,7 @@
*/
namespace Prado\Web;
+use Prado\Exceptions\TInvalidDataTypeException;
/**
* THttpCookieCollection class.
@@ -26,7 +27,7 @@ namespace Prado\Web;
* @package Prado\Web
* @since 3.0
*/
-class THttpCookieCollection extends TList
+class THttpCookieCollection extends \Prado\Collections\TList
{
/**
* @var mixed owner of this collection
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php
index 7ab5083f..5742b1c6 100644
--- a/framework/Web/THttpRequest.php
+++ b/framework/Web/THttpRequest.php
@@ -10,8 +10,13 @@
*/
namespace Prado\Web;
-
-Prado::using('System.Web.TUrlManager');
+use Prado\Caching\TFileCacheDependency;
+use Prado\Exceptions\TConfigurationException;
+use Prado\Exceptions\TInvalidDataValueException;
+use Prado\Exceptions\TPhpErrorException;
+use Prado\Prado;
+use Prado\TPropertyValue;
+use Prado\TApplicationMode;
/**
* THttpRequest class
@@ -68,7 +73,7 @@ Prado::using('System.Web.TUrlManager');
* @package Prado\Web
* @since 3.0
*/
-class THttpRequest extends TApplicationComponent implements IteratorAggregate,ArrayAccess,Countable,IModule
+class THttpRequest extends \Prado\TApplicationComponent implements \IteratorAggregate, \ArrayAccess, \Countable, \Prado\IModule
{
const CGIFIX__PATH_INFO = 1;
const CGIFIX__SCRIPT_NAME = 2;
@@ -813,7 +818,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
/**
* Returns an iterator for traversing the items in the list.
- * This method is required by the interface IteratorAggregate.
+ * This method is required by the interface \IteratorAggregate.
* @return Iterator an iterator for traversing the items in the list.
*/
public function getIterator()
@@ -831,7 +836,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
/**
* Returns the number of items in the request.
- * This method is required by Countable interface.
+ * This method is required by \Countable interface.
* @return integer number of items in the request.
*/
public function count()
@@ -915,7 +920,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
/**
* Returns whether there is an element at the specified offset.
- * This method is required by the interface ArrayAccess.
+ * This method is required by the interface \ArrayAccess.
* @param mixed the offset to check on
* @return boolean
*/
@@ -926,7 +931,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
/**
* Returns the element at the specified offset.
- * This method is required by the interface ArrayAccess.
+ * This method is required by the interface \ArrayAccess.
* @param integer the offset to retrieve element.
* @return mixed the element at the offset, null if no element is found at the offset
*/
@@ -937,7 +942,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
/**
* Sets the element at the specified offset.
- * This method is required by the interface ArrayAccess.
+ * This method is required by the interface \ArrayAccess.
* @param integer the offset to set element
* @param mixed the element value
*/
@@ -948,7 +953,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
/**
* Unsets the element at the specified offset.
- * This method is required by the interface ArrayAccess.
+ * This method is required by the interface \ArrayAccess.
* @param mixed the offset to unset element
*/
public function offsetUnset($offset)
diff --git a/framework/Web/THttpRequestUrlFormat.php b/framework/Web/THttpRequestUrlFormat.php
index 9c6560a7..61367107 100644
--- a/framework/Web/THttpRequestUrlFormat.php
+++ b/framework/Web/THttpRequestUrlFormat.php
@@ -25,7 +25,7 @@ namespace Prado\Web;
* @package Prado\Web
* @since 3.0.4
*/
-class THttpRequestUrlFormat extends TEnumerable
+class THttpRequestUrlFormat extends \Prado\TEnumerable
{
const Get='Get';
const Path='Path';
diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php
index 31b37504..24787359 100644
--- a/framework/Web/THttpResponse.php
+++ b/framework/Web/THttpResponse.php
@@ -10,11 +10,10 @@
*/
namespace Prado\Web;
-
-/**
- * Includes the THttpResponse adapter.
- */
-Prado::using('System.Web.THttpResponseAdapter');
+use Prado\Exceptions\TInvalidDataValueException;
+use Prado\Exceptions\TInvalidOperationException;
+use Prado\Prado;
+use Prado\TPropertyValue;
/**
* THttpResponse class
@@ -64,7 +63,7 @@ Prado::using('System.Web.THttpResponseAdapter');
* @package Prado\Web
* @since 3.0
*/
-class THttpResponse extends TModule implements ITextWriter
+class THttpResponse extends \Prado\TModule implements \Prado\IO\ITextWriter
{
const DEFAULT_CONTENTTYPE = 'text/html';
const DEFAULT_CHARSET = 'UTF-8';
@@ -103,7 +102,7 @@ class THttpResponse extends TModule implements ITextWriter
/**
* @var string HTML writer type
*/
- private $_htmlWriterType='System.Web.UI.THtmlWriter';
+ private $_htmlWriterType='\Prado\Web\UI\THtmlWriter';
/**
* @var string content type
*/
@@ -212,7 +211,7 @@ class THttpResponse extends TModule implements ITextWriter
public function setContentType($type)
{
if ($this->_contentTypeHeaderSent)
- throw new Exception('Unable to alter content-type as it has been already sent');
+ throw new \Exception('Unable to alter content-type as it has been already sent');
$this->_contentType = $type;
}
@@ -279,7 +278,7 @@ class THttpResponse extends TModule implements ITextWriter
public function setStatusCode($status, $reason=null)
{
if ($this->_httpHeaderSent)
- throw new Exception('Unable to alter response as HTTP header already sent');
+ throw new \Exception('Unable to alter response as HTTP header already sent');
$status=TPropertyValue::ensureInteger($status);
if(isset(self::$HTTP_STATUS_CODES[$status])) {
$this->_reason=self::$HTTP_STATUS_CODES[$status];
diff --git a/framework/Web/THttpResponseAdapter.php b/framework/Web/THttpResponseAdapter.php
index f0ced064..4ff7fb67 100644
--- a/framework/Web/THttpResponseAdapter.php
+++ b/framework/Web/THttpResponseAdapter.php
@@ -21,7 +21,7 @@ namespace Prado\Web;
* @package Prado\Web
* @since 3.0
*/
-class THttpResponseAdapter extends TApplicationComponent
+class THttpResponseAdapter extends \Prado\TApplicationComponent
{
/**
* @var THttpResponse the response object the adapter is attached.
diff --git a/framework/Web/THttpSession.php b/framework/Web/THttpSession.php
index 873baafe..1e995fd6 100644
--- a/framework/Web/THttpSession.php
+++ b/framework/Web/THttpSession.php
@@ -10,6 +10,9 @@
*/
namespace Prado\Web;
+use Prado\Exceptions\TInvalidDataValueException;
+use Prado\Exceptions\TInvalidOperationException;
+use Prado\TPropertyValue;
/**
* THttpSession class
@@ -69,7 +72,7 @@ namespace Prado\Web;
* @package Prado\Web
* @since 3.0
*/
-class THttpSession extends TApplicationComponent implements IteratorAggregate,ArrayAccess,Countable,IModule
+class THttpSession extends \Prado\TApplicationComponent implements \IteratorAggregate, \ArrayAccess, \Countable, \Prado\IModule
{
/**
* @var boolean whether this module has been initialized
@@ -491,7 +494,7 @@ class THttpSession extends TApplicationComponent implements IteratorAggregate,Ar
/**
* Returns an iterator for traversing the session variables.
- * This method is required by the interface IteratorAggregate.
+ * This method is required by the interface \IteratorAggregate.
* @return TSessionIterator an iterator for traversing the session variables.
*/
public function getIterator()
@@ -509,7 +512,7 @@ class THttpSession extends TApplicationComponent implements IteratorAggregate,Ar
/**
* Returns the number of items in the session.
- * This method is required by Countable interface.
+ * This method is required by \Countable interface.
* @return integer number of items in the session.
*/
public function count()
@@ -591,7 +594,7 @@ class THttpSession extends TApplicationComponent implements IteratorAggregate,Ar
}
/**
- * This method is required by the interface ArrayAccess.
+ * This method is required by the interface \ArrayAccess.
* @param mixed the offset to check on
* @return boolean
*/
@@ -601,7 +604,7 @@ class THttpSession extends TApplicationComponent implements IteratorAggregate,Ar
}
/**
- * This method is required by the interface ArrayAccess.
+ * This method is required by the interface \ArrayAccess.
* @param integer the offset to retrieve element.
* @return mixed the element at the offset, null if no element is found at the offset
*/
@@ -611,7 +614,7 @@ class THttpSession extends TApplicationComponent implements IteratorAggregate,Ar
}
/**
- * This method is required by the interface ArrayAccess.
+ * This method is required by the interface \ArrayAccess.
* @param integer the offset to set element
* @param mixed the element value
*/
@@ -621,7 +624,7 @@ class THttpSession extends TApplicationComponent implements IteratorAggregate,Ar
}
/**
- * This method is required by the interface ArrayAccess.
+ * This method is required by the interface \ArrayAccess.
* @param mixed the offset to unset element
*/
public function offsetUnset($offset)
diff --git a/framework/Web/TSessionIterator.php b/framework/Web/TSessionIterator.php
index e9328bd1..d8024deb 100644
--- a/framework/Web/TSessionIterator.php
+++ b/framework/Web/TSessionIterator.php
@@ -14,7 +14,7 @@ namespace Prado\Web;
/**
* TSessionIterator class
*
- * TSessionIterator implements Iterator interface.
+ * TSessionIterator implements \Iterator interface.
*
* TSessionIterator is used by THttpSession. It allows THttpSession to return a new iterator
* for traversing the session variables.
@@ -23,7 +23,7 @@ namespace Prado\Web;
* @package Prado\Web
* @since 3.0
*/
-class TSessionIterator implements Iterator
+class TSessionIterator implements \Iterator
{
/**
* @var array list of keys in the map
diff --git a/framework/Web/TUri.php b/framework/Web/TUri.php
index 3223b46f..cd700691 100644
--- a/framework/Web/TUri.php
+++ b/framework/Web/TUri.php
@@ -10,6 +10,7 @@
*/
namespace Prado\Web;
+use Prado\Exceptions\TInvalidDataValueException;
/**
* TUri class
@@ -30,7 +31,7 @@ namespace Prado\Web;
* @package Prado\Web
* @since 3.0
*/
-class TUri extends TComponent
+class TUri extends \Prado\TComponent
{
/**
* @var array list of default ports for known schemes
diff --git a/framework/Web/TUrlManager.php b/framework/Web/TUrlManager.php
index 4b86644a..483556d1 100644
--- a/framework/Web/TUrlManager.php
+++ b/framework/Web/TUrlManager.php
@@ -30,7 +30,7 @@ namespace Prado\Web;
* @package Prado\Web
* @since 3.0.6
*/
-class TUrlManager extends TModule
+class TUrlManager extends \Prado\TModule
{
/**
* Constructs a URL that can be recognized by PRADO.
@@ -69,7 +69,7 @@ class TUrlManager extends TModule
$url=$serviceID.'='.urlencode($serviceParam);
$amp=$encodeAmpersand?'&amp;':'&';
$request=$this->getRequest();
- if(is_array($getItems) || $getItems instanceof Traversable)
+ if(is_array($getItems) || $getItems instanceof \Traversable)
{
if($encodeGetItems)
{
diff --git a/framework/Web/TUrlMapping.php b/framework/Web/TUrlMapping.php
index fdca7482..d8c0aed7 100644
--- a/framework/Web/TUrlMapping.php
+++ b/framework/Web/TUrlMapping.php
@@ -10,9 +10,11 @@
*/
namespace Prado\Web;
-
-Prado::using('System.Web.TUrlManager');
-Prado::using('System.Collections.TAttributeCollection');
+use Prado\Exceptions\TConfigurationException;
+use Prado\Prado;
+use Prado\TApplication;
+use Prado\Xml\TXmlDocument;
+use Prado\Xml\TXmlElement;
/**
* TUrlMapping Class
@@ -351,7 +353,7 @@ class TUrlMapping extends TUrlManager
{
if($this->_customUrl)
{
- if(!(is_array($getItems) || ($getItems instanceof Traversable)))
+ if(!(is_array($getItems) || ($getItems instanceof \Traversable)))
$getItems=array();
$key=$serviceID.':'.$serviceParam;
$wildCardKey = ($pos=strrpos($serviceParam,'.'))!==false ?
diff --git a/framework/Web/TUrlMappingPattern.php b/framework/Web/TUrlMappingPattern.php
index 47c28539..e32a9130 100644
--- a/framework/Web/TUrlMappingPattern.php
+++ b/framework/Web/TUrlMappingPattern.php
@@ -10,6 +10,10 @@
*/
namespace Prado\Web;
+use Prado\Collections\TAttributeCollection;
+use Prado\Exceptions\TConfigurationException;
+use Prado\Exceptions\TInvalidDataValueException;
+use Prado\TPropertyValue;
/**
* TUrlMappingPattern class.
@@ -110,7 +114,7 @@ namespace Prado\Web;
* @package Prado\Web
* @since 3.0.5
*/
-class TUrlMappingPattern extends TComponent
+class TUrlMappingPattern extends \Prado\TComponent
{
/**
* @var string service parameter such as Page class name.
diff --git a/framework/Web/UI/ActiveControls/IActiveControl.php b/framework/Web/UI/ActiveControls/IActiveControl.php
new file mode 100644
index 00000000..a3c8e72d
--- /dev/null
+++ b/framework/Web/UI/ActiveControls/IActiveControl.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Core interfaces essential for TApplication class.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @package Prado\Web\UI\ActiveControls
+ */
+
+namespace Prado\Web\UI\ActiveControls;
+
+/**
+ * IActiveControl interface.
+ *
+ * Active controls must implement IActiveControl interface.
+ *
+ * @author Wei Zhuo <weizhuo[at]gamil[dot]com>
+ * @package Prado\Web\UI\ActiveControls
+ * @since 3.1
+ */
+interface IActiveControl
+{
+ /**
+ * @return TBaseActiveControl Active control properties.
+ */
+ public function getActiveControl();
+} \ No newline at end of file
diff --git a/framework/Web/UI/ActiveControls/ICallbackEventHandler.php b/framework/Web/UI/ActiveControls/ICallbackEventHandler.php
new file mode 100644
index 00000000..2abe1225
--- /dev/null
+++ b/framework/Web/UI/ActiveControls/ICallbackEventHandler.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Core interfaces essential for TApplication class.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @package Prado\Web\UI\ActiveControls
+ */
+
+namespace Prado\Web\UI\ActiveControls;
+
+/**
+ * ICallbackEventHandler interface.
+ *
+ * If a control wants to respond to callback event, it must implement this
+ * interface.
+ *
+ * @author Wei Zhuo <weizhuo[at]gamil[dot]com>
+ * @package Prado\Web\UI\ActiveControls
+ * @since 3.1
+ */
+interface ICallbackEventHandler
+{
+ /**
+ * Raises callback event. The implementation of this function should raise
+ * appropriate event(s) (e.g. OnClick, OnCommand) indicating the component
+ * is responsible for the callback event.
+ * @param TCallbackEventParameter the parameter associated with the callback event
+ */
+ public function raiseCallbackEvent($eventArgument);
+} \ No newline at end of file
diff --git a/framework/Web/UI/ActiveControls/TAutoCompleteTemplate.php b/framework/Web/UI/ActiveControls/TAutoCompleteTemplate.php
index 0cdcbb85..246bfaf3 100644
--- a/framework/Web/UI/ActiveControls/TAutoCompleteTemplate.php
+++ b/framework/Web/UI/ActiveControls/TAutoCompleteTemplate.php
@@ -21,7 +21,7 @@ namespace Prado\Web\UI\ActiveControls;
* @package Prado\Web\UI\ActiveControls
* @since 3.1
*/
-class TAutoCompleteTemplate extends TComponent implements ITemplate
+class TAutoCompleteTemplate extends \Prado\TComponent implements ITemplate
{
private $_template;
diff --git a/framework/Web/UI/ActiveControls/TBaseActiveControl.php b/framework/Web/UI/ActiveControls/TBaseActiveControl.php
index 4af7ac2c..74adecc2 100644
--- a/framework/Web/UI/ActiveControls/TBaseActiveControl.php
+++ b/framework/Web/UI/ActiveControls/TBaseActiveControl.php
@@ -27,7 +27,7 @@ Prado::using('System.Web.UI.ActiveControls.TCallbackClientSide');
* @package Prado\Web\UI\ActiveControls
* @since 3.1
*/
-class TBaseActiveControl extends TComponent
+class TBaseActiveControl extends \Prado\TComponent
{
/**
* @var TMap map of active control options.
diff --git a/framework/Web/UI/ActiveControls/TCallbackClientScript.php b/framework/Web/UI/ActiveControls/TCallbackClientScript.php
index 812c9b2a..e8656792 100644
--- a/framework/Web/UI/ActiveControls/TCallbackClientScript.php
+++ b/framework/Web/UI/ActiveControls/TCallbackClientScript.php
@@ -58,7 +58,7 @@ namespace Prado\Web\UI\ActiveControls;
* @package Prado\Web\UI\ActiveControls
* @since 3.1
*/
-class TCallbackClientScript extends TApplicationComponent
+class TCallbackClientScript extends \Prado\TApplicationComponent
{
/**
* @var TList list of client functions to execute.
diff --git a/framework/Web/UI/ActiveControls/TCallbackEventParameter.php b/framework/Web/UI/ActiveControls/TCallbackEventParameter.php
index 612fccbd..515051fb 100644
--- a/framework/Web/UI/ActiveControls/TCallbackEventParameter.php
+++ b/framework/Web/UI/ActiveControls/TCallbackEventParameter.php
@@ -32,7 +32,7 @@ namespace Prado\Web\UI\ActiveControls;
* @package Prado\Web\UI\ActiveControls
* @since 3.1
*/
-class TCallbackEventParameter extends TEventParameter
+class TCallbackEventParameter extends \Prado\TEventParameter
{
/**
* @var THttpResponse output content.
diff --git a/framework/Web/UI/ActiveControls/TDropContainerEventParameter.php b/framework/Web/UI/ActiveControls/TDropContainerEventParameter.php
index 2c5876c3..5844e3cd 100644
--- a/framework/Web/UI/ActiveControls/TDropContainerEventParameter.php
+++ b/framework/Web/UI/ActiveControls/TDropContainerEventParameter.php
@@ -22,7 +22,7 @@ namespace Prado\Web\UI\ActiveControls;
* @license http://www.pradosoft.com/license
* @package Prado\Web\UI\ActiveControls
*/
-class TDropContainerEventParameter extends TEventParameter
+class TDropContainerEventParameter extends \Prado\TEventParameter
{
private $_dragElementId;
private $_screenX;
diff --git a/framework/Web/UI/IBindable.php b/framework/Web/UI/IBindable.php
new file mode 100644
index 00000000..efe195f9
--- /dev/null
+++ b/framework/Web/UI/IBindable.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Core interfaces essential for TApplication class.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @package Prado\Web\UI
+ */
+
+namespace Prado\Web\UI;
+
+/**
+ * IBindable interface.
+ *
+ * This interface must be implemented by classes that are capable of performing databinding.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @package Prado\Web\UI
+ * @since 3.0
+ */
+interface IBindable
+{
+ /**
+ * Performs databinding.
+ */
+ public function dataBind();
+} \ No newline at end of file
diff --git a/framework/Web/UI/IRenderable.php b/framework/Web/UI/IRenderable.php
new file mode 100644
index 00000000..2aeda744
--- /dev/null
+++ b/framework/Web/UI/IRenderable.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Core interfaces essential for TApplication class.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @package Prado\Web\UI
+ */
+
+namespace Prado\Web\UI;
+
+/**
+ * IRenderable interface.
+ *
+ * This interface must be implemented by classes that can be rendered
+ * to end-users.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @package Prado\Web\UI
+ * @since 3.0
+ */
+interface IRenderable
+{
+ /**
+ * Renders the component to end-users.
+ * @param ITextWriter writer for the rendering purpose
+ */
+ public function render($writer);
+} \ No newline at end of file
diff --git a/framework/Web/UI/JuiControls/TJuiAutoCompleteTemplate.php b/framework/Web/UI/JuiControls/TJuiAutoCompleteTemplate.php
index 9e5f34bb..56c953fd 100644
--- a/framework/Web/UI/JuiControls/TJuiAutoCompleteTemplate.php
+++ b/framework/Web/UI/JuiControls/TJuiAutoCompleteTemplate.php
@@ -21,7 +21,7 @@ namespace Prado\Web\UI\JuiControls;
* @package Prado\Web\UI\JuiControls
* @since 3.1
*/
-class TJuiAutoCompleteTemplate extends TComponent implements ITemplate
+class TJuiAutoCompleteTemplate extends \Prado\TComponent implements ITemplate
{
private $_template;
diff --git a/framework/Web/UI/JuiControls/TJuiSelectableTemplate.php b/framework/Web/UI/JuiControls/TJuiSelectableTemplate.php
index 82573384..723462a9 100644
--- a/framework/Web/UI/JuiControls/TJuiSelectableTemplate.php
+++ b/framework/Web/UI/JuiControls/TJuiSelectableTemplate.php
@@ -21,7 +21,7 @@ namespace Prado\Web\UI\JuiControls;
* @package Prado\Web\UI\JuiControls
* @since 3.1
*/
-class TJuiSelectableTemplate extends TComponent implements ITemplate
+class TJuiSelectableTemplate extends \Prado\TComponent implements ITemplate
{
private $_template;
diff --git a/framework/Web/UI/JuiControls/TJuiSortableTemplate.php b/framework/Web/UI/JuiControls/TJuiSortableTemplate.php
index 3ef13741..121a2bdc 100644
--- a/framework/Web/UI/JuiControls/TJuiSortableTemplate.php
+++ b/framework/Web/UI/JuiControls/TJuiSortableTemplate.php
@@ -21,7 +21,7 @@ namespace Prado\Web\UI\JuiControls;
* @package Prado\Web\UI\JuiControls
* @since 3.1
*/
-class TJuiSortableTemplate extends TComponent implements ITemplate
+class TJuiSortableTemplate extends \Prado\TComponent implements ITemplate
{
private $_template;
diff --git a/framework/Web/UI/TBroadcastEventParameter.php b/framework/Web/UI/TBroadcastEventParameter.php
index 934f6b51..c2827672 100644
--- a/framework/Web/UI/TBroadcastEventParameter.php
+++ b/framework/Web/UI/TBroadcastEventParameter.php
@@ -23,7 +23,7 @@ namespace Prado\Web\UI;
* @package Prado\Web\UI
* @since 3.0
*/
-class TBroadcastEventParameter extends TEventParameter
+class TBroadcastEventParameter extends \Prado\TEventParameter
{
private $_name;
private $_param;
diff --git a/framework/Web/UI/TCachePageStatePersister.php b/framework/Web/UI/TCachePageStatePersister.php
index 19a832fa..53dd5916 100644
--- a/framework/Web/UI/TCachePageStatePersister.php
+++ b/framework/Web/UI/TCachePageStatePersister.php
@@ -10,6 +10,11 @@
*/
namespace Prado\Web\UI;
+use Prado\Caching\ICache;
+use Prado\Prado;
+use Prado\Exceptions\TConfigurationException;
+use Prado\Exceptions\THttpException;
+use Prado\Exceptions\TInvalidDataValueException;
/**
* TCachePageStatePersister class
@@ -58,7 +63,7 @@ namespace Prado\Web\UI;
* @package Prado\Web\UI
* @since 3.1.1
*/
-class TCachePageStatePersister extends TComponent implements IPageStatePersister
+class TCachePageStatePersister extends \Prado\TComponent implements IPageStatePersister
{
private $_prefix='statepersister';
private $_page;
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php
index 1fb460fa..ad63416e 100644
--- a/framework/Web/UI/TClientScriptManager.php
+++ b/framework/Web/UI/TClientScriptManager.php
@@ -11,6 +11,13 @@
*/
namespace Prado\Web\UI;
+use Prado\Prado;
+use Prado\TApplicationMode;
+use Prado\Exceptions\TInvalidDataValueException;
+use Prado\Exceptions\TInvalidOperationException;
+use Prado\Web\Javascripts\TJavaScript;
+use Prado\Web\UI\ActiveControls\ICallbackEventHandler;
+use Prado\Web\THttpUtility;
/**
* TClientScriptManager class.
@@ -22,7 +29,7 @@ namespace Prado\Web\UI;
* @package Prado\Web\UI
* @since 3.0
*/
-class TClientScriptManager extends TApplicationComponent
+class TClientScriptManager extends \Prado\TApplicationComponent
{
/**
* directory containing Prado javascript files
@@ -244,7 +251,7 @@ class TClientScriptManager extends TApplicationComponent
public function getCallbackReference(ICallbackEventHandler $callbackHandler, $options=null)
{
$options = !is_array($options) ? array() : $options;
- $class = new ReflectionClass($callbackHandler);
+ $class = new \ReflectionClass($callbackHandler);
$clientSide = $callbackHandler->getActiveControl()->getClientSide();
$options = array_merge($options, $clientSide->getOptions()->toArray());
$optionString = TJavaScript::encode($options);
@@ -772,6 +779,6 @@ class TClientScriptManager extends TApplicationComponent
protected function checkIfNotInRender()
{
if ($form = $this->_page->InFormRender)
- throw new Exception('Operation invalid when page is already rendering');
+ throw new \Exception('Operation invalid when page is already rendering');
}
}
diff --git a/framework/Web/UI/TClientSideOptions.php b/framework/Web/UI/TClientSideOptions.php
index 438ff87f..88d5751e 100644
--- a/framework/Web/UI/TClientSideOptions.php
+++ b/framework/Web/UI/TClientSideOptions.php
@@ -11,6 +11,8 @@
*/
namespace Prado\Web\UI;
+use Prado\Collections\TMap;
+use Prado\Web\Javascripts\TJavaScript;
/**
* TClientSideOptions abstract class.
@@ -23,7 +25,7 @@ namespace Prado\Web\UI;
* @package Prado\Web\UI
* @since 3.0
*/
-abstract class TClientSideOptions extends TComponent
+abstract class TClientSideOptions extends \Prado\TComponent
{
/**
* @var TMap list of client-side options.
@@ -71,7 +73,7 @@ abstract class TClientSideOptions extends TComponent
public function getOptions()
{
if (!$this->_options)
- $this->_options = Prado::createComponent('System.Collections.TMap');
+ $this->_options = new TMap;
return $this->_options;
}
diff --git a/framework/Web/UI/TCommandEventParameter.php b/framework/Web/UI/TCommandEventParameter.php
index 5ad7ca3e..5ccee42a 100644
--- a/framework/Web/UI/TCommandEventParameter.php
+++ b/framework/Web/UI/TCommandEventParameter.php
@@ -23,7 +23,7 @@ namespace Prado\Web\UI;
* @package Prado\Web\UI
* @since 3.0
*/
-class TCommandEventParameter extends TEventParameter
+class TCommandEventParameter extends \Prado\TEventParameter
{
private $_name;
private $_param;
diff --git a/framework/Web/UI/TCompositeLiteral.php b/framework/Web/UI/TCompositeLiteral.php
index 8f8df3a5..19b2d42a 100644
--- a/framework/Web/UI/TCompositeLiteral.php
+++ b/framework/Web/UI/TCompositeLiteral.php
@@ -21,7 +21,7 @@ namespace Prado\Web\UI;
* @package Prado\Web\UI
* @since 3.0
*/
-class TCompositeLiteral extends TComponent implements IRenderable, IBindable
+class TCompositeLiteral extends \Prado\TComponent implements IRenderable, IBindable
{
const TYPE_EXPRESSION=0;
const TYPE_STATEMENTS=1;
@@ -69,7 +69,7 @@ class TCompositeLiteral extends TComponent implements IRenderable, IBindable
/**
* @param TComponent container of this component. It serves as the evaluation context of expressions and statements.
*/
- public function setContainer(TComponent $value)
+ public function setContainer(\Prado\TComponent $value)
{
$this->_container=$value;
}
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php
index 0b1dd087..6e34a439 100644
--- a/framework/Web/UI/TControl.php
+++ b/framework/Web/UI/TControl.php
@@ -10,12 +10,11 @@
*/
namespace Prado\Web\UI;
-
-/**
- * Includes TAttributeCollection and TControlAdapter class
- */
-Prado::using('System.Collections.TAttributeCollection');
-Prado::using('System.Web.UI.TControlAdapter');
+use Prado\Exceptions\TInvalidDataValueException;
+use Prado\Exceptions\TInvalidOperationException;
+use Prado\Prado;
+use Prado\TPropertyValue;
+use Prado\Web\UI\ActiveControls\IActiveControl;
/**
* TControl class
@@ -68,7 +67,7 @@ Prado::using('System.Web.UI.TControlAdapter');
* @package Prado\Web\UI
* @since 3.0
*/
-class TControl extends TApplicationComponent implements IRenderable, IBindable
+class TControl extends \Prado\TApplicationComponent implements IRenderable, IBindable
{
/**
* format of control ID
@@ -846,7 +845,7 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
*/
protected function dataBindProperties()
{
- Prado::trace("Data bind properties",'System.Web.UI.TControl');
+ Prado::trace("Data bind properties",'Prado\Web\UI\TControl');
if(isset($this->_rf[self::RF_DATA_BINDINGS]))
{
if(($context=$this->getTemplateControl())===null)
@@ -875,7 +874,7 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
*/
protected function dataBindChildren()
{
- Prado::trace("dataBindChildren()",'System.Web.UI.TControl');
+ Prado::trace("dataBindChildren()",'Prado\Web\UI\TControl');
if(isset($this->_rf[self::RF_CONTROLS]))
{
foreach($this->_rf[self::RF_CONTROLS] as $control)
@@ -1385,7 +1384,7 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
*/
public function onDataBinding($param)
{
- Prado::trace("onDataBinding()",'System.Web.UI.TControl');
+ Prado::trace("onDataBinding()",'Prado\Web\UI\TControl');
$this->raiseEvent('OnDataBinding',$this,$param);
}
diff --git a/framework/Web/UI/TControlAdapter.php b/framework/Web/UI/TControlAdapter.php
index cb993fbc..b0e947dc 100644
--- a/framework/Web/UI/TControlAdapter.php
+++ b/framework/Web/UI/TControlAdapter.php
@@ -21,7 +21,7 @@ namespace Prado\Web\UI;
* @package Prado\Web\UI
* @since 3.0
*/
-class TControlAdapter extends TApplicationComponent
+class TControlAdapter extends \Prado\TApplicationComponent
{
/**
* @var TControl the control to which the adapter is attached
diff --git a/framework/Web/UI/TControlCollection.php b/framework/Web/UI/TControlCollection.php
index b410568b..a23e930b 100644
--- a/framework/Web/UI/TControlCollection.php
+++ b/framework/Web/UI/TControlCollection.php
@@ -10,6 +10,7 @@
*/
namespace Prado\Web\UI;
+use Prado\Exceptions\TInvalidDataTypeException;
/**
* TControlCollection class
@@ -21,7 +22,7 @@ namespace Prado\Web\UI;
* @package Prado\Web\UI
* @since 3.0
*/
-class TControlCollection extends TList
+class TControlCollection extends \Prado\Collections\TList
{
/**
* the control that owns this collection.
diff --git a/framework/Web/UI/TForm.php b/framework/Web/UI/TForm.php
index c343ceb4..92d20477 100644
--- a/framework/Web/UI/TForm.php
+++ b/framework/Web/UI/TForm.php
@@ -10,6 +10,8 @@
*/
namespace Prado\Web\UI;
+use Prado\Exceptions\TInvalidDataValueException;
+use Prado\TPropertyValue;
/**
* TForm class
diff --git a/framework/Web/UI/THtmlWriter.php b/framework/Web/UI/THtmlWriter.php
index 56ba610a..13a3252f 100644
--- a/framework/Web/UI/THtmlWriter.php
+++ b/framework/Web/UI/THtmlWriter.php
@@ -10,6 +10,7 @@
*/
namespace Prado\Web\UI;
+use Prado\THttpUtility;
/**
* THtmlWriter class
@@ -36,7 +37,7 @@ namespace Prado\Web\UI;
* @package Prado\Web\UI
* @since 3.0
*/
-class THtmlWriter extends TApplicationComponent implements ITextWriter
+class THtmlWriter extends \Prado\TApplicationComponent implements \Prado\IO\ITextWriter
{
/**
* @var array list of tags are do not need a closing tag
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php
index a982768b..8dc1f1e7 100644
--- a/framework/Web/UI/TPage.php
+++ b/framework/Web/UI/TPage.php
@@ -10,14 +10,18 @@
*/
namespace Prado\Web\UI;
-
-Prado::using('System.Web.UI.WebControls.*');
-Prado::using('System.Web.UI.TControl');
-Prado::using('System.Web.UI.WebControls.TWebControl');
-Prado::using('System.Web.UI.TCompositeControl');
-Prado::using('System.Web.UI.TTemplateControl');
-Prado::using('System.Web.UI.TForm');
-Prado::using('System.Web.UI.TClientScriptManager');
+use Prado\Collections\TList;
+use Prado\Collections\TMap;
+use Prado\Collections\TStack;
+use Prado\Exceptions\TConfigurationException;
+use Prado\Exceptions\THttpException;
+use Prado\Exceptions\TInvalidDataValueException;
+use Prado\Exceptions\TInvalidDataTypeException;
+use Prado\Exceptions\TInvalidOperationException;
+use Prado\Prado;
+use Prado\TPropertyValue;
+use Prado\Web\UI\ActiveControls\TActivePageAdapter;
+use Prado\Web\UI\ActiveControls\TCallbackClientScript;
/**
* TPage class
@@ -141,7 +145,7 @@ class TPage extends TTemplateControl
/**
* @var string page state persister class name
*/
- private $_statePersisterClass='System.Web.UI.TPageStatePersister';
+ private $_statePersisterClass='\Prado\Web\UI\TPageStatePersister';
/**
* @var mixed page state persister
*/
@@ -183,7 +187,7 @@ class TPage extends TTemplateControl
*/
public function run($writer)
{
- Prado::trace("Running page life cycles",'System.Web.UI.TPage');
+ Prado::trace("Running page life cycles",'Prado\Web\UI\TPage');
$this->_writer = $writer;
$this->determinePostBackMode();
@@ -203,80 +207,80 @@ class TPage extends TTemplateControl
protected function processNormalRequest($writer)
{
- Prado::trace("Page onPreInit()",'System.Web.UI.TPage');
+ Prado::trace("Page onPreInit()",'Prado\Web\UI\TPage');
$this->onPreInit(null);
- Prado::trace("Page initRecursive()",'System.Web.UI.TPage');
+ Prado::trace("Page initRecursive()",'Prado\Web\UI\TPage');
$this->initRecursive();
- Prado::trace("Page onInitComplete()",'System.Web.UI.TPage');
+ Prado::trace("Page onInitComplete()",'Prado\Web\UI\TPage');
$this->onInitComplete(null);
- Prado::trace("Page onPreLoad()",'System.Web.UI.TPage');
+ Prado::trace("Page onPreLoad()",'Prado\Web\UI\TPage');
$this->onPreLoad(null);
- Prado::trace("Page loadRecursive()",'System.Web.UI.TPage');
+ Prado::trace("Page loadRecursive()",'Prado\Web\UI\TPage');
$this->loadRecursive();
- Prado::trace("Page onLoadComplete()",'System.Web.UI.TPage');
+ Prado::trace("Page onLoadComplete()",'Prado\Web\UI\TPage');
$this->onLoadComplete(null);
- Prado::trace("Page preRenderRecursive()",'System.Web.UI.TPage');
+ Prado::trace("Page preRenderRecursive()",'Prado\Web\UI\TPage');
$this->preRenderRecursive();
- Prado::trace("Page onPreRenderComplete()",'System.Web.UI.TPage');
+ Prado::trace("Page onPreRenderComplete()",'Prado\Web\UI\TPage');
$this->onPreRenderComplete(null);
- Prado::trace("Page savePageState()",'System.Web.UI.TPage');
+ Prado::trace("Page savePageState()",'Prado\Web\UI\TPage');
$this->savePageState();
- Prado::trace("Page onSaveStateComplete()",'System.Web.UI.TPage');
+ Prado::trace("Page onSaveStateComplete()",'Prado\Web\UI\TPage');
$this->onSaveStateComplete(null);
- Prado::trace("Page renderControl()",'System.Web.UI.TPage');
+ Prado::trace("Page renderControl()",'Prado\Web\UI\TPage');
$this->renderControl($writer);
- Prado::trace("Page unloadRecursive()",'System.Web.UI.TPage');
+ Prado::trace("Page unloadRecursive()",'Prado\Web\UI\TPage');
$this->unloadRecursive();
}
protected function processPostBackRequest($writer)
{
- Prado::trace("Page onPreInit()",'System.Web.UI.TPage');
+ Prado::trace("Page onPreInit()",'Prado\Web\UI\TPage');
$this->onPreInit(null);
- Prado::trace("Page initRecursive()",'System.Web.UI.TPage');
+ Prado::trace("Page initRecursive()",'Prado\Web\UI\TPage');
$this->initRecursive();
- Prado::trace("Page onInitComplete()",'System.Web.UI.TPage');
+ Prado::trace("Page onInitComplete()",'Prado\Web\UI\TPage');
$this->onInitComplete(null);
$this->_restPostData=new TMap;
- Prado::trace("Page loadPageState()",'System.Web.UI.TPage');
+ Prado::trace("Page loadPageState()",'Prado\Web\UI\TPage');
$this->loadPageState();
- Prado::trace("Page processPostData()",'System.Web.UI.TPage');
+ Prado::trace("Page processPostData()",'Prado\Web\UI\TPage');
$this->processPostData($this->_postData,true);
- Prado::trace("Page onPreLoad()",'System.Web.UI.TPage');
+ Prado::trace("Page onPreLoad()",'Prado\Web\UI\TPage');
$this->onPreLoad(null);
- Prado::trace("Page loadRecursive()",'System.Web.UI.TPage');
+ Prado::trace("Page loadRecursive()",'Prado\Web\UI\TPage');
$this->loadRecursive();
- Prado::trace("Page processPostData()",'System.Web.UI.TPage');
+ Prado::trace("Page processPostData()",'Prado\Web\UI\TPage');
$this->processPostData($this->_restPostData,false);
- Prado::trace("Page raiseChangedEvents()",'System.Web.UI.TPage');
+ Prado::trace("Page raiseChangedEvents()",'Prado\Web\UI\TPage');
$this->raiseChangedEvents();
- Prado::trace("Page raisePostBackEvent()",'System.Web.UI.TPage');
+ Prado::trace("Page raisePostBackEvent()",'Prado\Web\UI\TPage');
$this->raisePostBackEvent();
- Prado::trace("Page onLoadComplete()",'System.Web.UI.TPage');
+ Prado::trace("Page onLoadComplete()",'Prado\Web\UI\TPage');
$this->onLoadComplete(null);
- Prado::trace("Page preRenderRecursive()",'System.Web.UI.TPage');
+ Prado::trace("Page preRenderRecursive()",'Prado\Web\UI\TPage');
$this->preRenderRecursive();
- Prado::trace("Page onPreRenderComplete()",'System.Web.UI.TPage');
+ Prado::trace("Page onPreRenderComplete()",'Prado\Web\UI\TPage');
$this->onPreRenderComplete(null);
- Prado::trace("Page savePageState()",'System.Web.UI.TPage');
+ Prado::trace("Page savePageState()",'Prado\Web\UI\TPage');
$this->savePageState();
- Prado::trace("Page onSaveStateComplete()",'System.Web.UI.TPage');
+ Prado::trace("Page onSaveStateComplete()",'Prado\Web\UI\TPage');
$this->onSaveStateComplete(null);
- Prado::trace("Page renderControl()",'System.Web.UI.TPage');
+ Prado::trace("Page renderControl()",'Prado\Web\UI\TPage');
$this->renderControl($writer);
- Prado::trace("Page unloadRecursive()",'System.Web.UI.TPage');
+ Prado::trace("Page unloadRecursive()",'Prado\Web\UI\TPage');
$this->unloadRecursive();
}
@@ -300,72 +304,72 @@ class TPage extends TTemplateControl
*/
protected function processCallbackRequest($writer)
{
- Prado::using('System.Web.UI.ActiveControls.TActivePageAdapter');
+ Prado::using('Prado\Web\UI\ActiveControls\TActivePageAdapter');
$this->setAdapter(new TActivePageAdapter($this));
- $callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER);
- if(strlen($callbackEventParameter) > 0)
- $this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string)$callbackEventParameter);
+ $callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER);
+ if(strlen($callbackEventParameter) > 0)
+ $this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string)$callbackEventParameter);
- // Decode Callback postData from UTF-8 to current Charset
- if (($g=$this->getApplication()->getGlobalization(false))!==null &&
- strtoupper($enc=$g->getCharset())!='UTF-8')
- foreach ($this->_postData as $k=>$v)
- $this->_postData[$k]=self::decodeUTF8($v, $enc);
+ // Decode Callback postData from UTF-8 to current Charset
+ if (($g=$this->getApplication()->getGlobalization(false))!==null &&
+ strtoupper($enc=$g->getCharset())!='UTF-8')
+ foreach ($this->_postData as $k=>$v)
+ $this->_postData[$k]=self::decodeUTF8($v, $enc);
- Prado::trace("Page onPreInit()",'System.Web.UI.TPage');
+ Prado::trace("Page onPreInit()",'Prado\Web\UI\TPage');
$this->onPreInit(null);
- Prado::trace("Page initRecursive()",'System.Web.UI.TPage');
+ Prado::trace("Page initRecursive()",'Prado\Web\UI\TPage');
$this->initRecursive();
- Prado::trace("Page onInitComplete()",'System.Web.UI.TPage');
+ Prado::trace("Page onInitComplete()",'Prado\Web\UI\TPage');
$this->onInitComplete(null);
$this->_restPostData=new TMap;
- Prado::trace("Page loadPageState()",'System.Web.UI.TPage');
+ Prado::trace("Page loadPageState()",'Prado\Web\UI\TPage');
$this->loadPageState();
- Prado::trace("Page processPostData()",'System.Web.UI.TPage');
+ Prado::trace("Page processPostData()",'Prado\Web\UI\TPage');
$this->processPostData($this->_postData,true);
- Prado::trace("Page onPreLoad()",'System.Web.UI.TPage');
+ Prado::trace("Page onPreLoad()",'Prado\Web\UI\TPage');
$this->onPreLoad(null);
- Prado::trace("Page loadRecursive()",'System.Web.UI.TPage');
+ Prado::trace("Page loadRecursive()",'Prado\Web\UI\TPage');
$this->loadRecursive();
- Prado::trace("Page processPostData()",'System.Web.UI.TPage');
+ Prado::trace("Page processPostData()",'Prado\Web\UI\TPage');
$this->processPostData($this->_restPostData,false);
- Prado::trace("Page raiseChangedEvents()",'System.Web.UI.TPage');
+ Prado::trace("Page raiseChangedEvents()",'Prado\Web\UI\TPage');
$this->raiseChangedEvents();
$this->getAdapter()->processCallbackEvent($writer);
/*
- Prado::trace("Page raisePostBackEvent()",'System.Web.UI.TPage');
+ Prado::trace("Page raisePostBackEvent()",'Prado\Web\UI\TPage');
$this->raisePostBackEvent();
*/
- Prado::trace("Page onLoadComplete()",'System.Web.UI.TPage');
+ Prado::trace("Page onLoadComplete()",'Prado\Web\UI\TPage');
$this->onLoadComplete(null);
- Prado::trace("Page preRenderRecursive()",'System.Web.UI.TPage');
+ Prado::trace("Page preRenderRecursive()",'Prado\Web\UI\TPage');
$this->preRenderRecursive();
- Prado::trace("Page onPreRenderComplete()",'System.Web.UI.TPage');
+ Prado::trace("Page onPreRenderComplete()",'Prado\Web\UI\TPage');
$this->onPreRenderComplete(null);
- Prado::trace("Page savePageState()",'System.Web.UI.TPage');
+ Prado::trace("Page savePageState()",'Prado\Web\UI\TPage');
$this->savePageState();
- Prado::trace("Page onSaveStateComplete()",'System.Web.UI.TPage');
+ Prado::trace("Page onSaveStateComplete()",'Prado\Web\UI\TPage');
$this->onSaveStateComplete(null);
/*
- Prado::trace("Page renderControl()",'System.Web.UI.TPage');
+ Prado::trace("Page renderControl()",'Prado\Web\UI\TPage');
$this->renderControl($writer);
*/
$this->getAdapter()->renderCallbackResponse($writer);
- Prado::trace("Page unloadRecursive()",'System.Web.UI.TPage');
+ Prado::trace("Page unloadRecursive()",'Prado\Web\UI\TPage');
$this->unloadRecursive();
}
@@ -478,7 +482,7 @@ class TPage extends TTemplateControl
*/
public function validate($validationGroup=null)
{
- Prado::trace("Page validate()",'System.Web.UI.TPage');
+ Prado::trace("Page validate()",'Prado\Web\UI\TPage');
$this->_validated=true;
if($this->_validators && $this->_validators->getCount())
{
@@ -592,7 +596,7 @@ class TPage extends TTemplateControl
if(($pos=strrpos($className,'.'))!==false)
$className=substr($className,$pos+1);
- if(!class_exists($className,false) || ($className!=='TClientScriptManager' && !is_subclass_of($className,'TClientScriptManager')))
+ if(!class_exists($className,false) || ($className!=='TClientScriptManager' && !is_subclass_of($className,'TClientScriptManager')))
throw new THttpException(404,'page_csmanagerclass_invalid',$classPath);
$this->_clientScript=new $className($this);
@@ -769,7 +773,7 @@ class TPage extends TTemplateControl
*/
protected function loadPageState()
{
- Prado::trace("Loading state",'System.Web.UI.TPage');
+ Prado::trace("Loading state",'Prado\Web\UI\TPage');
$state=$this->getStatePersister()->load();
$this->loadStateRecursive($state,$this->getEnableViewState());
}
@@ -779,7 +783,7 @@ class TPage extends TTemplateControl
*/
protected function savePageState()
{
- Prado::trace("Saving state",'System.Web.UI.TPage');
+ Prado::trace("Saving state",'Prado\Web\UI\TPage');
$state=&$this->saveStateRecursive($this->getEnableViewState());
$this->getStatePersister()->save($state);
}
@@ -1214,89 +1218,89 @@ class TPage extends TTemplateControl
if ($this->_writer)
$this->Response->write($this->_writer->flush());
}
-
- /**
- * Function to update view controls with data in a given AR object.
- * View controls and AR object need to have the same name in IDs and Attrs respectively.
- * @param TActiveRecord $arObj
- * @param Boolean $throwExceptions Wheter or not to throw exceptions
- * @author Daniel Sampedro <darthdaniel85@gmail.com>
- */
- public function tryToUpdateView($arObj, $throwExceptions = false)
- {
- $objAttrs = get_class_vars(get_class($arObj));
- foreach (array_keys($objAttrs) as $key)
- {
- try
- {
- if ($key != "RELATIONS")
- {
- $control = $this->{$key};
- if ($control instanceof TTextBox)
- $control->Text = $arObj->{$key};
- elseif ($control instanceof TCheckBox)
- $control->Checked = (boolean) $arObj->{$key};
- elseif ($control instanceof TDatePicker)
- $control->Date = $arObj->{$key};
- }
- else
- {
- foreach ($objAttrs["RELATIONS"] as $relKey => $relValues)
- {
- $relControl = $this->{$relKey};
- switch ($relValues[0])
- {
- case TActiveRecord::BELONGS_TO:
- case TActiveRecord::HAS_ONE:
- $relControl->Text = $arObj->{$relKey};
- break;
- case TActiveRecord::HAS_MANY:
- if ($relControl instanceof TListControl)
- {
- $relControl->DataSource = $arObj->{$relKey};
- $relControl->dataBind();
- }
- break;
- }
- }
- break;
- }
- } catch (Exception $ex)
- {
- if ($throwExceptions)
- throw $ex;
- }
- }
- }
-
- /**
- * Function to try to update an AR object with data in view controls.
- * @param TActiveRecord $arObj
- * @param Boolean $throwExceptions Wheter or not to throw exceptions
- * @author Daniel Sampedro <darthdaniel85@gmail.com>
- */
- public function tryToUpdateAR($arObj, $throwExceptions = false)
- {
- $objAttrs = get_class_vars(get_class($arObj));
- foreach (array_keys($objAttrs) as $key)
- {
- try
- {
- if ($key == "RELATIONS")
- break;
- $control = $this->{$key};
- if ($control instanceof TTextBox)
- $arObj->{$key} = $control->Text;
- elseif ($control instanceof TCheckBox)
- $arObj->{$key} = $control->Checked;
- elseif ($control instanceof TDatePicker)
- $arObj->{$key} = $control->Date;
- } catch (Exception $ex)
- {
- if ($throwExceptions)
- throw $ex;
- }
- }
- }
+
+ /**
+ * Function to update view controls with data in a given AR object.
+ * View controls and AR object need to have the same name in IDs and Attrs respectively.
+ * @param TActiveRecord $arObj
+ * @param Boolean $throwExceptions Wheter or not to throw exceptions
+ * @author Daniel Sampedro <darthdaniel85@gmail.com>
+ */
+ public function tryToUpdateView($arObj, $throwExceptions = false)
+ {
+ $objAttrs = get_class_vars(get_class($arObj));
+ foreach (array_keys($objAttrs) as $key)
+ {
+ try
+ {
+ if ($key != "RELATIONS")
+ {
+ $control = $this->{$key};
+ if ($control instanceof \Prado\Web\UI\WebControls\TTextBox)
+ $control->Text = $arObj->{$key};
+ elseif ($control instanceof \Prado\Web\UI\WebControls\TCheckBox)
+ $control->Checked = (boolean) $arObj->{$key};
+ elseif ($control instanceof \Prado\Web\UI\WebControls\TDatePicker)
+ $control->Date = $arObj->{$key};
+ }
+ else
+ {
+ foreach ($objAttrs["RELATIONS"] as $relKey => $relValues)
+ {
+ $relControl = $this->{$relKey};
+ switch ($relValues[0])
+ {
+ case TActiveRecord::BELONGS_TO:
+ case TActiveRecord::HAS_ONE:
+ $relControl->Text = $arObj->{$relKey};
+ break;
+ case TActiveRecord::HAS_MANY:
+ if ($relControl instanceof \Prado\Web\UI\WebControls\TListControl)
+ {
+ $relControl->DataSource = $arObj->{$relKey};
+ $relControl->dataBind();
+ }
+ break;
+ }
+ }
+ break;
+ }
+ } catch (\Exception $ex)
+ {
+ if ($throwExceptions)
+ throw $ex;
+ }
+ }
+ }
+
+ /**
+ * Function to try to update an AR object with data in view controls.
+ * @param TActiveRecord $arObj
+ * @param Boolean $throwExceptions Wheter or not to throw exceptions
+ * @author Daniel Sampedro <darthdaniel85@gmail.com>
+ */
+ public function tryToUpdateAR($arObj, $throwExceptions = false)
+ {
+ $objAttrs = get_class_vars(get_class($arObj));
+ foreach (array_keys($objAttrs) as $key)
+ {
+ try
+ {
+ if ($key == "RELATIONS")
+ break;
+ $control = $this->{$key};
+ if ($control instanceof \Prado\Web\UI\WebControls\TTextBox)
+ $arObj->{$key} = $control->Text;
+ elseif ($control instanceof \Prado\Web\UI\WebControls\TCheckBox)
+ $arObj->{$key} = $control->Checked;
+ elseif ($control instanceof \Prado\Web\UI\WebControls\TDatePicker)
+ $arObj->{$key} = $control->Date;
+ } catch (\Exception $ex)
+ {
+ if ($throwExceptions)
+ throw $ex;
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/framework/Web/UI/TPageStatePersister.php b/framework/Web/UI/TPageStatePersister.php
index 4acde277..1aebe5fd 100644
--- a/framework/Web/UI/TPageStatePersister.php
+++ b/framework/Web/UI/TPageStatePersister.php
@@ -10,6 +10,7 @@
*/
namespace Prado\Web\UI;
+use Prado\Exceptions\THttpException;
/**
* TPageStatePersister class
@@ -26,7 +27,7 @@ namespace Prado\Web\UI;
* @package Prado\Web\UI
* @since 3.0
*/
-class TPageStatePersister extends TComponent implements IPageStatePersister
+class TPageStatePersister extends \Prado\TComponent implements IPageStatePersister
{
private $_page;
diff --git a/framework/Web/UI/TSessionPageStatePersister.php b/framework/Web/UI/TSessionPageStatePersister.php
index 85c7ffb4..a83e3a9e 100644
--- a/framework/Web/UI/TSessionPageStatePersister.php
+++ b/framework/Web/UI/TSessionPageStatePersister.php
@@ -10,6 +10,9 @@
*/
namespace Prado\Web\UI;
+use Prado\TPropertyValue;
+use Prado\Exceptions\THttpException;
+use Prado\Exceptions\TInvalidDataValueException;
/**
* TSessionPageStatePersister class
@@ -43,7 +46,7 @@ namespace Prado\Web\UI;
* @package Prado\Web\UI
* @since 3.1
*/
-class TSessionPageStatePersister extends TComponent implements IPageStatePersister
+class TSessionPageStatePersister extends \Prado\TComponent implements IPageStatePersister
{
const STATE_SESSION_KEY='PRADO_SESSION_PAGESTATE';
const QUEUE_SESSION_KEY='PRADO_SESSION_STATEQUEUE';
diff --git a/framework/Web/UI/TTemplate.php b/framework/Web/UI/TTemplate.php
index f3a782b7..cf32c4cc 100644
--- a/framework/Web/UI/TTemplate.php
+++ b/framework/Web/UI/TTemplate.php
@@ -10,6 +10,12 @@
*/
namespace Prado\Web\UI;
+use Prado\Prado;
+use Prado\TComponent;
+use Prado\Web\Javascripts\TJavaScriptLiteral;
+use Prado\Exceptions\TConfigurationException;
+use Prado\Exceptions\TTemplateException;
+use Prado\Exceptions\TException;
/**
* TTemplate implements PRADO template parsing logic.
@@ -44,7 +50,7 @@ namespace Prado\Web\UI;
* @package Prado\Web\UI
* @since 3.0
*/
-class TTemplate extends TApplicationComponent implements ITemplate
+class TTemplate extends \Prado\TApplicationComponent implements ITemplate
{
/**
* '<!--.*?--!>' - template comments
@@ -206,7 +212,7 @@ class TTemplate extends TApplicationComponent implements ITemplate
$properties=&$object[2];
if($component instanceof TControl)
{
- if($component instanceof TOutputCache)
+ if($component instanceof \Prado\Web\UI\WebControls\TOutputCache)
$component->setCacheKeyPrefix($this->_hashCode.$key);
$component->setTemplateControl($tplControl);
if(isset($properties['id']))
@@ -641,7 +647,7 @@ class TTemplate extends TApplicationComponent implements ITemplate
if($textStart<strlen($input))
$tpl[$c++]=array($container,substr($input,$textStart));
}
- catch(Exception $e)
+ catch(\Exception $e)
{
if(($e instanceof TException) && ($e instanceof TTemplateException))
throw $e;
@@ -796,7 +802,7 @@ class TTemplate extends TApplicationComponent implements ITemplate
$className=substr($type,$pos+1);
else
$className=$type;
- $class=new ReflectionClass($className);
+ $class=new \ReflectionClass($className);
if(is_subclass_of($className,'TControl') || $className==='TControl')
{
foreach($attributes as $name=>$att)
diff --git a/framework/Web/UI/TTemplateControl.php b/framework/Web/UI/TTemplateControl.php
index 1e57ba45..f705ec1e 100644
--- a/framework/Web/UI/TTemplateControl.php
+++ b/framework/Web/UI/TTemplateControl.php
@@ -10,11 +10,11 @@
*/
namespace Prado\Web\UI;
-
-/**
- * Includes TCompositeControl class
- */
-Prado::using('System.Web.UI.TCompositeControl');
+use Prado\Prado;
+use Prado\Exceptions\TConfigurationException;
+use Prado\Exceptions\TInvalidDataValueException;
+use Prado\Web\UI\WebControls\TContent;
+use Prado\Web\UI\WebControls\TContentPlaceHolder;
/**
* TTemplateControl class.
diff --git a/framework/Web/UI/TTemplateControlInheritable.php b/framework/Web/UI/TTemplateControlInheritable.php
index 683d81bf..d22d6421 100644
--- a/framework/Web/UI/TTemplateControlInheritable.php
+++ b/framework/Web/UI/TTemplateControlInheritable.php
@@ -11,8 +11,7 @@
*/
namespace Prado\Web\UI;
-
-Prado::using('System.Web.UI.TTemplateControl');
+use Prado\Exceptions\TConfigurationException;
/**
* TTemplateControlInheritable class.
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php
index 1ac8c275..31f7c56d 100644
--- a/framework/Web/UI/TTemplateManager.php
+++ b/framework/Web/UI/TTemplateManager.php
@@ -10,11 +10,7 @@
*/
namespace Prado\Web\UI;
-
-/**
- * Includes TOutputCache class file
- */
-Prado::using('System.Web.UI.WebControls.TOutputCache');
+use Prado\Prado;
/**
* TTemplateManager class
@@ -36,7 +32,7 @@ Prado::using('System.Web.UI.WebControls.TOutputCache');
* @package Prado\Web\UI
* @since 3.0
*/
-class TTemplateManager extends TModule
+class TTemplateManager extends \Prado\TModule
{
/**
* Template file extension
@@ -64,7 +60,7 @@ class TTemplateManager extends TModule
*/
public function getTemplateByClassName($className)
{
- $class=new ReflectionClass($className);
+ $class=new \ReflectionClass($className);
$tplFile=dirname($class->getFileName()).DIRECTORY_SEPARATOR.$className.self::TEMPLATE_FILE_EXT;
return $this->getTemplateByFileName($tplFile);
}
diff --git a/framework/Web/UI/TTheme.php b/framework/Web/UI/TTheme.php
index 5b37299e..f12c38b5 100644
--- a/framework/Web/UI/TTheme.php
+++ b/framework/Web/UI/TTheme.php
@@ -10,6 +10,10 @@
*/
namespace Prado\Web\UI;
+use Prado\Exceptions\TIOException;
+use Prado\Exceptions\TConfigurationException;
+use Prado\Prado;
+use Prado\TApplicationMode;
/**
* TTheme class
@@ -36,7 +40,7 @@ namespace Prado\Web\UI;
* @package Prado\Web\UI
* @since 3.0
*/
-class TTheme extends TApplicationComponent implements ITheme
+class TTheme extends \Prado\TApplicationComponent implements ITheme
{
/**
* prefix for cache variable name used to store parsed themes
@@ -252,7 +256,7 @@ class TTheme extends TApplicationComponent implements ITheme
{
foreach($this->_skins[$type][$id] as $name=>$value)
{
- Prado::trace("Applying skin $name to $type",'System.Web.UI.TThemeManager');
+ Prado::trace("Applying skin $name to $type",'Prado\Web\UI\TThemeManager');
if(is_array($value))
{
switch($value[0])
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php
index 8f8337ee..9b8d19c8 100644
--- a/framework/Web/UI/TThemeManager.php
+++ b/framework/Web/UI/TThemeManager.php
@@ -10,8 +10,11 @@
*/
namespace Prado\Web\UI;
-
-Prado::using('System.Web.Services.TPageService');
+use Prado\Exceptions\TConfigurationException;
+use Prado\Exceptions\TInvalidDataValueException;
+use Prado\Exceptions\TInvalidOperationException;
+use Prado\Prado;
+use Prado\Web\Services\TPageService;
/**
* TThemeManager class
@@ -38,7 +41,7 @@ Prado::using('System.Web.Services.TPageService');
* @package Prado\Web\UI
* @since 3.0
*/
-class TThemeManager extends TModule
+class TThemeManager extends \Prado\TModule
{
/**
* default themes base path
diff --git a/framework/Web/UI/WebControls/TBulletedListEventParameter.php b/framework/Web/UI/WebControls/TBulletedListEventParameter.php
index a28cb29b..1c0c22e4 100644
--- a/framework/Web/UI/WebControls/TBulletedListEventParameter.php
+++ b/framework/Web/UI/WebControls/TBulletedListEventParameter.php
@@ -21,7 +21,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TBulletedListEventParameter extends TEventParameter
+class TBulletedListEventParameter extends \Prado\TEventParameter
{
/**
* @var integer index of the item clicked
diff --git a/framework/Web/UI/WebControls/TDataGridColumn.php b/framework/Web/UI/WebControls/TDataGridColumn.php
index 3796e1f3..3325b97c 100644
--- a/framework/Web/UI/WebControls/TDataGridColumn.php
+++ b/framework/Web/UI/WebControls/TDataGridColumn.php
@@ -62,7 +62,7 @@ Prado::using('System.Web.UI.WebControls.TDataGrid');
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-abstract class TDataGridColumn extends TApplicationComponent
+abstract class TDataGridColumn extends \Prado\TApplicationComponent
{
private $_id='';
private $_owner=null;
diff --git a/framework/Web/UI/WebControls/TDataGridItemEventParameter.php b/framework/Web/UI/WebControls/TDataGridItemEventParameter.php
index bc519012..23daa44f 100644
--- a/framework/Web/UI/WebControls/TDataGridItemEventParameter.php
+++ b/framework/Web/UI/WebControls/TDataGridItemEventParameter.php
@@ -27,7 +27,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TDataGridItemEventParameter extends TEventParameter
+class TDataGridItemEventParameter extends \Prado\TEventParameter
{
/**
* The TDataGridItem control responsible for the event.
diff --git a/framework/Web/UI/WebControls/TDataGridPageChangedEventParameter.php b/framework/Web/UI/WebControls/TDataGridPageChangedEventParameter.php
index 182881bf..14104fa4 100644
--- a/framework/Web/UI/WebControls/TDataGridPageChangedEventParameter.php
+++ b/framework/Web/UI/WebControls/TDataGridPageChangedEventParameter.php
@@ -30,7 +30,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TDataGridPageChangedEventParameter extends TEventParameter
+class TDataGridPageChangedEventParameter extends \Prado\TEventParameter
{
/**
* @var integer new page index
diff --git a/framework/Web/UI/WebControls/TDataGridPagerEventParameter.php b/framework/Web/UI/WebControls/TDataGridPagerEventParameter.php
index 456a5814..2e16c351 100644
--- a/framework/Web/UI/WebControls/TDataGridPagerEventParameter.php
+++ b/framework/Web/UI/WebControls/TDataGridPagerEventParameter.php
@@ -27,7 +27,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TDataGridPagerEventParameter extends TEventParameter
+class TDataGridPagerEventParameter extends \Prado\TEventParameter
{
/**
* The TDataGridPager control responsible for the event.
diff --git a/framework/Web/UI/WebControls/TDataGridSortCommandEventParameter.php b/framework/Web/UI/WebControls/TDataGridSortCommandEventParameter.php
index f9bc61c6..8f8273e4 100644
--- a/framework/Web/UI/WebControls/TDataGridSortCommandEventParameter.php
+++ b/framework/Web/UI/WebControls/TDataGridSortCommandEventParameter.php
@@ -30,7 +30,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TDataGridSortCommandEventParameter extends TEventParameter
+class TDataGridSortCommandEventParameter extends \Prado\TEventParameter
{
/**
* @var string sort expression
diff --git a/framework/Web/UI/WebControls/TDataListItemEventParameter.php b/framework/Web/UI/WebControls/TDataListItemEventParameter.php
index 8ea7c4c0..f023db3b 100644
--- a/framework/Web/UI/WebControls/TDataListItemEventParameter.php
+++ b/framework/Web/UI/WebControls/TDataListItemEventParameter.php
@@ -22,7 +22,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TDataListItemEventParameter extends TEventParameter
+class TDataListItemEventParameter extends \Prado\TEventParameter
{
/**
* The datalist item control responsible for the event.
diff --git a/framework/Web/UI/WebControls/TDataSourceSelectParameters.php b/framework/Web/UI/WebControls/TDataSourceSelectParameters.php
index a0d7f760..2c4a6d3e 100644
--- a/framework/Web/UI/WebControls/TDataSourceSelectParameters.php
+++ b/framework/Web/UI/WebControls/TDataSourceSelectParameters.php
@@ -18,7 +18,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TDataSourceSelectParameters extends TComponent
+class TDataSourceSelectParameters extends \Prado\TComponent
{
private $_retrieveTotalRowCount=false;
private $_startRowIndex=0;
diff --git a/framework/Web/UI/WebControls/TDataSourceView.php b/framework/Web/UI/WebControls/TDataSourceView.php
index e64ecabf..251bf572 100644
--- a/framework/Web/UI/WebControls/TDataSourceView.php
+++ b/framework/Web/UI/WebControls/TDataSourceView.php
@@ -18,7 +18,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-abstract class TDataSourceView extends TComponent
+abstract class TDataSourceView extends \Prado\TComponent
{
private $_owner;
private $_name;
diff --git a/framework/Web/UI/WebControls/TFont.php b/framework/Web/UI/WebControls/TFont.php
index 706fc974..82a8ed38 100644
--- a/framework/Web/UI/WebControls/TFont.php
+++ b/framework/Web/UI/WebControls/TFont.php
@@ -20,7 +20,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TFont extends TComponent
+class TFont extends \Prado\TComponent
{
/**
* Bits indicating the font states.
diff --git a/framework/Web/UI/WebControls/THotSpot.php b/framework/Web/UI/WebControls/THotSpot.php
index 79d09a14..45fd6ae5 100644
--- a/framework/Web/UI/WebControls/THotSpot.php
+++ b/framework/Web/UI/WebControls/THotSpot.php
@@ -22,7 +22,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-abstract class THotSpot extends TComponent
+abstract class THotSpot extends \Prado\TComponent
{
private $_viewState=array();
diff --git a/framework/Web/UI/WebControls/TImageClickEventParameter.php b/framework/Web/UI/WebControls/TImageClickEventParameter.php
index 746815fa..4dac6009 100644
--- a/framework/Web/UI/WebControls/TImageClickEventParameter.php
+++ b/framework/Web/UI/WebControls/TImageClickEventParameter.php
@@ -21,7 +21,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TImageClickEventParameter extends TEventParameter
+class TImageClickEventParameter extends \Prado\TEventParameter
{
/**
* the X coordinate of the clicking point
diff --git a/framework/Web/UI/WebControls/TImageMapEventParameter.php b/framework/Web/UI/WebControls/TImageMapEventParameter.php
index 0b37b217..2f082d32 100644
--- a/framework/Web/UI/WebControls/TImageMapEventParameter.php
+++ b/framework/Web/UI/WebControls/TImageMapEventParameter.php
@@ -23,7 +23,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TImageMapEventParameter extends TEventParameter
+class TImageMapEventParameter extends \Prado\TEventParameter
{
private $_postBackValue;
diff --git a/framework/Web/UI/WebControls/TListItem.php b/framework/Web/UI/WebControls/TListItem.php
index 11cf98aa..11fede51 100644
--- a/framework/Web/UI/WebControls/TListItem.php
+++ b/framework/Web/UI/WebControls/TListItem.php
@@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TListItem extends TComponent
+class TListItem extends \Prado\TComponent
{
/**
* @var TMap list of custom attributes
diff --git a/framework/Web/UI/WebControls/TMetaTag.php b/framework/Web/UI/WebControls/TMetaTag.php
index f831b898..afc6b131 100644
--- a/framework/Web/UI/WebControls/TMetaTag.php
+++ b/framework/Web/UI/WebControls/TMetaTag.php
@@ -24,7 +24,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TMetaTag extends TComponent
+class TMetaTag extends \Prado\TComponent
{
/**
* @var string id of the meta tag
diff --git a/framework/Web/UI/WebControls/TOutputCacheCalculateKeyEventParameter.php b/framework/Web/UI/WebControls/TOutputCacheCalculateKeyEventParameter.php
index 13a5ddb8..404751a2 100644
--- a/framework/Web/UI/WebControls/TOutputCacheCalculateKeyEventParameter.php
+++ b/framework/Web/UI/WebControls/TOutputCacheCalculateKeyEventParameter.php
@@ -21,7 +21,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TOutputCacheCalculateKeyEventParameter extends TEventParameter
+class TOutputCacheCalculateKeyEventParameter extends \Prado\TEventParameter
{
/**
* @var string cache key to be appended to the default calculation scheme.
diff --git a/framework/Web/UI/WebControls/TOutputCacheCheckDependencyEventParameter.php b/framework/Web/UI/WebControls/TOutputCacheCheckDependencyEventParameter.php
index 50aa11fd..fd2451fd 100644
--- a/framework/Web/UI/WebControls/TOutputCacheCheckDependencyEventParameter.php
+++ b/framework/Web/UI/WebControls/TOutputCacheCheckDependencyEventParameter.php
@@ -21,7 +21,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TOutputCacheCheckDependencyEventParameter extends TEventParameter
+class TOutputCacheCheckDependencyEventParameter extends \Prado\TEventParameter
{
private $_isValid=true;
private $_cacheTime=0;
diff --git a/framework/Web/UI/WebControls/TPagerPageChangedEventParameter.php b/framework/Web/UI/WebControls/TPagerPageChangedEventParameter.php
index 3b9710e0..53d46289 100644
--- a/framework/Web/UI/WebControls/TPagerPageChangedEventParameter.php
+++ b/framework/Web/UI/WebControls/TPagerPageChangedEventParameter.php
@@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0.2
*/
-class TPagerPageChangedEventParameter extends TEventParameter
+class TPagerPageChangedEventParameter extends \Prado\TEventParameter
{
/**
* @var integer new page index
diff --git a/framework/Web/UI/WebControls/TRepeatInfo.php b/framework/Web/UI/WebControls/TRepeatInfo.php
index da153030..c32d9d72 100644
--- a/framework/Web/UI/WebControls/TRepeatInfo.php
+++ b/framework/Web/UI/WebControls/TRepeatInfo.php
@@ -29,7 +29,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TRepeatInfo extends TComponent
+class TRepeatInfo extends \Prado\TComponent
{
/**
* @var string caption of the table used to organize the repeated items
diff --git a/framework/Web/UI/WebControls/TRepeaterItemEventParameter.php b/framework/Web/UI/WebControls/TRepeaterItemEventParameter.php
index 8be36efb..2d86df38 100644
--- a/framework/Web/UI/WebControls/TRepeaterItemEventParameter.php
+++ b/framework/Web/UI/WebControls/TRepeaterItemEventParameter.php
@@ -22,7 +22,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TRepeaterItemEventParameter extends TEventParameter
+class TRepeaterItemEventParameter extends \Prado\TEventParameter
{
/**
* The repeater item control responsible for the event.
diff --git a/framework/Web/UI/WebControls/TServerValidateEventParameter.php b/framework/Web/UI/WebControls/TServerValidateEventParameter.php
index a23f01e2..cc1f30f3 100644
--- a/framework/Web/UI/WebControls/TServerValidateEventParameter.php
+++ b/framework/Web/UI/WebControls/TServerValidateEventParameter.php
@@ -21,7 +21,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TServerValidateEventParameter extends TEventParameter
+class TServerValidateEventParameter extends \Prado\TEventParameter
{
/**
* the value to be validated
diff --git a/framework/Web/UI/WebControls/TStyle.php b/framework/Web/UI/WebControls/TStyle.php
index 34cfaa19..04fac62d 100644
--- a/framework/Web/UI/WebControls/TStyle.php
+++ b/framework/Web/UI/WebControls/TStyle.php
@@ -25,7 +25,7 @@ Prado::using('System.Web.UI.WebControls.TFont');
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TStyle extends TComponent
+class TStyle extends \Prado\TComponent
{
/**
* @var array storage of CSS fields
diff --git a/framework/Web/UI/WebControls/TWebControlDecorator.php b/framework/Web/UI/WebControls/TWebControlDecorator.php
index e41afc2a..a74d1815 100644
--- a/framework/Web/UI/WebControls/TWebControlDecorator.php
+++ b/framework/Web/UI/WebControls/TWebControlDecorator.php
@@ -55,7 +55,7 @@ namespace Prado\Web\UI\WebControls;
* @since 3.2
*/
-class TWebControlDecorator extends TComponent {
+class TWebControlDecorator extends \Prado\TComponent {
/**
* @var boolean tells if there should only be decoration around the inner content
diff --git a/framework/Web/UI/WebControls/TWizardNavigationEventParameter.php b/framework/Web/UI/WebControls/TWizardNavigationEventParameter.php
index 9ecab1db..5a25b8b1 100644
--- a/framework/Web/UI/WebControls/TWizardNavigationEventParameter.php
+++ b/framework/Web/UI/WebControls/TWizardNavigationEventParameter.php
@@ -29,7 +29,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TWizardNavigationEventParameter extends TEventParameter
+class TWizardNavigationEventParameter extends \Prado\TEventParameter
{
private $_cancel=false;
private $_currentStep;
diff --git a/framework/Web/UI/WebControls/TWizardNavigationTemplate.php b/framework/Web/UI/WebControls/TWizardNavigationTemplate.php
index 1286cc89..edcf83ca 100644
--- a/framework/Web/UI/WebControls/TWizardNavigationTemplate.php
+++ b/framework/Web/UI/WebControls/TWizardNavigationTemplate.php
@@ -18,7 +18,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TWizardNavigationTemplate extends TComponent implements ITemplate
+class TWizardNavigationTemplate extends \Prado\TComponent implements ITemplate
{
private $_wizard;
diff --git a/framework/Web/UI/WebControls/TWizardSideBarListItemTemplate.php b/framework/Web/UI/WebControls/TWizardSideBarListItemTemplate.php
index 457f8eaa..53291a0f 100644
--- a/framework/Web/UI/WebControls/TWizardSideBarListItemTemplate.php
+++ b/framework/Web/UI/WebControls/TWizardSideBarListItemTemplate.php
@@ -18,7 +18,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TWizardSideBarListItemTemplate extends TComponent implements ITemplate
+class TWizardSideBarListItemTemplate extends \Prado\TComponent implements ITemplate
{
/**
* Instantiates the template.
diff --git a/framework/Web/UI/WebControls/TWizardSideBarTemplate.php b/framework/Web/UI/WebControls/TWizardSideBarTemplate.php
index 2b71decb..8572a467 100644
--- a/framework/Web/UI/WebControls/TWizardSideBarTemplate.php
+++ b/framework/Web/UI/WebControls/TWizardSideBarTemplate.php
@@ -18,7 +18,7 @@ namespace Prado\Web\UI\WebControls;
* @package Prado\Web\UI\WebControls
* @since 3.0
*/
-class TWizardSideBarTemplate extends TComponent implements ITemplate
+class TWizardSideBarTemplate extends \Prado\TComponent implements ITemplate
{
/**
* Instantiates the template.