summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/Services/TPageService.php20
-rw-r--r--framework/Web/TAssetManager.php2
-rw-r--r--framework/Web/THttpRequest.php11
-rw-r--r--framework/Web/THttpResponse.php2
-rw-r--r--framework/Web/THttpSession.php2
-rw-r--r--framework/Web/UI/TControl.php2
-rw-r--r--framework/Web/UI/TTheme.php4
-rw-r--r--framework/Web/UI/TThemeManager.php4
8 files changed, 25 insertions, 22 deletions
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php
index 0fb39dfb..6c690046 100644
--- a/framework/Web/Services/TPageService.php
+++ b/framework/Web/Services/TPageService.php
@@ -64,14 +64,14 @@ class TPageService extends TComponent implements IService
*/
private $_initialized=false;
/**
- * @var IApplication application
+ * @var TApplication application
*/
private $_application;
/**
* Initializes the service.
* This method is required by IService interface and is invoked by application.
- * @param IApplication application
+ * @param TApplication application
* @param TXmlElement service configuration
*/
public function init($application,$config)
@@ -536,20 +536,20 @@ class TPageConfiguration extends TComponent
$p=str_replace('\\','/',$p);
$path=realpath(preg_match('/^\\/|.:\\//',$p)?$p:$configPath.'/'.$p);
if($path===false || !is_dir($path))
- throw new TConfigurationException('pageservice_alias_path_invalid',$fname,$id,$p);
+ throw new TConfigurationException('pageservice_alias_path_invalid',$configPath,$id,$p);
if(isset($this->_aliases[$id]))
- throw new TConfigurationException('pageservice_alias_redefined',$fname,$id);
+ throw new TConfigurationException('pageservice_alias_redefined',$configPath,$id);
$this->_aliases[$id]=$path;
}
else
- throw new TConfigurationException('pageservice_alias_element_invalid',$fname);
+ throw new TConfigurationException('pageservice_alias_element_invalid',$configPath);
}
foreach($pathsNode->getElementsByTagName('using') as $usingNode)
{
if(($namespace=$usingNode->getAttribute('namespace'))!==null)
$this->_usings[]=$namespace;
else
- throw new TConfigurationException('pageservice_using_element_invalid',$fname);
+ throw new TConfigurationException('pageservice_using_element_invalid',$configPath);
}
}
@@ -561,7 +561,7 @@ class TPageConfiguration extends TComponent
$properties=$node->getAttributes();
$type=$properties->remove('type');
if(($id=$properties->itemAt('id'))===null)
- throw new TConfigurationException('pageservice_module_element_invalid',$fname);
+ throw new TConfigurationException('pageservice_module_element_invalid',$configPath);
if(isset($this->_modules[$id]))
{
if($type===null)
@@ -572,10 +572,10 @@ class TPageConfiguration extends TComponent
$elements->add($element);
}
else
- throw new TConfigurationException('pageservice_module_redefined',$fname,$id);
+ throw new TConfigurationException('pageservice_module_redefined',$configPath,$id);
}
else if($type===null)
- throw new TConfigurationException('pageservice_module_element_invalid',$fname);
+ throw new TConfigurationException('pageservice_module_element_invalid',$configPath);
else
{
$node->setParent(null);
@@ -639,7 +639,7 @@ class TPageConfiguration extends TComponent
$type=$properties->remove('type');
$id=$properties->itemAt('id');
if($id===null || $type===null)
- throw new TConfigurationException('pageservice_page_element_invalid',$fname);
+ throw new TConfigurationException('pageservice_page_element_invalid',$configPath);
if($id===$page)
{
$this->_properties=array_merge($this->_properties,$properties->toArray());
diff --git a/framework/Web/TAssetManager.php b/framework/Web/TAssetManager.php
index f1dfa15b..b5e1f6ec 100644
--- a/framework/Web/TAssetManager.php
+++ b/framework/Web/TAssetManager.php
@@ -60,7 +60,7 @@ class TAssetManager extends TComponent implements IModule
/**
* Initializes the module.
* This method is required by IModule and is invoked by application.
- * @param IApplication application
+ * @param TApplication application
* @param TXmlElement module configuration
*/
public function init($application,$config)
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php
index 9be0db8a..02bf557f 100644
--- a/framework/Web/THttpRequest.php
+++ b/framework/Web/THttpRequest.php
@@ -85,7 +85,7 @@ class THttpRequest extends TComponent implements IModule
/**
* Initializes the module.
* This method is required by IModule and is invoked by application.
- * @param IApplication application
+ * @param TApplication application
* @param TXmlElement module configuration
*/
public function init($application,$config)
@@ -290,12 +290,15 @@ class THttpRequest extends TComponent implements IModule
}
/**
- * @return string languages user browser supports
+ * Returns a list of user preferred languages.
+ * The languages are returned as an array. Each array element
+ * represents a single language preference. The languages are ordered
+ * according to user preferences. The first language is the most preferred.
+ * @return array list of user preferred languages.
*/
public function getUserLanguages()
{
- // TBD ask wei about this
- return $_SERVER['HTTP_ACCEPT_LANGUAGE'];
+ return Prado::getUserLanguages();
}
/**
diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php
index 777c6621..6146b4f0 100644
--- a/framework/Web/THttpResponse.php
+++ b/framework/Web/THttpResponse.php
@@ -60,7 +60,7 @@ class THttpResponse extends TComponent implements IModule, ITextWriter
* Initializes the module.
* This method is required by IModule and is invoked by application.
* It starts output buffer if it is enabled.
- * @param IApplication application
+ * @param TApplication application
* @param TXmlElement module configuration
*/
public function init($application,$config)
diff --git a/framework/Web/THttpSession.php b/framework/Web/THttpSession.php
index ff3af560..fcecde1f 100644
--- a/framework/Web/THttpSession.php
+++ b/framework/Web/THttpSession.php
@@ -72,7 +72,7 @@ class THttpSession extends TComponent implements IModule
* Initializes the module.
* This method is required by IModule.
* If AutoStart is true, the session will be started.
- * @param IApplication prado application instance
+ * @param TApplication prado application instance
*/
public function init($application,$config)
{
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php
index fbdc81ee..d0e9083e 100644
--- a/framework/Web/UI/TControl.php
+++ b/framework/Web/UI/TControl.php
@@ -251,7 +251,7 @@ class TControl extends TComponent
}
/**
- * @return IApplication the application object that the current page is using
+ * @return TApplication the application object that the current page is using
*/
public function getApplication()
{
diff --git a/framework/Web/UI/TTheme.php b/framework/Web/UI/TTheme.php
index 452c473c..38aded50 100644
--- a/framework/Web/UI/TTheme.php
+++ b/framework/Web/UI/TTheme.php
@@ -18,14 +18,14 @@ class TThemeManager extends TComponent implements IModule
*/
private $_themePath=null;
/**
- * @var IApplication application
+ * @var TApplication application
*/
private $_application;
/**
* Initializes the module.
* This method is required by IModule and is invoked by application.
- * @param IApplication application
+ * @param TApplication application
* @param TXmlElement module configuration
*/
public function init($application,$config)
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php
index 7b370746..5f347e8f 100644
--- a/framework/Web/UI/TThemeManager.php
+++ b/framework/Web/UI/TThemeManager.php
@@ -17,14 +17,14 @@ class TThemeManager extends TComponent implements IModule
*/
private $_themePath=null;
/**
- * @var IApplication application
+ * @var TApplication application
*/
private $_application;
/**
* Initializes the module.
* This method is required by IModule and is invoked by application.
- * @param IApplication application
+ * @param TApplication application
* @param TXmlElement module configuration
*/
public function init($application,$config)