diff options
author | Dreamsxin <dreamsxin@126.com> | 2015-06-04 14:45:32 +0800 |
---|---|---|
committer | Dreamsxin <dreamsxin@126.com> | 2015-06-04 14:45:32 +0800 |
commit | 31c892ce1af0664edb48a64c8727bd71d1380555 (patch) | |
tree | 1d5cc5d0494a5e70b6fef7e10704ad04087c21be /include | |
parent | f107c1522db3db81bb0ef1031250891432eaa453 (diff) |
Allow interfaces define static methods
Diffstat (limited to 'include')
-rw-r--r-- | include/interface.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/interface.h b/include/interface.h index ecb011e..5b15016 100644 --- a/include/interface.h +++ b/include/interface.h @@ -43,6 +43,22 @@ public: } /** + * Add a - of course abstract - method to the interface + * @param name Name of the method + * @param flags Optional flags + * @param arguments Optional description of the arguments + * @return Interface Same object to allow chaining + */ + Interface &method(const char *name, int flags, const Arguments &arguments = {}) + { + // call base + ClassBase::method(name, flags, arguments); + + // return self + return *this; + } + + /** * Extends exisiting PHP interface * * Note that the interface that you supply must already exist! Therefore |