diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-02-28 10:25:01 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-02-28 10:25:01 +0100 |
commit | 71055ebdea1e8eec30747a04f36e0c10e750bff5 (patch) | |
tree | 18ed63d5fe64a936c284a38d4f72921a4ddc97df /src/methodmember.h | |
parent | 85349bbb642a83012a7d0dbccde8b7c1eea1b914 (diff) |
a lot of refactoring, to make it much easier to define classes in an extension
Diffstat (limited to 'src/methodmember.h')
-rw-r--r-- | src/methodmember.h | 111 |
1 files changed, 57 insertions, 54 deletions
diff --git a/src/methodmember.h b/src/methodmember.h index 709aec9..5d903e9 100644 --- a/src/methodmember.h +++ b/src/methodmember.h @@ -5,6 +5,9 @@ * * @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com> * @copyright 2013 Copernica BV + * + * @todo remove this class + * @todo but do implement this for properties */ /** @@ -12,60 +15,60 @@ */ namespace Php { -/** - * Class definition - */ -class MethodMember : public MemberInfo, public Function -{ -public: - /** - * Constructor - * @param name - * @param method - * @param arguments - */ - MethodMember(const char *name, const _Method &method, const std::initializer_list<Argument> &arguments = {}) : Function(name, arguments), _method(method) {} - - /** - * Destructor - */ - virtual ~MethodMember() {} - - /** - * Is this a method member - * @return bool - */ - virtual bool isMethod() { return true; } - - /** - * Fill a function entry object - * @param entry Function entry - * @param classname Name of the class - * @param method Is this a public entry - */ - virtual void fill(struct _zend_function_entry *entry, const char *classname, MemberModifier flags) override - { - // call function object - Function::fill(entry, classname, flags); - } - - /** - * Method that gets called every time the function is executed - * @param params The parameters that were passed - * @return Variable Return value - */ - virtual Value invoke(Parameters ¶ms) - { - return _method.invoke(params); - } - -private: - /** - * The method pointer - * @var _Method - */ - _Method _method; -}; +///** +// * Class definition +// */ +//class MethodMember : public MemberInfo, public Function +//{ +//public: +// /** +// * Constructor +// * @param name +// * @param method +// * @param arguments +// */ +// MethodMember(const char *name, const _Method &method, const std::initializer_list<Argument> &arguments = {}) : Function(name, arguments), _method(method) {} +// +// /** +// * Destructor +// */ +// virtual ~MethodMember() {} +// +// /** +// * Is this a method member +// * @return bool +// */ +// virtual bool isMethod() { return true; } +// +// /** +// * Fill a function entry object +// * @param entry Function entry +// * @param classname Name of the class +// * @param method Is this a public entry +// */ +// virtual void fill(struct _zend_function_entry *entry, const char *classname, MemberModifier flags) override +// { +// // call function object +// Function::fill(entry, classname, flags); +// } +// +// /** +// * Method that gets called every time the function is executed +// * @param params The parameters that were passed +// * @return Variable Return value +// */ +// virtual Value invoke(Parameters ¶ms) +// { +// return _method.invoke(params); +// } +// +//private: +// /** +// * The method pointer +// * @var _Method +// */ +// _Method _method; +//}; /** * End of namespace |