summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TControl.php
diff options
context:
space:
mode:
authorxue <>2006-02-17 05:19:25 +0000
committerxue <>2006-02-17 05:19:25 +0000
commit7b38480de52c1d042ea542e2d06913a8c9b645fc (patch)
tree67ff025fb171a5325ac8fdc75a281ce8a19a2bd5 /framework/Web/UI/TControl.php
parentae1c1995b2fec431afe7cca23b2697e1bef17baf (diff)
Add TApplicationComponent class and adjusted the relevant classes.
Diffstat (limited to 'framework/Web/UI/TControl.php')
-rw-r--r--framework/Web/UI/TControl.php85
1 files changed, 3 insertions, 82 deletions
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php
index ded7049b..104200ed 100644
--- a/framework/Web/UI/TControl.php
+++ b/framework/Web/UI/TControl.php
@@ -68,7 +68,7 @@ Prado::using('System.Web.UI.TControlAdapter');
* @package System.Web.UI
* @since 3.0
*/
-class TControl extends TComponent
+class TControl extends TApplicationComponent
{
/**
* format of control ID
@@ -165,13 +165,6 @@ class TControl extends TComponent
private $_rf=array();
/**
- * Constructor.
- */
- public function __construct()
- {
- }
-
- /**
* Returns a property value by name or a control by ID.
* This overrides the parent implementation by allowing accessing
* a control via its ID using the following syntax,
@@ -1556,80 +1549,6 @@ class TControl extends TComponent
}
}
}
-
-
- /**
- * @return TApplication current application instance
- */
- public function getApplication()
- {
- return Prado::getApplication();
- }
-
- /**
- * @return IService the current service
- */
- public function getService()
- {
- return Prado::getApplication()->getService();
- }
-
- /**
- * @return THttpRequest the current user request
- */
- public function getRequest()
- {
- return Prado::getApplication()->getRequest();
- }
-
- /**
- * @return THttpResponse the response
- */
- public function getResponse()
- {
- return Prado::getApplication()->getResponse();
- }
-
- /**
- * @return THttpSession user session
- */
- public function getSession()
- {
- return Prado::getApplication()->getSession();
- }
-
- /**
- * @return IUser user
- */
- public function getUser()
- {
- return Prado::getApplication()->getUser();
- }
-
- /**
- * Publishes a private asset and gets its URL.
- * This method will publish a private asset (file or directory)
- * and gets the URL to the asset. Note, if the asset refers to
- * a directory, all contents under that directory will be published.
- * @param string path of the asset that is relative to the directory containing the control class file.
- * @return string URL to the asset path.
- */
- public function publishAsset($assetPath)
- {
- $class=new ReflectionClass(get_class($this));
- $fullPath=dirname($class->getFileName()).'/'.$assetPath;
- return $this->publishFilePath($fullPath);
- }
-
- /**
- * Publishes a file or directory and returns its URL.
- * @param string absolute path of the file or directory to be published
- * @return string URL to the published file or directory
- */
- public function publishFilePath($fullPath)
- {
- return $this->getApplication()->getAssetManager()->publishFilePath($fullPath);
- }
}
@@ -1658,6 +1577,7 @@ class TControlList extends TList
*/
public function __construct(TControl $owner)
{
+ parent::__construct();
$this->_o=$owner;
}
@@ -1741,6 +1661,7 @@ class TEmptyControlList extends TList
*/
public function __construct(TControl $owner)
{
+ parent::__construct();
$this->_o=$owner;
}