Skip to content

Commit

Permalink
Merge pull request #65 from lisachenko/feature/interface-inheritance
Browse files Browse the repository at this point in the history
Add an bility to define inheritance for interfaces
  • Loading branch information
EmielBruijntjes committed Apr 4, 2014
2 parents 51f1d74 + 47c256f commit d9c16dd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion include/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,18 @@ class Interface : private ClassBase
// 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.
Expand Down

0 comments on commit d9c16dd

Please sign in to comment.