summaryrefslogtreecommitdiff
path: root/framework/TService.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/TService.php
parentc662da1a887f852e08bd34d643111239ea82a961 (diff)
Added support to include external application configuration files.
Diffstat (limited to 'framework/TService.php')
-rw-r--r--framework/TService.php20
1 files changed, 20 insertions, 0 deletions
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.
@@ -54,6 +58,22 @@ abstract class TService extends TApplicationComponent implements IService
}
/**
+ * @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.
*/
public function run()