summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-06-15 17:07:36 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-06-15 17:07:36 +0200
commit4b984fe0810a7f46fc01639f12feccdaacf6cc86 (patch)
treecfe0fcf389f853de53c3d13c1b37be464b55f6d4 /include
parent76f8a944540a84b6a5c98135bd9f9e6e996fe37d (diff)
added extra check for abstract keyword when adding abstract methods for interfaces
Diffstat (limited to 'include')
-rw-r--r--include/interface.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/interface.h b/include/interface.h
index 5b15016..a93167f 100644
--- a/include/interface.h
+++ b/include/interface.h
@@ -51,13 +51,15 @@ public:
*/
Interface &method(const char *name, int flags, const Arguments &arguments = {})
{
- // call base
- ClassBase::method(name, flags, arguments);
+ // call base (an interface method is always public, so we add these flags,
+ // and although it is always abstract, PHP does not allow this flag, so we
+ // remove it in case the extension programmer had set it)
+ ClassBase::method(name, (Public | flags) & ~Abstract, arguments);
// return self
return *this;
}
-
+
/**
* Extends exisiting PHP interface
*