diff options
| -rw-r--r-- | HISTORY | 3 | ||||
| -rw-r--r-- | framework/TApplication.php | 26 | 
2 files changed, 26 insertions, 3 deletions
@@ -51,7 +51,8 @@ NEW: Ticket#935 - Added TActiveDatePicker (Bradley, Christophe)  NEW: Ticket#857 - Added Authentication expiration support to TAuthManager (Michael)  NEW: Ticket#853 - Added Drag and drop components (Christophe)  NEW: Ticket#891 - Added method that returns table name to TActiveRecord (Michael) -BUG: Ticket#38 - [835] TValidationSummary, works different when it's showing Javascript Validation than Server Validation (Carl) +BUG: Ticket#38 - (trac:835) TValidationSummary, works different when it's showing Javascript Validation than Server Validation (Carl) +ENH: Ticket#32 - (trac:861) Implement ability to specify default service ID (Carl)  Version 3.1.2 April 21, 2008  ============================ diff --git a/framework/TApplication.php b/framework/TApplication.php index e1bce92c..1c2b9bd4 100644 --- a/framework/TApplication.php +++ b/framework/TApplication.php @@ -268,6 +268,8 @@ class TApplication extends TComponent  	 * @var TApplicationMode application mode  	 */  	private $_mode=TApplicationMode::Debug; +	 +	private $_pageServiceID = self::PAGE_SERVICE_ID;  	/**  	 * Constructor. @@ -300,7 +302,7 @@ class TApplication extends TComponent  		// generates unique ID by hashing the runtime path  		$this->_uniqueID=md5($this->_runtimePath);  		$this->_parameters=new TMap; -		$this->_services=array(self::PAGE_SERVICE_ID=>array('TPageService',array(),null)); +		  		Prado::setPathOfAlias('Application',$this->_basePath);  	} @@ -484,6 +486,22 @@ class TApplication extends TComponent  	{  		$this->_id=$value;  	} +	 +	/** +	 * @return string page service ID +	 */ +	public function getPageServiceID() +	{ +		return $this->_pageServiceID; +	} + +	/** +	 * @param string page service ID +	 */ +	public function setPageServiceID($value) +	{ +		$this->_pageServiceID=$value; +	}  	/**  	 * @return string an ID that uniquely identifies this Prado application from the others @@ -842,8 +860,12 @@ class TApplication extends TComponent  		if(!$withinService)  		{  			foreach($config->getProperties() as $name=>$value) +			{  				$this->setSubProperty($name,$value); +			}  		} +		 +		$this->_services=array($this->getPageServiceID()=>array('TPageService',array(),null));  		// load parameters  		foreach($config->getParameters() as $id=>$parameter) @@ -928,7 +950,7 @@ class TApplication extends TComponent  		}  		if(($serviceID=$this->getRequest()->resolveRequest(array_keys($this->_services)))===null) -			$serviceID=self::PAGE_SERVICE_ID; +			$serviceID=$this->getPageServiceID();  		$this->startService($serviceID);  	}  | 
