diff options
Diffstat (limited to 'include/base.h')
-rw-r--r-- | include/base.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/include/base.h b/include/base.h new file mode 100644 index 0000000..eceb114 --- /dev/null +++ b/include/base.h @@ -0,0 +1,56 @@ +/** + * Base class for defining your own objects + * + * @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com> + * @copyright 2013 Copernica BV + */ + +/** + * Namespace + */ +namespace Php { + +/** + * Class definition + */ +class Base +{ +public: + /** + * The pseudo constructor that is called from PHP after the object is constructed + * @param environment + * @param parameters + */ + virtual void __construct(Environment &environment, const Parameters ¶meters) + { + // call all other possible implementations + __construct(environment); + __construct(parameters); + __construct(); + } + + /** + * The pseudo constructor that is called from PHP after the object is constructed + * @param environment + */ + virtual void __construct(Environment &environment) {} + + /** + * The pseudo constructor that is called from PHP after the object is constructed + * @param parameters + */ + virtual void __construct(const Parameters ¶meters) {} + + /** + * The pseudo constructor that is called from PHP after the object is constructed + */ + virtual void __construct() {} + + +}; + +/** + * End of namespace + */ +} + |