summaryrefslogtreecommitdiff
path: root/framework/IService.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/IService.php')
-rw-r--r--framework/IService.php48
1 files changed, 48 insertions, 0 deletions
diff --git a/framework/IService.php b/framework/IService.php
new file mode 100644
index 00000000..5cdbbcff
--- /dev/null
+++ b/framework/IService.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Core interfaces essential for TApplication class.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @package System
+ */
+
+/**
+ * IService interface.
+ *
+ * This interface must be implemented by services.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @package System
+ * @since 3.0
+ */
+interface IService
+{
+ /**
+ * Initializes the service.
+ * @param TXmlElement the configuration for the service
+ */
+ public function init($config);
+ /**
+ * @return string ID of the service
+ */
+ public function getID();
+ /**
+ * @param string ID of the service
+ */
+ public function setID($id);
+ /**
+ * @return boolean whether the service is enabled
+ */
+ public function getEnabled();
+ /**
+ * @param boolean whether the service is enabled
+ */
+ public function setEnabled($value);
+ /**
+ * Runs the service.
+ */
+ public function run();
+} \ No newline at end of file