diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-09-25 05:23:34 -0700 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-09-25 05:23:34 -0700 |
commit | 49ac629257835426c311fb7b92b23a9138a9d77b (patch) | |
tree | d7f8d6d843206ecdf29b3877a5e7faf7815f3f24 /include/base.h | |
parent | 9e1ecc534bace7d00a265a49018c0148a56361ae (diff) |
Work in progress on implementing classes
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 + */ +} + |