[icinga-checkins] icinga.org: icinga-web/master: * Convert an interface like class to interface

git at icinga.org git at icinga.org
Wed Nov 9 13:18:05 CET 2011


Module: icinga-web
Branch: master
Commit: 30ba23fe1c83ce71415b3f25e17ffea45e60f362
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=30ba23fe1c83ce71415b3f25e17ffea45e60f362

Author: Marius Hein <marius.hein at netways.de>
Date:   Wed Nov  9 13:17:16 2011 +0100

* Convert an interface like class to interface

---

 .../lib/classes/IcingaApiRequestHelper.class.php   |   34 +++++++++----------
 1 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/app/modules/Api/lib/classes/IcingaApiRequestHelper.class.php b/app/modules/Api/lib/classes/IcingaApiRequestHelper.class.php
index 402b4d4..aa39b02 100644
--- a/app/modules/Api/lib/classes/IcingaApiRequestHelper.class.php
+++ b/app/modules/Api/lib/classes/IcingaApiRequestHelper.class.php
@@ -3,32 +3,30 @@
  * Class that encapsulates helpers for the ApiDataRequestModel
  * All methods must return a IcingaApiRequestDescriptor
  */
-abstract class IcingaApiRequestHelper {
+interface IcingaApiRequestHelper {
 
 
-    public function getService($serviceName,$hostName,$instance = null) {}
-    public function getServicesInServiceGroup($servicegroup,$instance = null,&$count = null,$offset = 0,$limit = -1) {}
-    public function getServicesForHost($host,$instance = null,&$count = null,$offset = 0,$limit = -1) {}
+    public function getService($serviceName,$hostName,$instance = null);
+    public function getServicesInServiceGroup($servicegroup,$instance = null,&$count = null,$offset = 0,$limit = -1);
+    public function getServicesForHost($host,$instance = null,&$count = null,$offset = 0,$limit = -1);
     public function getHistoryForServices(array $services,$instance = null,&$count = null,$offset = 0,$limit = -1);
 
-    public function getHostsInHostGroup($hostgroup,$instance = null,&$count = null,$offset = 0,$limit = -1) {}
-    public function getHost($hostName,$instance = null) {}
-    public function getHistoryForHosts(array $hostNames,$instance = null,&$count = null,$offset = 0,$limit = -1) {}
+    public function getHostsInHostGroup($hostgroup,$instance = null,&$count = null,$offset = 0,$limit = -1);
+    public function getHost($hostName,$instance = null);
+    public function getHistoryForHosts(array $hostNames,$instance = null,&$count = null,$offset = 0,$limit = -1);
 
-    public function getCommentById($id) {}
-    public function getCommentsForHosts(array $host,$instance = null,&$count = null,$offset = 0,$limit = -1) {}
-    public function getCommentsForServices(array $services,$instance = null,&$count = null,$offset = 0,$limit = -1) {}
+    public function getCommentById($id);
+    public function getCommentsForHosts(array $host,$instance = null,&$count = null,$offset = 0,$limit = -1);
+    public function getCommentsForServices(array $services,$instance = null,&$count = null,$offset = 0,$limit = -1);
 
-    public function getCustomVariablesByName($name,$instance = null,&$count = null,$offset = 0,$limit = -1) {}
-    public function getCustomVariablesForHosts(array $hosts,$name = null,$instance = null,&$count = null,$offset = 0,$limit = -1) {}
-    public function getCustomVariablesForServices(array $services,$name = null,$instance = null,&$count = null,$offset = 0,$limit = -1) {}
+    public function getCustomVariablesByName($name,$instance = null,&$count = null,$offset = 0,$limit = -1);
+    public function getCustomVariablesForHosts(array $hosts,$name = null,$instance = null,&$count = null,$offset = 0,$limit = -1);
+    public function getCustomVariablesForServices(array $services,$name = null,$instance = null,&$count = null,$offset = 0,$limit = -1);
 
-    public function getHostgroup($name,$instance = null) {}
-    public function getServicegroup($name,$instance = null) {}
+    public function getHostgroup($name,$instance = null);
+    public function getServicegroup($name,$instance = null);
 
-    public function getInstance($name) {}
+    public function getInstance($name);
 
 
 }
-
-?>
\ No newline at end of file





More information about the icinga-checkins mailing list