summaryrefslogtreecommitdiff
path: root/framework/TComponent.php
diff options
context:
space:
mode:
authorxue <>2006-02-17 18:50:55 +0000
committerxue <>2006-02-17 18:50:55 +0000
commitaaa5b47877028053116bb50c18cd79029a478400 (patch)
treefbd989ec6c54483ba25965d57a0687239a168186 /framework/TComponent.php
parent54598910eaa729dd2b9a936efc03b1c5b85b4954 (diff)
Fixed a few more issues to the introduction of TApplicationComponent.
Diffstat (limited to 'framework/TComponent.php')
-rw-r--r--framework/TComponent.php73
1 files changed, 0 insertions, 73 deletions
diff --git a/framework/TComponent.php b/framework/TComponent.php
index 8a7f5f84..7443168d 100644
--- a/framework/TComponent.php
+++ b/framework/TComponent.php
@@ -412,79 +412,6 @@ class TComponent
throw new TInvalidOperationException('component_statements_invalid',get_class($this),$statements,$e->getMessage());
}
}
-
- /**
- * @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);
- }
}
/**