diff options
| author | xue <> | 2006-02-17 18:45:49 +0000 | 
|---|---|---|
| committer | xue <> | 2006-02-17 18:45:49 +0000 | 
| commit | 54598910eaa729dd2b9a936efc03b1c5b85b4954 (patch) | |
| tree | 1eaa2ff06a078550446b77f0854c4e5542811071 | |
| parent | 129a7de7813aa331acbaee031141563e0cecc3b1 (diff) | |
Changed a few application API names.
| -rw-r--r-- | framework/Web/TAssetManager.php | 4 | ||||
| -rw-r--r-- | framework/Web/THttpRequest.php | 8 | ||||
| -rw-r--r-- | framework/Web/UI/TTemplateManager.php | 2 | ||||
| -rw-r--r-- | framework/Web/UI/TThemeManager.php | 8 | 
4 files changed, 11 insertions, 11 deletions
diff --git a/framework/Web/TAssetManager.php b/framework/Web/TAssetManager.php index 41700d51..6a7d8ad8 100644 --- a/framework/Web/TAssetManager.php +++ b/framework/Web/TAssetManager.php @@ -82,11 +82,11 @@ class TAssetManager extends TModule  	{
  		$application=$this->getApplication();
  		if($this->_basePath===null)
 -			$this->_basePath=dirname($application->getRequest()->getPhysicalApplicationPath()).'/'.self::DEFAULT_BASEPATH;
 +			$this->_basePath=dirname($application->getRequest()->getApplicationFilePath()).'/'.self::DEFAULT_BASEPATH;
  		if(!is_writable($this->_basePath) || !is_dir($this->_basePath))
  			throw new TConfigurationException('assetmanager_basepath_invalid',$this->_basePath);
  		if($this->_baseUrl===null)
 -			$this->_baseUrl=rtrim(dirname($application->getRequest()->getApplicationPath()),'/\\').'/'.self::DEFAULT_BASEPATH;
 +			$this->_baseUrl=rtrim(dirname($application->getRequest()->getApplicationUrl()),'/\\').'/'.self::DEFAULT_BASEPATH;
  		$application->setAssetManager($this);
  		$this->_initialized=true;
  	}
 diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php index 2ee7cd5f..029fb240 100644 --- a/framework/Web/THttpRequest.php +++ b/framework/Web/THttpRequest.php @@ -270,7 +270,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar  	/**
  	 * @return string entry script URL (w/o host part)
  	 */
 -	public function getApplicationPath()
 +	public function getApplicationUrl()
  	{
  		return $_SERVER['SCRIPT_NAME'];
  	}
 @@ -278,7 +278,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar  	/**
  	 * @return string application entry script file path (processed w/ realpath())
  	 */
 -	public function getPhysicalApplicationPath()
 +	public function getApplicationFilePath()
  	{
  		return realpath($_SERVER['SCRIPT_FILENAME']);
  	}
 @@ -452,13 +452,13 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar  			$url=strtr($url,array($amp=>'/','?'=>'/','='=>'/'));
  			if(defined('SID') && SID != '')
  				$url.='?'.SID;
 -			return $this->getApplicationPath().'/'.$url;
 +			return $this->getApplicationUrl().'/'.$url;
  		}
  		else
  		{
  			if(defined('SID') && SID != '')
  				$url.=$amp.SID;
 -			return $this->getApplicationPath().'?'.$url;
 +			return $this->getApplicationUrl().'?'.$url;
  		}
  	}
 diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index 67bda1b2..404be231 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -144,7 +144,7 @@ class TTemplateManager extends TModule   * @package System.Web.UI
   * @since 3.0
   */
 -class TTemplate extends TComponent implements ITemplate
 +class TTemplate extends TApplicationComponent implements ITemplate
  {
  	/**
  	 *  '<!.*?!>' - template comments
 diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php index 37e477d9..00b3f60f 100644 --- a/framework/Web/UI/TThemeManager.php +++ b/framework/Web/UI/TThemeManager.php @@ -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->getRequest()->getApplicationFilePath()).'/'.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->getRequest()->getApplicationFilePath());
  			$basePath=$this->getBasePath();
  			if(strpos($basePath,$appPath)===false)
  				throw new TConfigurationException('thememanager_baseurl_required');
 -			$appUrl=rtrim(dirname($this->getRequest()->getApplicationPath()),'/\\');
 +			$appUrl=rtrim(dirname($this->getRequest()->getApplicationUrl()),'/\\');
  			$this->_baseUrl=$appUrl.strtr(substr($basePath,strlen($appPath)),'\\','/');
  		}
  		return $this->_baseUrl;
 @@ -164,7 +164,7 @@ class TThemeManager extends TModule   * @package System.Web.UI
   * @since 3.0
   */
 -class TTheme extends TComponent implements ITheme
 +class TTheme extends TApplicationComponent implements ITheme
  {
  	/**
  	 * prefix for cache variable name used to store parsed themes
  | 
