summaryrefslogtreecommitdiff
path: root/include/interface.h
diff options
context:
space:
mode:
authorAlexander Lisachenko <lisachenko.it@gmail.com>2014-04-04 23:12:04 +0400
committerAlexander Lisachenko <lisachenko.it@gmail.com>2014-04-04 23:12:04 +0400
commit47c256fd09253af98baa0acb2bc2562735cea206 (patch)
treecc22545d7e43ceea7c5faf9960ceafe381097c71 /include/interface.h
parent51f1d74a2279276ce762056856767b7dc140dd5b (diff)
Add an bility to define inheritance for interfaces
Diffstat (limited to 'include/interface.h')
-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.