diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-13 22:09:42 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-13 22:09:42 +0100 |
commit | 20559a70bfd9d18c6ba3138878c0e1936a78e684 (patch) | |
tree | c265b17dda381eeba5fc2d40ad0c1f8665cee92e /include/class.h | |
parent | 0c244b567d251a0bb0069c24090ce3a578f7c886 (diff) |
removed interfaces, removed abstract class and remove final class
Diffstat (limited to 'include/class.h')
-rw-r--r-- | include/class.h | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/include/class.h b/include/class.h index ca09a66..0bfa745 100644 --- a/include/class.h +++ b/include/class.h @@ -25,23 +25,6 @@ extern struct _zend_class_entry *zend_ce_arrayaccess; //extern struct _zend_class_entry *zend_ce_serializable; /** - * SFINAE test to check if the __callStatic method is defined - * @see http://stackoverflow.com/questions/257288/is-it-possible-to-write-a-c-template-to-check-for-a-functions-existence - */ -template <typename T> -class HasCallStatic -{ - typedef char one; - typedef long two; - - template <typename C> static one test( decltype(&C::__callStatic) ) ; - template <typename C> static two test(...); - -public: - static const bool value = sizeof(test<T>(0)) == sizeof(char); -}; - -/** * Set up namespace */ namespace Php { @@ -56,21 +39,13 @@ public: /** * Constructor * - * The flags can be a combination of Php::Final and Php::Abstract. If no - * flags are set, a regular public class will be formed. + * The flags can be a combination of Php::Final and Php::Abstract. + * If no flags are set, a regular public class will be formed. * * @param name Name of the class + * @param flags Accessibility flags */ - Class(const char *name) : ClassBase(name) - { - // check for special classes, and register the interface if it does - // register the interface (we register a pointer-to-a-pointer here, - // because when this code runs (during the get_module() call), the - // interfaces are not yet initialized by the zend engine, this only - // happens later when the all classes are registered (after the - // get_module() call) -// if (std::is_base_of<ArrayAccess, T>::value) interface(&zend_ce_arrayaccess); - } + Class(const char *name, int flags = 0) : ClassBase(name, flags) {} /** * Copy constructor @@ -182,14 +157,6 @@ public: void property(const char *name, bool value, int flags = Public) { ClassBase::property(name, value, flags); } void property(const char *name, double value, int flags = Public) { ClassBase::property(name, value, flags); } -protected: - /** - * Protected constructor - * @param name - * @param flags - */ - Class(const char *name, int flags) : ClassBase(name, flags) {} - private: /** * Construct a new instance of the object |