summaryrefslogtreecommitdiff
path: root/src/stringmember.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stringmember.h')
-rw-r--r--src/stringmember.h83
1 files changed, 0 insertions, 83 deletions
diff --git a/src/stringmember.h b/src/stringmember.h
deleted file mode 100644
index e58cd3d..0000000
--- a/src/stringmember.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * StringMember.h
- *
- * Implementation for a property that is initially set to a strnig value
- *
- * @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
- * @copyright 2013 Copernica BV
- */
-
-/**
- * Set up namespace
- */
-namespace Php {
-
-/**
- * Class definition
- */
-class StringMember : public Member
-{
-private:
- /**
- * The value
- * @var string
- */
- std::string _value;
-
-public:
- /**
- * Constructor
- * @param name
- * @param value
- * @param size
- * @param flags
- */
- StringMember(const char *name, const char *value, size_t size, int flags) : Member(name, flags), _value(value, size) {}
-
- /**
- * Constructor
- * @param name
- * @param value
- * @param flags
- */
- StringMember(const char *name, const char *value, int flags) : StringMember(name, value, strlen(value), flags) {}
-
- /**
- * Constructor
- * @param name
- * @param value
- * @param flags
- */
- StringMember(const char *name, const std::string &value, int flags) : Member(name, flags), _value(value) {}
-
- /**
- * Destructor
- */
- virtual ~StringMember() {}
-
- /**
- * Virtual method to declare class constant
- * @param entry Class entry
- * @param tsrm_ls
- */
- virtual void constant(struct _zend_class_entry *entry TSRMLS_DC) override
- {
- zend_declare_class_constant_stringl(entry, _name.c_str(), _name.size(), _value.c_str(), _value.size() TSRMLS_CC);
- }
-
- /**
- * Virtual method to declare the property
- * @param entry Class entry
- */
- virtual void declare(struct _zend_class_entry *entry TSRMLS_DC) override
- {
- // cast to char* is necessary for php 5.3
- zend_declare_property_stringl(entry, (char *)_name.c_str(), _name.size(), (char *)_value.c_str(), _value.size(), _flags TSRMLS_CC);
- }
-};
-
-/**
- * End of namespace
- */
-}
-