From ae1c1995b2fec431afe7cca23b2697e1bef17baf Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 17 Feb 2006 04:28:06 +0000 Subject: moved shortcut methods from TComponent to TControl. --- framework/Web/UI/TThemeManager.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'framework/Web/UI/TThemeManager.php') diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php index 37e477d9..9110db7f 100644 --- a/framework/Web/UI/TThemeManager.php +++ b/framework/Web/UI/TThemeManager.php @@ -63,7 +63,7 @@ class TThemeManager extends TModule public function init($config) { $this->_initialized=true; - $this->getService()->setThemeManager($this); + $this->getApplication()->getPageService()->setThemeManager($this); } /** @@ -86,7 +86,7 @@ class TThemeManager extends TModule { if($this->_basePath===null) { - $this->_basePath=dirname($this->getRequest()->getPhysicalApplicationPath()).'/'.self::DEFAULT_BASEPATH; + $this->_basePath=dirname($this->getApplication()->getRequest()->getPhysicalApplicationPath()).'/'.self::DEFAULT_BASEPATH; if(($basePath=realpath($this->_basePath))===false || !is_dir($basePath)) throw new TConfigurationException('thememanager_basepath_invalid',$this->_basePath); $this->_basePath=$basePath; @@ -119,11 +119,11 @@ class TThemeManager extends TModule { if($this->_baseUrl===null) { - $appPath=dirname($this->getRequest()->getPhysicalApplicationPath()); + $appPath=dirname($this->getApplication()->getRequest()->getPhysicalApplicationPath()); $basePath=$this->getBasePath(); if(strpos($basePath,$appPath)===false) throw new TConfigurationException('thememanager_baseurl_required'); - $appUrl=rtrim(dirname($this->getRequest()->getApplicationPath()),'/\\'); + $appUrl=rtrim(dirname($this->getApplication()->getRequest()->getApplicationPath()),'/\\'); $this->_baseUrl=$appUrl.strtr(substr($basePath,strlen($appPath)),'\\','/'); } return $this->_baseUrl; @@ -209,14 +209,14 @@ class TTheme extends TComponent implements ITheme { $this->_themeUrl=$themeUrl; $this->_name=basename($themePath); - if(($cache=$this->getApplication()->getCache())!==null) + if(($cache=Prado::getApplication()->getCache())!==null) { $array=$cache->get(self::THEME_CACHE_PREFIX.$themePath); if(is_array($array)) { list($skins,$cssFiles,$jsFiles,$timestamp)=$array; $cacheValid=true; - if($this->getApplication()->getMode()!==TApplication::STATE_PERFORMANCE) + if(Prado::getApplication()->getMode()!==TApplication::STATE_PERFORMANCE) { if(($dir=opendir($themePath))===false) throw new TIOException('theme_path_inexistent',$themePath); -- cgit v1.2.3