From d833d2766f28f927cb4e1e8e660771361abdfdf9 Mon Sep 17 00:00:00 2001 From: xue <> Date: Thu, 17 Nov 2005 19:21:21 +0000 Subject: added application mode support. --- framework/TApplication.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'framework/TApplication.php') diff --git a/framework/TApplication.php b/framework/TApplication.php index 5b52fd22..9ac9a8a0 100644 --- a/framework/TApplication.php +++ b/framework/TApplication.php @@ -157,6 +157,10 @@ class TApplication extends TComponent * @var TAuthorizationRuleCollection collection of authorization rules */ private $_authRules=null; + /** + * @var string application mode + */ + private $_mode='Debug'; /** * Constructor. @@ -241,6 +245,22 @@ class TApplication extends TComponent return $this->_uniqueID; } + /** + * @return string application mode (Off|Debug|Normal|Peformance), defaults to Debug. + */ + public function getMode() + { + return $this->_mode; + } + + /** + * @param string application mode. Valid values include Off, Debug, Normal, or Peformance + */ + public function setMode($value) + { + $this->_mode=TPropertyValue::ensureEnum($value,array('Off','Debug','Normal','Performance')); + } + /** * @return string configuration file path */ -- cgit v1.2.3