summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-04-04 23:08:57 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-04-04 23:08:57 +0200
commitd9c16ddf8f36fcd50c39a73f5a4ab242896e0a84 (patch)
treecc22545d7e43ceea7c5faf9960ceafe381097c71
parent51f1d74a2279276ce762056856767b7dc140dd5b (diff)
parent47c256fd09253af98baa0acb2bc2562735cea206 (diff)
Merge pull request #65 from lisachenko/feature/interface-inheritance
Add an bility to define inheritance for interfaces
-rw-r--r--include/interface.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/interface.h b/include/interface.h
index 32462c8..01bb6f5 100644
--- a/include/interface.h
+++ b/include/interface.h
@@ -41,7 +41,18 @@ public:
// return self
return *this;
}
-
+
+ /**
+ * Extends exisiting PHP interface
+ *
+ * Note that the interface that you supply must already exist! Therefore
+ * you can only supply interfaces that you created in your own extension.
+ *
+ * @param interface Interface object
+ * @return Interface Same object to allow chaining
+ */
+ Interface &extends(const Interface &interface) { ClassBase::implements(interface); return *this; }
+
/**
* The namespace needs to have access to the private ClassBase base
* class, to actually register the interface.