summaryrefslogtreecommitdiff
path: root/framework/Web/THttpRequest.php
diff options
context:
space:
mode:
authorxue <>2007-02-13 04:33:05 +0000
committerxue <>2007-02-13 04:33:05 +0000
commit9fb0bcd1aa9cdd1b20c916a7c5154741c0ec513a (patch)
tree509e5a7721cfc64fd7341df8182724a6115bed3d /framework/Web/THttpRequest.php
parentc662da1a887f852e08bd34d643111239ea82a961 (diff)
Added support to include external application configuration files.
Diffstat (limited to 'framework/Web/THttpRequest.php')
-rw-r--r--framework/Web/THttpRequest.php33
1 files changed, 10 insertions, 23 deletions
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php
index 47fe1230..9c3ce98d 100644
--- a/framework/Web/THttpRequest.php
+++ b/framework/Web/THttpRequest.php
@@ -568,22 +568,25 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
* A URL in the format of /index.php?sp=serviceID.serviceParameter
* will be resolved with the serviceID and the serviceParameter.
* You may override this method to provide your own way of service resolution.
+ * @param array list of valid service IDs
+ * @return string the currently requested service ID, null if no service ID is found
* @see constructUrl
*/
- public function resolveRequest()
+ public function resolveRequest($serviceIDs)
{
Prado::trace("Resolving request from ".$_SERVER['REMOTE_ADDR'],'System.Web.THttpRequest');
- $this->_requestResolved=true;
$this->_items=array_merge($_GET,$this->parseUrl(),$_POST);
- foreach($this->_services as $id)
+ $this->_requestResolved=true;
+ foreach($serviceIDs as $serviceID)
{
- if($this->contains($id))
+ if($this->contains($serviceID))
{
- $this->setServiceID($id);
- $this->setServiceParameter($this->itemAt($id));
- break;
+ $this->setServiceID($serviceID);
+ $this->setServiceParameter($this->itemAt($serviceID));
+ return $serviceID;
}
}
+ return null;
}
/**
@@ -595,22 +598,6 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
}
/**
- * @return array IDs of the available services
- */
- public function getAvailableServices()
- {
- return $this->_services;
- }
-
- /**
- * @param array IDs of the available services
- */
- public function setAvailableServices($services)
- {
- $this->_services=$services;
- }
-
- /**
* @return string requested service ID
*/
public function getServiceID()