From 47c256fd09253af98baa0acb2bc2562735cea206 Mon Sep 17 00:00:00 2001 From: Alexander Lisachenko Date: Fri, 4 Apr 2014 23:12:04 +0400 Subject: Add an bility to define inheritance for interfaces --- include/interface.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3