diff options
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 |