summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TPage.php
diff options
context:
space:
mode:
authorxue <>2005-12-28 20:17:54 +0000
committerxue <>2005-12-28 20:17:54 +0000
commite8b60312037e54c34a06d6f57d7c21946cf3cd1f (patch)
treea6f35f5d4bb921998ca306602a33fc03ba47c4b5 /framework/Web/UI/TPage.php
parent930c51a6d618d487105cd46c517f36c3b1fe3b44 (diff)
Modified the way to access application singleton.
IService and IModule interfaces are also adjusted accordingly.
Diffstat (limited to 'framework/Web/UI/TPage.php')
-rw-r--r--framework/Web/UI/TPage.php20
1 files changed, 5 insertions, 15 deletions
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php
index 7fe72434..624ed550 100644
--- a/framework/Web/UI/TPage.php
+++ b/framework/Web/UI/TPage.php
@@ -29,14 +29,6 @@ class TPage extends TTemplateControl
'__PREVPAGE','__CALLBACKID','__CALLBACKPARAM'
);
/**
- * @var TApplication application instance
- */
- private $_application;
- /**
- * @var TPageService page service instance
- */
- private $_pageService;
- /**
* @var TForm form instance
*/
private $_form=null;
@@ -125,8 +117,6 @@ class TPage extends TTemplateControl
*/
public function __construct($initProperties=null)
{
- $this->_application=Prado::getApplication();
- $this->_pageService=$this->_application->getService();
$this->setPage($this);
if(is_array($initProperties))
{
@@ -190,7 +180,7 @@ class TPage extends TTemplateControl
return parent::loadTemplate();
else
{
- $template=$this->_pageService->getTemplateManager()->getTemplateByFileName($this->_templateFile);
+ $template=$this->getService()->getTemplateManager()->getTemplateByFileName($this->_templateFile);
$this->setTemplate($template);
return $template;
}
@@ -315,7 +305,7 @@ class TPage extends TTemplateControl
public function getTheme()
{
if(is_string($this->_theme))
- $this->_theme=$this->_pageService->getThemeManager()->getTheme($this->_theme);
+ $this->_theme=$this->getService()->getThemeManager()->getTheme($this->_theme);
return $this->_theme;
}
@@ -336,7 +326,7 @@ class TPage extends TTemplateControl
public function getStyleSheetTheme()
{
if(is_string($this->_styleSheet))
- $this->_styleSheet=$this->_pageService->getThemeManager()->getTheme($this->_styleSheet);
+ $this->_styleSheet=$this->getService()->getThemeManager()->getTheme($this->_styleSheet);
return $this->_styleSheet;
}
@@ -481,7 +471,7 @@ class TPage extends TTemplateControl
*/
private function determinePostBackMode()
{
- $postData=$this->_application->getRequest()->getItems();
+ $postData=$this->getApplication()->getRequest()->getItems();
if($postData->contains(self::FIELD_PAGESTATE) || $postData->contains(self::FIELD_POSTBACK_TARGET))
$this->_postData=$postData;
}
@@ -499,7 +489,7 @@ class TPage extends TTemplateControl
*/
protected function getPageStatePersister()
{
- return $this->_pageService->getPageStatePersister();
+ return $this->getService()->getPageStatePersister();
}
/**