diff options
author | valmat <ufabiz@gmail.com> | 2014-04-10 11:09:22 +0600 |
---|---|---|
committer | valmat <ufabiz@gmail.com> | 2014-04-10 11:09:22 +0600 |
commit | 1a6b709b8f732ea8a91b07a74f64928e0484b1f6 (patch) | |
tree | 2a9572b6b00293abc84ab947f6cbb952644ecaed | |
parent | 21ba3f0aae94206457327552666d75dd2cf0a8f2 (diff) |
Php::Ini::Place::System --> Php::Ini::System
Proposed here: https://github.com/CopernicaMarketingSoftware/PHP-CPP/issues/64#issuecomment-39838981
-rw-r--r-- | include/ini.h | 3 | ||||
-rw-r--r-- | tests/cpp/main.cpp | 17 |
2 files changed, 8 insertions, 12 deletions
diff --git a/include/ini.h b/include/ini.h index b881cfe..2223bee 100644 --- a/include/ini.h +++ b/include/ini.h @@ -33,14 +33,13 @@ namespace Php { * Usually you would choose where the setting can be changed based on how it is used. For example if you want to access * the setting during RINIT stage then you would want PHP_INI_PERDIR because the setting would have no use after RINIT. */ - enum class Place : int { + enum Place : int { User = (1<<0), // ZEND_INI_USER (1<<0) Perdir = (1<<1), // ZEND_INI_PERDIR (1<<1) System = (1<<2), // ZEND_INI_SYSTEM (1<<2) All = (1<<0) | (1<<1) | (1<<2) // ZEND_INI_ALL (ZEND_INI_USER|ZEND_INI_PERDIR|ZEND_INI_SYSTEM) }; - /** * default constructors */ diff --git a/tests/cpp/main.cpp b/tests/cpp/main.cpp index c563c8d..334398a 100644 --- a/tests/cpp/main.cpp +++ b/tests/cpp/main.cpp @@ -129,30 +129,27 @@ extern "C" extension.add(std::move(cObj2Scalar)); + /** + * tests ini entries + * + */ extension .add(Php::Ini("ini1", "valIni1")) .add(Php::Ini("ini2", "valIni2", "OrigValIni2")) - .add(Php::Ini("ini3", "valIni3", "OrigValIni3", Php::Ini::Place::System)) + .add(Php::Ini("ini3", "valIni3", "OrigValIni3", Php::Ini::System)) .add(Php::Ini("ini4", true, false, Php::Ini::Place::User)) .add(Php::Ini("ini5", false)); Php::Ini ini6("ini6", 55, 11); extension .add(ini6) - .add(Php::Ini("ini7", 74)); + .add(Php::Ini("ini7", 74,5)); Php::Ini ini8("ini8", 3.1415926, 6.2831852); - Php::Ini ini9("ini9", 2.7182818, 5.4365636, Php::Ini::Place::User); + Php::Ini ini9("ini9", 2.7182818, 5.4365636, Php::Ini::User); extension.add(ini8); extension.add(std::move(ini9)); - - - - /** - * tests ini entries - * - */ extension.add("TestIniEntries\\iniTest1", TestIniEntries::iniTest1); |