From 9fb0bcd1aa9cdd1b20c916a7c5154741c0ec513a Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 13 Feb 2007 04:33:05 +0000 Subject: Added support to include external application configuration files. --- framework/TService.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'framework/TService.php') diff --git a/framework/TService.php b/framework/TService.php index 5df31534..ec91c43a 100644 --- a/framework/TService.php +++ b/framework/TService.php @@ -27,6 +27,10 @@ abstract class TService extends TApplicationComponent implements IService * @var string service id */ private $_id; + /** + * @var boolean whether the service is enabled + */ + private $_enabled=true; /** * Initializes the service and attaches {@link run} to the RunService event of application. @@ -53,6 +57,22 @@ abstract class TService extends TApplicationComponent implements IService $this->_id=$value; } + /** + * @return boolean whether the service is enabled + */ + public function getEnabled() + { + return $this->_enabled; + } + + /** + * @param boolean whether the service is enabled + */ + public function setEnabled($value) + { + $this->_enabled=TPropertyValue::ensureBoolean($value); + } + /** * Runs the service. */ -- cgit v1.2.3