summaryrefslogtreecommitdiff
path: root/zend/ini.cpp
diff options
context:
space:
mode:
authorvalmat <ufabiz@gmail.com>2014-04-09 12:00:33 +0600
committervalmat <ufabiz@gmail.com>2014-04-09 12:00:33 +0600
commit21ba3f0aae94206457327552666d75dd2cf0a8f2 (patch)
tree266b24a9d549189d4a20f1db45d8edc771e32fca /zend/ini.cpp
parent6c7c846edd5b74450b76532da33c25e6cc6a10a4 (diff)
Made compatible. Now works in the new structure of the library.
Diffstat (limited to 'zend/ini.cpp')
-rw-r--r--zend/ini.cpp57
1 files changed, 57 insertions, 0 deletions
diff --git a/zend/ini.cpp b/zend/ini.cpp
new file mode 100644
index 0000000..e6a9888
--- /dev/null
+++ b/zend/ini.cpp
@@ -0,0 +1,57 @@
+/**
+ * Ini.cpp
+ *
+ * Implementation for ....
+ *
+ * @copyright 2013 Copernica BV
+ */
+#include "includes.h"
+
+/**
+ * Set up namespace
+ */
+namespace Php {
+
+ /**
+ * Filling ini_entries
+ * @param zend_ini_entry *ini_entry, int module_number
+ * @param int module_number
+ */
+ void Ini::fill(zend_ini_entry *ini_entry, int module_number)
+ {
+ ini_entry->module_number = module_number;
+ ini_entry->modifiable = static_cast<int>(this->_place);
+ ini_entry->name = const_cast<char*>(this->_name);
+ ini_entry->name_length = strlen(this->_name)+1;
+ ini_entry->on_modify = OnUpdateString;
+ ini_entry->mh_arg1 = nullptr;
+ #ifdef ZTS
+ ini_entry->mh_arg2 = (void *) &phpcpp_globals_id;
+ #else
+ ini_entry->mh_arg2 = (void *) &phpcpp_globals;
+ #endif
+ ini_entry->mh_arg3 = nullptr;
+ ini_entry->value = const_cast<char*>(this->_value.c_str());
+ ini_entry->value_length = this->_value.size();
+ if( this->_orig_empty)
+ {
+ ini_entry->orig_value = nullptr;
+ ini_entry->orig_value_length = 0;
+ }
+ else
+ {
+ ini_entry->orig_value = const_cast<char*>(this->_orig_value.c_str());
+ ini_entry->orig_value_length = this->_orig_value.size();
+ }
+ ini_entry->orig_modifiable = 0;
+ ini_entry->modified = 0;
+ ini_entry->displayer = nullptr;
+ }
+
+
+/**
+ * End of namespace
+ */
+}
+
+