diff options
Diffstat (limited to 'zend')
-rw-r--r-- | zend/includes.h | 2 | ||||
-rw-r--r-- | zend/super.cpp | 32 |
2 files changed, 4 insertions, 30 deletions
diff --git a/zend/includes.h b/zend/includes.h index 0b6a138..1552778 100644 --- a/zend/includes.h +++ b/zend/includes.h @@ -63,8 +63,8 @@ #include "../include/byval.h" #include "../include/byref.h" #include "../include/global.h" -#include "../include/super.h" #include "../include/hashmember.h" +#include "../include/super.h" #include "../include/parameters.h" #include "../include/modifiers.h" #include "../include/base.h" diff --git a/zend/super.cpp b/zend/super.cpp index a2fa0a9..ea690fe 100644 --- a/zend/super.cpp +++ b/zend/super.cpp @@ -23,33 +23,10 @@ Super FILES (TRACK_VARS_FILES, "_FILES"); Super REQUEST (TRACK_VARS_REQUEST, "_REQUEST"); /** - * Array access operator - * This can be used for accessing associative arrays - * @param key + * Convert object to a value * @return Value */ -Value Super::operator[](const std::string &key) -{ - // we need the tsrm_ls pointer - TSRMLS_FETCH(); - - // call zend_is_auto_global to ensure that the just-in-time globals are loaded - if (_name) { zend_is_auto_global(_name, ::strlen(_name) TSRMLS_CC); _name = nullptr; } - - // create a value object that wraps around the actual zval - Value value(PG(http_globals)[_index]); - - // pass on the call - return value.get(key); -} - -/** - * Array access operator - * This can be used for accessing associative arrays - * @param key - * @return Value - */ -Value Super::operator[](const char *key) +Value Super::value() { // we need the tsrm_ls pointer TSRMLS_FETCH(); @@ -58,10 +35,7 @@ Value Super::operator[](const char *key) if (_name) { zend_is_auto_global(_name, ::strlen(_name) TSRMLS_CC); _name = nullptr; } // create a value object that wraps around the actual zval - Value value(PG(http_globals)[_index]); - - // pass on the call - return value.get(key); + return Value(PG(http_globals)[_index]); } /** |