diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml
index 945244d1e9b..e66511f9bf6 100644
--- a/.github/workflows/build-docker.yml
+++ b/.github/workflows/build-docker.yml
@@ -15,7 +15,11 @@ jobs:
strategy:
fail-fast: false
matrix:
- php: [ '8.1', '8.2', '8.3', '8.4' ]
+ php:
+ - '8.1'
+ - '8.2'
+ - '8.3'
+ - '8.4'
name: Build Dockerfile PHP ${{ matrix.php }}
steps:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index f2c0a040bc4..4ab9c6cb5b6 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -19,7 +19,7 @@ on:
env:
# All versions should be declared here
- PHALCON_VERSION: 5.9.1
+ PHALCON_VERSION: 5.9.2
ZEPHIR_PARSER_VERSION: 1.6.1
# For tests
@@ -40,7 +40,7 @@ jobs:
# https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#limitations
setup_workflow:
name: Setup workflow
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
outputs:
zephir_extensions: ${{ steps.setup-zephir-ext.outputs.extensions }}
@@ -56,9 +56,14 @@ jobs:
permissions:
contents: read
- uses: zephir-lang/templates/.github/workflows/phpcs.yml@main
- with:
- standard: ./phpcs.xml
+ name: Check code style
+
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Run PHP_CodeSniffer
+ run: docker run --rm -v $(pwd):/data cytopia/phpcs --standard=./phpcs.xml
# Generate stubs and validates with PSALM
stubs:
diff --git a/CHANGELOG-5.0.md b/CHANGELOG-5.0.md
index 93968c0d2d5..5e4005ad259 100644
--- a/CHANGELOG-5.0.md
+++ b/CHANGELOG-5.0.md
@@ -1,5 +1,18 @@
# Changelog
+## [5.9.2](https://github.com/phalcon/cphalcon/releases/tag/v5.9.2) (2025-04-03)
+
+### Changed
+
+### Added
+
+### Fixed
+
+- Fixed `Phalcon\Translate\Adapter\Csv` the `escape` argument is explicitly required in PHP 8.4 [#16733](https://github.com/phalcon/cphalcon/issues/16733)
+- Fixed `Phalcon\Mvc\Model\Query` to use the cacheOptions lifetime over the "cache" service lifetime
+
+### Removed
+
## [5.9.1](https://github.com/phalcon/cphalcon/releases/tag/v5.9.1) (2025-03-31)
### Changed
diff --git a/build/phalcon/phalcon.zep.c b/build/phalcon/phalcon.zep.c
index 2af53484c9f..a215fb277f3 100644
--- a/build/phalcon/phalcon.zep.c
+++ b/build/phalcon/phalcon.zep.c
@@ -108558,12 +108558,13 @@ static PHP_METHOD(Phalcon_Translate_Adapter_Csv, __construct)
zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL;
zend_long ZEPHIR_LAST_CALL_STATUS;
zval options;
- zval *interpolator, interpolator_sub, *options_param = NULL, delimiter, enclosure, _0, _1;
+ zval *interpolator, interpolator_sub, *options_param = NULL, delimiter, enclosure, escape, _0, _1;
zval *this_ptr = getThis();
ZVAL_UNDEF(&interpolator_sub);
ZVAL_UNDEF(&delimiter);
ZVAL_UNDEF(&enclosure);
+ ZVAL_UNDEF(&escape);
ZVAL_UNDEF(&_0);
ZVAL_UNDEF(&_1);
ZVAL_UNDEF(&options);
@@ -108578,26 +108579,33 @@ static PHP_METHOD(Phalcon_Translate_Adapter_Csv, __construct)
ZEPHIR_CALL_PARENT(NULL, phalcon_translate_adapter_csv_ce, getThis(), "__construct", NULL, 0, interpolator, &options);
zephir_check_call_status();
if (UNEXPECTED(!(zephir_array_isset_string(&options, SL("content"))))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_translate_exception_ce, "Parameter 'content' is required", "phalcon/Translate/Adapter/Csv.zep", 48);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_translate_exception_ce, "Parameter 'content' is required", "phalcon/Translate/Adapter/Csv.zep", 49);
return;
}
if (zephir_array_isset_string(&options, SL("delimiter"))) {
zephir_memory_observe(&delimiter);
- zephir_array_fetch_string(&delimiter, &options, SL("delimiter"), PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 52);
+ zephir_array_fetch_string(&delimiter, &options, SL("delimiter"), PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 53);
} else {
ZEPHIR_INIT_NVAR(&delimiter);
ZVAL_STRING(&delimiter, ";");
}
if (zephir_array_isset_string(&options, SL("enclosure"))) {
zephir_memory_observe(&enclosure);
- zephir_array_fetch_string(&enclosure, &options, SL("enclosure"), PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 58);
+ zephir_array_fetch_string(&enclosure, &options, SL("enclosure"), PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 59);
} else {
ZEPHIR_INIT_NVAR(&enclosure);
ZVAL_STRING(&enclosure, "\"");
}
- zephir_array_fetch_string(&_0, &options, SL("content"), PH_NOISY | PH_READONLY, "phalcon/Translate/Adapter/Csv.zep", 63);
+ if (zephir_array_isset_string(&options, SL("escape"))) {
+ zephir_memory_observe(&escape);
+ zephir_array_fetch_string(&escape, &options, SL("escape"), PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 65);
+ } else {
+ ZEPHIR_INIT_NVAR(&escape);
+ ZVAL_STRING(&escape, "\\");
+ }
+ zephir_array_fetch_string(&_0, &options, SL("content"), PH_NOISY | PH_READONLY, "phalcon/Translate/Adapter/Csv.zep", 70);
ZVAL_LONG(&_1, 0);
- ZEPHIR_CALL_METHOD(NULL, this_ptr, "load", NULL, 0, &_0, &_1, &delimiter, &enclosure);
+ ZEPHIR_CALL_METHOD(NULL, this_ptr, "load", NULL, 0, &_0, &_1, &delimiter, &enclosure, &escape);
zephir_check_call_status();
ZEPHIR_MM_RESTORE();
}
@@ -108711,13 +108719,14 @@ static PHP_METHOD(Phalcon_Translate_Adapter_Csv, load)
zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL;
zephir_fcall_cache_entry *_4 = NULL;
zend_long length, ZEPHIR_LAST_CALL_STATUS;
- zval *file_param = NULL, *length_param = NULL, *delimiter_param = NULL, *enclosure_param = NULL, data, fileHandler, _0, _1$$3, _3$$4, _5$$4, _6$$4, _7$$4, _9$$4, _10$$4;
- zval file, delimiter, enclosure, _2$$3;
+ zval *file_param = NULL, *length_param = NULL, *delimiter_param = NULL, *enclosure_param = NULL, *escape_param = NULL, data, fileHandler, _0, _1$$3, _3$$4, _5$$4, _6$$4, _7$$4, _9$$4, _10$$4;
+ zval file, delimiter, enclosure, escape, _2$$3;
zval *this_ptr = getThis();
ZVAL_UNDEF(&file);
ZVAL_UNDEF(&delimiter);
ZVAL_UNDEF(&enclosure);
+ ZVAL_UNDEF(&escape);
ZVAL_UNDEF(&_2$$3);
ZVAL_UNDEF(&data);
ZVAL_UNDEF(&fileHandler);
@@ -108729,18 +108738,20 @@ static PHP_METHOD(Phalcon_Translate_Adapter_Csv, load)
ZVAL_UNDEF(&_7$$4);
ZVAL_UNDEF(&_9$$4);
ZVAL_UNDEF(&_10$$4);
- ZEND_PARSE_PARAMETERS_START(4, 4)
+ ZEND_PARSE_PARAMETERS_START(5, 5)
Z_PARAM_STR(file)
Z_PARAM_LONG(length)
Z_PARAM_STR(delimiter)
Z_PARAM_STR(enclosure)
+ Z_PARAM_STR(escape)
ZEND_PARSE_PARAMETERS_END();
ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0);
zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__);
- zephir_fetch_params(1, 4, 0, &file_param, &length_param, &delimiter_param, &enclosure_param);
+ zephir_fetch_params(1, 5, 0, &file_param, &length_param, &delimiter_param, &enclosure_param, &escape_param);
zephir_get_strval(&file, file_param);
zephir_get_strval(&delimiter, delimiter_param);
zephir_get_strval(&enclosure, enclosure_param);
+ zephir_get_strval(&escape, escape_param);
ZEPHIR_INIT_VAR(&_0);
ZVAL_STRING(&_0, "rb");
ZEPHIR_CALL_METHOD(&fileHandler, this_ptr, "phpfopen", NULL, 0, &file, &_0);
@@ -108752,18 +108763,18 @@ static PHP_METHOD(Phalcon_Translate_Adapter_Csv, load)
ZEPHIR_CONCAT_SVS(&_2$$3, "Error opening translation file '", &file, "'");
ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3);
zephir_check_call_status();
- zephir_throw_exception_debug(&_1$$3, "phalcon/Translate/Adapter/Csv.zep", 129);
+ zephir_throw_exception_debug(&_1$$3, "phalcon/Translate/Adapter/Csv.zep", 137);
ZEPHIR_MM_RESTORE();
return;
}
while (1) {
ZVAL_LONG(&_3$$4, length);
- ZEPHIR_CALL_FUNCTION(&data, "fgetcsv", &_4, 0, &fileHandler, &_3$$4, &delimiter, &enclosure);
+ ZEPHIR_CALL_FUNCTION(&data, "fgetcsv", &_4, 0, &fileHandler, &_3$$4, &delimiter, &enclosure, &escape);
zephir_check_call_status();
if (ZEPHIR_IS_FALSE_IDENTICAL(&data)) {
break;
}
- zephir_array_fetch_long(&_5$$4, &data, 0, PH_NOISY | PH_READONLY, "phalcon/Translate/Adapter/Csv.zep", 139);
+ zephir_array_fetch_long(&_5$$4, &data, 0, PH_NOISY | PH_READONLY, "phalcon/Translate/Adapter/Csv.zep", 147);
ZVAL_LONG(&_3$$4, 0);
ZVAL_LONG(&_6$$4, 1);
ZEPHIR_INIT_NVAR(&_7$$4);
@@ -108775,9 +108786,9 @@ static PHP_METHOD(Phalcon_Translate_Adapter_Csv, load)
if (_8$$4) {
continue;
}
- zephir_array_fetch_long(&_9$$4, &data, 1, PH_NOISY | PH_READONLY, "phalcon/Translate/Adapter/Csv.zep", 143);
+ zephir_array_fetch_long(&_9$$4, &data, 1, PH_NOISY | PH_READONLY, "phalcon/Translate/Adapter/Csv.zep", 151);
ZEPHIR_OBS_NVAR(&_10$$4);
- zephir_array_fetch_long(&_10$$4, &data, 0, PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 143);
+ zephir_array_fetch_long(&_10$$4, &data, 0, PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 151);
zephir_update_property_array(this_ptr, SL("translate"), &_10$$4, &_9$$4);
}
zephir_fclose(&fileHandler);
@@ -138085,10 +138096,10 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, clean)
static PHP_METHOD(Phalcon_Mvc_Model_Query, execute)
{
- zval _5$$8;
+ zval _5$$7;
zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL;
zend_long ZEPHIR_LAST_CALL_STATUS;
- zval *bindParams_param = NULL, *bindTypes_param = NULL, adapter, cache, cacheLifetime, cacheOptions, cacheService, defaultBindParams, defaultBindTypes, intermediate, key, lifetime, mergedParams, mergedTypes, preparedResult, result, type, uniqueRow, _0, _1$$3, _2$$3, _3$$3, _4$$8, _6$$10, _7$$20, _8$$20;
+ zval *bindParams_param = NULL, *bindTypes_param = NULL, adapter, cache, cacheLifetime, cacheOptions, cacheService, defaultBindParams, defaultBindTypes, intermediate, key, lifetime, mergedParams, mergedTypes, preparedResult, result, type, uniqueRow, _0, _1$$3, _2$$3, _3$$3, _4$$7, _6$$9, _7$$19, _8$$19;
zval bindParams, bindTypes;
zval *this_ptr = getThis();
@@ -138114,11 +138125,11 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, execute)
ZVAL_UNDEF(&_1$$3);
ZVAL_UNDEF(&_2$$3);
ZVAL_UNDEF(&_3$$3);
- ZVAL_UNDEF(&_4$$8);
- ZVAL_UNDEF(&_6$$10);
- ZVAL_UNDEF(&_7$$20);
- ZVAL_UNDEF(&_8$$20);
- ZVAL_UNDEF(&_5$$8);
+ ZVAL_UNDEF(&_4$$7);
+ ZVAL_UNDEF(&_6$$9);
+ ZVAL_UNDEF(&_7$$19);
+ ZVAL_UNDEF(&_8$$19);
+ ZVAL_UNDEF(&_5$$7);
ZEND_PARSE_PARAMETERS_START(0, 2)
Z_PARAM_OPTIONAL
Z_PARAM_ARRAY(bindParams)
@@ -138153,11 +138164,6 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, execute)
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A cache key must be provided to identify the cached resultset in the cache backend", "phalcon/Mvc/Model/Query.zep", 283);
return;
}
- zephir_memory_observe(&lifetime);
- if (!(zephir_array_isset_string_fetch(&lifetime, &cacheOptions, SL("lifetime"), 0))) {
- ZEPHIR_INIT_NVAR(&lifetime);
- ZVAL_LONG(&lifetime, 3600);
- }
zephir_memory_observe(&cacheService);
if (!(zephir_array_isset_string_fetch(&cacheService, &cacheOptions, SL("service"), 0))) {
ZEPHIR_INIT_NVAR(&cacheService);
@@ -138171,13 +138177,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, execute)
ZEPHIR_CALL_FUNCTION(&_3$$3, "is_a", NULL, 87, &cache, &_2$$3);
zephir_check_call_status();
if (UNEXPECTED(!ZEPHIR_IS_TRUE_IDENTICAL(&_3$$3))) {
- ZEPHIR_INIT_VAR(&_4$$8);
- object_init_ex(&_4$$8, phalcon_mvc_model_exception_ce);
- ZEPHIR_INIT_VAR(&_5$$8);
- ZEPHIR_CONCAT_SS(&_5$$8, "Cache service must be an object implementing ", "Phalcon\\Cache\\CacheInterface");
- ZEPHIR_CALL_METHOD(NULL, &_4$$8, "__construct", NULL, 33, &_5$$8);
+ ZEPHIR_INIT_VAR(&_4$$7);
+ object_init_ex(&_4$$7, phalcon_mvc_model_exception_ce);
+ ZEPHIR_INIT_VAR(&_5$$7);
+ ZEPHIR_CONCAT_SS(&_5$$7, "Cache service must be an object implementing ", "Phalcon\\Cache\\CacheInterface");
+ ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", NULL, 33, &_5$$7);
zephir_check_call_status();
- zephir_throw_exception_debug(&_4$$8, "phalcon/Mvc/Model/Query.zep", 303);
+ zephir_throw_exception_debug(&_4$$7, "phalcon/Mvc/Model/Query.zep", 296);
ZEPHIR_MM_RESTORE();
return;
}
@@ -138185,18 +138191,19 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, execute)
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&cacheLifetime, &adapter, "getlifetime", NULL, 0);
zephir_check_call_status();
- if (!ZEPHIR_IS_IDENTICAL(&lifetime, &cacheLifetime)) {
+ zephir_memory_observe(&lifetime);
+ if (!(zephir_array_isset_string_fetch(&lifetime, &cacheOptions, SL("lifetime"), 0))) {
ZEPHIR_CPY_WRT(&lifetime, &cacheLifetime);
}
ZEPHIR_CALL_METHOD(&result, &cache, "get", NULL, 0, &key);
zephir_check_call_status();
if (!(ZEPHIR_IS_EMPTY(&result))) {
if (UNEXPECTED(Z_TYPE_P(&result) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Cache didn't return a valid resultset", "phalcon/Mvc/Model/Query.zep", 322);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Cache didn't return a valid resultset", "phalcon/Mvc/Model/Query.zep", 316);
return;
}
- ZVAL_BOOL(&_6$$10, 0);
- ZEPHIR_CALL_METHOD(NULL, &result, "setisfresh", NULL, 0, &_6$$10);
+ ZVAL_BOOL(&_6$$9, 0);
+ ZEPHIR_CALL_METHOD(NULL, &result, "setisfresh", NULL, 0, &_6$$9);
zephir_check_call_status();
if (zephir_is_true(&uniqueRow)) {
ZEPHIR_CALL_METHOD(&preparedResult, &result, "getfirst", NULL, 0);
@@ -138245,20 +138252,20 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, execute)
zephir_check_call_status();
break;
}
- ZEPHIR_INIT_VAR(&_7$$20);
- object_init_ex(&_7$$20, phalcon_mvc_model_exception_ce);
- ZEPHIR_INIT_VAR(&_8$$20);
- ZEPHIR_CONCAT_SV(&_8$$20, "Unknown statement ", &type);
- ZEPHIR_CALL_METHOD(NULL, &_7$$20, "__construct", NULL, 33, &_8$$20);
+ ZEPHIR_INIT_VAR(&_7$$19);
+ object_init_ex(&_7$$19, phalcon_mvc_model_exception_ce);
+ ZEPHIR_INIT_VAR(&_8$$19);
+ ZEPHIR_CONCAT_SV(&_8$$19, "Unknown statement ", &type);
+ ZEPHIR_CALL_METHOD(NULL, &_7$$19, "__construct", NULL, 33, &_8$$19);
zephir_check_call_status();
- zephir_throw_exception_debug(&_7$$20, "phalcon/Mvc/Model/Query.zep", 405);
+ zephir_throw_exception_debug(&_7$$19, "phalcon/Mvc/Model/Query.zep", 399);
ZEPHIR_MM_RESTORE();
return;
} while(0);
if (Z_TYPE_P(&cacheOptions) != IS_NULL) {
if (!ZEPHIR_IS_LONG(&type, 309)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only PHQL statements that return resultsets can be cached", "phalcon/Mvc/Model/Query.zep", 418);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only PHQL statements that return resultsets can be cached", "phalcon/Mvc/Model/Query.zep", 412);
return;
}
ZEPHIR_CALL_METHOD(NULL, &cache, "set", NULL, 0, &key, &result, &lifetime);
@@ -138380,7 +138387,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSql)
zephir_check_call_status();
RETURN_MM();
}
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "This type of statement generates multiple SQL statements", "phalcon/Mvc/Model/Query.zep", 524);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "This type of statement generates multiple SQL statements", "phalcon/Mvc/Model/Query.zep", 518);
return;
}
@@ -138443,7 +138450,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, parse)
zephir_read_static_property_ce(&_1$$5, phalcon_mvc_model_query_ce, SL("internalPhqlCache"), PH_NOISY_CC | PH_READONLY);
if (zephir_array_isset_fetch(&irPhql, &_1$$5, &uniqueId, 0)) {
if (Z_TYPE_P(&irPhql) == IS_ARRAY) {
- zephir_array_fetch_string(&_2$$7, &ast, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 589);
+ zephir_array_fetch_string(&_2$$7, &ast, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 583);
zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_2$$7);
RETURN_CCTOR(&irPhql);
}
@@ -138480,7 +138487,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, parse)
ZEPHIR_CONCAT_SVSV(&_4$$13, "Unknown statement ", &type, ", when preparing: ", &phql);
ZEPHIR_CALL_METHOD(NULL, &_3$$13, "__construct", NULL, 33, &_4$$13);
zephir_check_call_status();
- zephir_throw_exception_debug(&_3$$13, "phalcon/Mvc/Model/Query.zep", 623);
+ zephir_throw_exception_debug(&_3$$13, "phalcon/Mvc/Model/Query.zep", 617);
ZEPHIR_MM_RESTORE();
return;
} while(0);
@@ -138488,7 +138495,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, parse)
}
}
if (UNEXPECTED(Z_TYPE_P(&irPhql) != IS_ARRAY)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted AST", "phalcon/Mvc/Model/Query.zep", 629);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted AST", "phalcon/Mvc/Model/Query.zep", 623);
return;
}
if (Z_TYPE_P(&uniqueId) == IS_LONG) {
@@ -138596,7 +138603,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, setDI)
ZEPHIR_CALL_METHOD(&manager, container, "getshared", NULL, 0, &_0);
zephir_check_call_status();
if (UNEXPECTED(Z_TYPE_P(&manager) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Injected service 'modelsManager' is invalid", "phalcon/Mvc/Model/Query.zep", 693);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Injected service 'modelsManager' is invalid", "phalcon/Mvc/Model/Query.zep", 687);
return;
}
ZEPHIR_INIT_NVAR(&_0);
@@ -138604,7 +138611,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, setDI)
ZEPHIR_CALL_METHOD(&metaData, container, "getshared", NULL, 0, &_0);
zephir_check_call_status();
if (UNEXPECTED(Z_TYPE_P(&metaData) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Injected service 'modelsMetaData' is invalid", "phalcon/Mvc/Model/Query.zep", 699);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Injected service 'modelsMetaData' is invalid", "phalcon/Mvc/Model/Query.zep", 693);
return;
}
zephir_update_property_zval(this_ptr, ZEND_STRL("manager"), &manager);
@@ -138747,13 +138754,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeDelete)
zephir_get_arrval(&bindParams, bindParams_param);
zephir_get_arrval(&bindTypes, bindTypes_param);
zephir_memory_observe(&models);
- zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 767);
+ zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 761);
if (UNEXPECTED(zephir_array_isset_long(&models, 1))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Delete from several models at the same time is still not supported", "phalcon/Mvc/Model/Query.zep", 772);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Delete from several models at the same time is still not supported", "phalcon/Mvc/Model/Query.zep", 766);
return;
}
zephir_memory_observe(&modelName);
- zephir_array_fetch_long(&modelName, &models, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 775);
+ zephir_array_fetch_long(&modelName, &models, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 769);
zephir_memory_observe(&model);
zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC | PH_READONLY);
if (!(zephir_array_isset_fetch(&model, &_0, &modelName, 0))) {
@@ -138812,7 +138819,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeDelete)
ZEPHIR_CPY_WRT(&exception, &_9$$6);
ZEPHIR_CALL_METHOD(NULL, &connection, "rollback", &_10, 0);
zephir_check_call_status();
- zephir_throw_exception_debug(&exception, "phalcon/Mvc/Model/Query.zep", 834);
+ zephir_throw_exception_debug(&exception, "phalcon/Mvc/Model/Query.zep", 828);
ZEPHIR_MM_RESTORE();
return;
}
@@ -138895,7 +138902,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
zephir_get_arrval(&bindParams, bindParams_param);
zephir_get_arrval(&bindTypes, bindTypes_param);
zephir_memory_observe(&modelName);
- zephir_array_fetch_string(&modelName, &intermediate, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 862);
+ zephir_array_fetch_string(&modelName, &intermediate, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 856);
zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&manager, &_0);
zephir_memory_observe(&model);
@@ -138924,16 +138931,16 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
}
}
zephir_memory_observe(&values);
- zephir_array_fetch_string(&values, &intermediate, SL("values"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 897);
+ zephir_array_fetch_string(&values, &intermediate, SL("values"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 891);
if (UNEXPECTED(zephir_fast_count_int(&fields) != zephir_fast_count_int(&values))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The column count does not match the values count", "phalcon/Mvc/Model/Query.zep", 906);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The column count does not match the values count", "phalcon/Mvc/Model/Query.zep", 900);
return;
}
ZEPHIR_CALL_METHOD(&dialect, &connection, "getdialect", NULL, 0);
zephir_check_call_status();
ZEPHIR_INIT_VAR(&insertValues);
array_init(&insertValues);
- zephir_is_iterable(&values, 0, "phalcon/Mvc/Model/Query.zep", 977);
+ zephir_is_iterable(&values, 0, "phalcon/Mvc/Model/Query.zep", 971);
if (Z_TYPE_P(&values) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&values), _4, _5, _2)
{
@@ -138946,8 +138953,8 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
ZEPHIR_INIT_NVAR(&value);
ZVAL_COPY(&value, _2);
ZEPHIR_OBS_NVAR(&exprValue);
- zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 916);
- zephir_array_fetch_string(&_6$$8, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 918);
+ zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 910);
+ zephir_array_fetch_string(&_6$$8, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 912);
do {
if (ZEPHIR_IS_LONG(&_6$$8, 260) || ZEPHIR_IS_LONG(&_6$$8, 258) || ZEPHIR_IS_LONG(&_6$$8, 259)) {
ZEPHIR_CALL_METHOD(&insertValue, &dialect, "getsqlexpression", &_7, 0, &exprValue);
@@ -138976,7 +138983,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
ZEPHIR_CONCAT_SVS(&_13$$12, "Bound parameter '", &wildcard, "' cannot be replaced because it isn't in the placeholders list");
ZEPHIR_CALL_METHOD(NULL, &_12$$12, "__construct", &_14, 33, &_13$$12);
zephir_check_call_status();
- zephir_throw_exception_debug(&_12$$12, "phalcon/Mvc/Model/Query.zep", 942);
+ zephir_throw_exception_debug(&_12$$12, "phalcon/Mvc/Model/Query.zep", 936);
ZEPHIR_MM_RESTORE();
return;
}
@@ -138992,7 +138999,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
} while(0);
ZEPHIR_OBS_NVAR(&fieldName);
- zephir_array_fetch(&fieldName, &fields, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 955);
+ zephir_array_fetch(&fieldName, &fields, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 949);
_18$$8 = automaticFields;
if (_18$$8) {
_18$$8 = Z_TYPE_P(&columnMap) == IS_ARRAY;
@@ -139006,7 +139013,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
ZEPHIR_CONCAT_SVS(&_20$$15, "Column '", &fieldName, "' isn't part of the column map");
ZEPHIR_CALL_METHOD(NULL, &_19$$15, "__construct", &_14, 33, &_20$$15);
zephir_check_call_status();
- zephir_throw_exception_debug(&_19$$15, "phalcon/Mvc/Model/Query.zep", 965);
+ zephir_throw_exception_debug(&_19$$15, "phalcon/Mvc/Model/Query.zep", 959);
ZEPHIR_MM_RESTORE();
return;
}
@@ -139029,8 +139036,8 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
ZEPHIR_CALL_METHOD(&value, &values, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&exprValue);
- zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 916);
- zephir_array_fetch_string(&_21$$17, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 918);
+ zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 910);
+ zephir_array_fetch_string(&_21$$17, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 912);
do {
if (ZEPHIR_IS_LONG(&_21$$17, 260) || ZEPHIR_IS_LONG(&_21$$17, 258) || ZEPHIR_IS_LONG(&_21$$17, 259)) {
ZEPHIR_CALL_METHOD(&insertValue, &dialect, "getsqlexpression", &_22, 0, &exprValue);
@@ -139059,7 +139066,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
ZEPHIR_CONCAT_SVS(&_28$$21, "Bound parameter '", &wildcard, "' cannot be replaced because it isn't in the placeholders list");
ZEPHIR_CALL_METHOD(NULL, &_27$$21, "__construct", &_14, 33, &_28$$21);
zephir_check_call_status();
- zephir_throw_exception_debug(&_27$$21, "phalcon/Mvc/Model/Query.zep", 942);
+ zephir_throw_exception_debug(&_27$$21, "phalcon/Mvc/Model/Query.zep", 936);
ZEPHIR_MM_RESTORE();
return;
}
@@ -139075,7 +139082,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
} while(0);
ZEPHIR_OBS_NVAR(&fieldName);
- zephir_array_fetch(&fieldName, &fields, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 955);
+ zephir_array_fetch(&fieldName, &fields, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 949);
_31$$17 = automaticFields;
if (_31$$17) {
_31$$17 = Z_TYPE_P(&columnMap) == IS_ARRAY;
@@ -139089,7 +139096,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
ZEPHIR_CONCAT_SVS(&_33$$24, "Column '", &fieldName, "' isn't part of the column map");
ZEPHIR_CALL_METHOD(NULL, &_32$$24, "__construct", &_14, 33, &_33$$24);
zephir_check_call_status();
- zephir_throw_exception_debug(&_32$$24, "phalcon/Mvc/Model/Query.zep", 965);
+ zephir_throw_exception_debug(&_32$$24, "phalcon/Mvc/Model/Query.zep", 959);
ZEPHIR_MM_RESTORE();
return;
}
@@ -139255,8 +139262,8 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_VAR(&connectionTypes);
array_init(&connectionTypes);
zephir_memory_observe(&models);
- zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1014);
- zephir_is_iterable(&models, 0, "phalcon/Mvc/Model/Query.zep", 1042);
+ zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1008);
+ zephir_is_iterable(&models, 0, "phalcon/Mvc/Model/Query.zep", 1036);
if (Z_TYPE_P(&models) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&models), _1)
{
@@ -139276,7 +139283,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_check_call_status();
zephir_array_update_zval(&connectionTypes, &_6$$5, &__$true, PH_COPY | PH_SEPARATE);
if (UNEXPECTED(zephir_fast_count_int(&connectionTypes) == 2)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Cannot use models of different database systems in the same query", "phalcon/Mvc/Model/Query.zep", 1037);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Cannot use models of different database systems in the same query", "phalcon/Mvc/Model/Query.zep", 1031);
return;
}
}
@@ -139306,7 +139313,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_check_call_status();
zephir_array_update_zval(&connectionTypes, &_9$$9, &__$true, PH_COPY | PH_SEPARATE);
if (UNEXPECTED(zephir_fast_count_int(&connectionTypes) == 2)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Cannot use models of different database systems in the same query", "phalcon/Mvc/Model/Query.zep", 1037);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Cannot use models of different database systems in the same query", "phalcon/Mvc/Model/Query.zep", 1031);
return;
}
}
@@ -139316,23 +139323,23 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
}
ZEPHIR_INIT_NVAR(&modelName);
zephir_memory_observe(&columns);
- zephir_array_fetch_string(&columns, &intermediate, SL("columns"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1042);
+ zephir_array_fetch_string(&columns, &intermediate, SL("columns"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1036);
haveObjects = 0;
haveScalars = 0;
isComplex = 0;
numberObjects = 0;
ZEPHIR_CPY_WRT(&columns1, &columns);
- zephir_is_iterable(&columns, 0, "phalcon/Mvc/Model/Query.zep", 1070);
+ zephir_is_iterable(&columns, 0, "phalcon/Mvc/Model/Query.zep", 1064);
if (Z_TYPE_P(&columns) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&columns), _10)
{
ZEPHIR_INIT_NVAR(&column);
ZVAL_COPY(&column, _10);
if (UNEXPECTED(Z_TYPE_P(&column) != IS_ARRAY)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid column definition", "phalcon/Mvc/Model/Query.zep", 1054);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid column definition", "phalcon/Mvc/Model/Query.zep", 1048);
return;
}
- zephir_array_fetch_string(&_12$$11, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1057);
+ zephir_array_fetch_string(&_12$$11, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1051);
if (ZEPHIR_IS_STRING(&_12$$11, "scalar")) {
if (!(zephir_array_isset_string(&column, SL("balias")))) {
isComplex = 1;
@@ -139355,10 +139362,10 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_CALL_METHOD(&column, &columns, "current", NULL, 0);
zephir_check_call_status();
if (UNEXPECTED(Z_TYPE_P(&column) != IS_ARRAY)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid column definition", "phalcon/Mvc/Model/Query.zep", 1054);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid column definition", "phalcon/Mvc/Model/Query.zep", 1048);
return;
}
- zephir_array_fetch_string(&_13$$16, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1057);
+ zephir_array_fetch_string(&_13$$16, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1051);
if (ZEPHIR_IS_STRING(&_13$$16, "scalar")) {
if (!(zephir_array_isset_string(&column, SL("balias")))) {
isComplex = 1;
@@ -139396,7 +139403,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
array_init(&simpleColumnMap);
zephir_read_property(&_0, this_ptr, ZEND_STRL("metaData"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&metaData, &_0);
- zephir_is_iterable(&columns, 0, "phalcon/Mvc/Model/Query.zep", 1176);
+ zephir_is_iterable(&columns, 0, "phalcon/Mvc/Model/Query.zep", 1170);
if (Z_TYPE_P(&columns) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&columns), _16, _17, _14)
{
@@ -139409,11 +139416,11 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&column);
ZVAL_COPY(&column, _14);
ZEPHIR_OBS_NVAR(&sqlColumn);
- zephir_array_fetch_string(&sqlColumn, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1093);
- zephir_array_fetch_string(&_18$$28, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1096);
+ zephir_array_fetch_string(&sqlColumn, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1087);
+ zephir_array_fetch_string(&_18$$28, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1090);
if (ZEPHIR_IS_STRING(&_18$$28, "object")) {
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &column, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1097);
+ zephir_array_fetch_string(&modelName, &column, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1091);
ZEPHIR_OBS_NVAR(&instance);
zephir_read_property(&_19$$29, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC | PH_READONLY);
if (!(zephir_array_isset_fetch(&instance, &_19$$29, &modelName, 0))) {
@@ -139431,7 +139438,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&columnMap);
ZVAL_NULL(&columnMap);
}
- zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1133);
+ zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1127);
if (Z_TYPE_P(&attributes) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _23$$31)
{
@@ -139444,7 +139451,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&_26$$34);
ZEPHIR_CONCAT_SVSV(&_26$$34, "_", &sqlColumn, "_", &attribute);
zephir_array_fast_append(&_25$$34, &_26$$34);
- zephir_array_append(&selectColumns, &_25$$34, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1126);
+ zephir_array_append(&selectColumns, &_25$$34, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1120);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &attributes, "rewind", NULL, 0);
@@ -139464,7 +139471,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&_28$$35);
ZEPHIR_CONCAT_SVSV(&_28$$35, "_", &sqlColumn, "_", &attribute);
zephir_array_fast_append(&_27$$35, &_28$$35);
- zephir_array_append(&selectColumns, &_27$$35, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1126);
+ zephir_array_append(&selectColumns, &_27$$35, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1120);
ZEPHIR_CALL_METHOD(NULL, &attributes, "next", NULL, 0);
zephir_check_call_status();
}
@@ -139482,7 +139489,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_array_update_multi(&columns1, &_31$$36, SL("zs"), 3, &aliasCopy, SL("keepSnapshots"));
}
} else {
- zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1150);
+ zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1144);
if (Z_TYPE_P(&attributes) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _32$$37)
{
@@ -139492,7 +139499,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_34$$38, 2, 0);
zephir_array_fast_append(&_34$$38, &attribute);
zephir_array_fast_append(&_34$$38, &sqlColumn);
- zephir_array_append(&selectColumns, &_34$$38, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1148);
+ zephir_array_append(&selectColumns, &_34$$38, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1142);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &attributes, "rewind", NULL, 0);
@@ -139509,7 +139516,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_35$$39, 2, 0);
zephir_array_fast_append(&_35$$39, &attribute);
zephir_array_fast_append(&_35$$39, &sqlColumn);
- zephir_array_append(&selectColumns, &_35$$39, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1148);
+ zephir_array_append(&selectColumns, &_35$$39, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1142);
ZEPHIR_CALL_METHOD(NULL, &attributes, "next", NULL, 0);
zephir_check_call_status();
}
@@ -139532,7 +139539,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_array_fast_append(&_37$$42, &aliasCopy);
ZEPHIR_CPY_WRT(&columnAlias, &_37$$42);
}
- zephir_array_append(&selectColumns, &columnAlias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1161);
+ zephir_array_append(&selectColumns, &columnAlias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1155);
}
_38$$28 = !isComplex;
if (_38$$28) {
@@ -139561,11 +139568,11 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_CALL_METHOD(&column, &columns, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&sqlColumn);
- zephir_array_fetch_string(&sqlColumn, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1093);
- zephir_array_fetch_string(&_39$$46, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1096);
+ zephir_array_fetch_string(&sqlColumn, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1087);
+ zephir_array_fetch_string(&_39$$46, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1090);
if (ZEPHIR_IS_STRING(&_39$$46, "object")) {
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &column, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1097);
+ zephir_array_fetch_string(&modelName, &column, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1091);
ZEPHIR_OBS_NVAR(&instance);
zephir_read_property(&_40$$47, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC | PH_READONLY);
if (!(zephir_array_isset_fetch(&instance, &_40$$47, &modelName, 0))) {
@@ -139583,7 +139590,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&columnMap);
ZVAL_NULL(&columnMap);
}
- zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1133);
+ zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1127);
if (Z_TYPE_P(&attributes) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _44$$49)
{
@@ -139596,7 +139603,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&_47$$52);
ZEPHIR_CONCAT_SVSV(&_47$$52, "_", &sqlColumn, "_", &attribute);
zephir_array_fast_append(&_46$$52, &_47$$52);
- zephir_array_append(&selectColumns, &_46$$52, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1126);
+ zephir_array_append(&selectColumns, &_46$$52, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1120);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &attributes, "rewind", NULL, 0);
@@ -139616,7 +139623,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&_49$$53);
ZEPHIR_CONCAT_SVSV(&_49$$53, "_", &sqlColumn, "_", &attribute);
zephir_array_fast_append(&_48$$53, &_49$$53);
- zephir_array_append(&selectColumns, &_48$$53, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1126);
+ zephir_array_append(&selectColumns, &_48$$53, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1120);
ZEPHIR_CALL_METHOD(NULL, &attributes, "next", NULL, 0);
zephir_check_call_status();
}
@@ -139634,7 +139641,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_array_update_multi(&columns1, &_52$$54, SL("zs"), 3, &aliasCopy, SL("keepSnapshots"));
}
} else {
- zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1150);
+ zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1144);
if (Z_TYPE_P(&attributes) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _53$$55)
{
@@ -139644,7 +139651,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_55$$56, 2, 0);
zephir_array_fast_append(&_55$$56, &attribute);
zephir_array_fast_append(&_55$$56, &sqlColumn);
- zephir_array_append(&selectColumns, &_55$$56, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1148);
+ zephir_array_append(&selectColumns, &_55$$56, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1142);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &attributes, "rewind", NULL, 0);
@@ -139661,7 +139668,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_56$$57, 2, 0);
zephir_array_fast_append(&_56$$57, &attribute);
zephir_array_fast_append(&_56$$57, &sqlColumn);
- zephir_array_append(&selectColumns, &_56$$57, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1148);
+ zephir_array_append(&selectColumns, &_56$$57, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1142);
ZEPHIR_CALL_METHOD(NULL, &attributes, "next", NULL, 0);
zephir_check_call_status();
}
@@ -139683,7 +139690,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_array_fast_append(&_58$$60, &aliasCopy);
ZEPHIR_CPY_WRT(&columnAlias, &_58$$60);
}
- zephir_array_append(&selectColumns, &columnAlias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1161);
+ zephir_array_append(&selectColumns, &columnAlias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1155);
}
_59$$46 = !isComplex;
if (_59$$46) {
@@ -139708,7 +139715,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_VAR(&bindCounts);
array_init(&bindCounts);
zephir_array_update_string(&intermediate, SL("columns"), &selectColumns, PH_COPY | PH_SEPARATE);
- zephir_is_iterable(&bindParams, 0, "phalcon/Mvc/Model/Query.zep", 1197);
+ zephir_is_iterable(&bindParams, 0, "phalcon/Mvc/Model/Query.zep", 1191);
if (Z_TYPE_P(&bindParams) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&bindParams), _62, _63, _60)
{
@@ -139766,7 +139773,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&wildcard);
ZEPHIR_INIT_VAR(&processedTypes);
array_init(&processedTypes);
- zephir_is_iterable(&bindTypes, 0, "phalcon/Mvc/Model/Query.zep", 1210);
+ zephir_is_iterable(&bindTypes, 0, "phalcon/Mvc/Model/Query.zep", 1204);
if (Z_TYPE_P(&bindTypes) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&bindTypes), _68, _69, _66)
{
@@ -139871,7 +139878,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
array_init(&simpleColumnMap);
ZEPHIR_CALL_METHOD(&_74$$90, &metaData, "getattributes", NULL, 0, &resultObject);
zephir_check_call_status();
- zephir_is_iterable(&_74$$90, 0, "phalcon/Mvc/Model/Query.zep", 1298);
+ zephir_is_iterable(&_74$$90, 0, "phalcon/Mvc/Model/Query.zep", 1292);
if (Z_TYPE_P(&_74$$90) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_74$$90), _75$$90)
{
@@ -139881,7 +139888,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_77$$91, 2, 0);
zephir_array_fast_append(&_77$$91, &attribute);
ZEPHIR_OBS_NVAR(&_78$$91);
- zephir_array_fetch(&_78$$91, &typesColumnMap, &attribute, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1296);
+ zephir_array_fetch(&_78$$91, &typesColumnMap, &attribute, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1290);
zephir_array_fast_append(&_77$$91, &_78$$91);
zephir_array_update_zval(&simpleColumnMap, &attribute, &_77$$91, PH_COPY | PH_SEPARATE);
} ZEND_HASH_FOREACH_END();
@@ -139900,7 +139907,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_79$$92, 2, 0);
zephir_array_fast_append(&_79$$92, &attribute);
ZEPHIR_OBS_NVAR(&_80$$92);
- zephir_array_fetch(&_80$$92, &typesColumnMap, &attribute, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1296);
+ zephir_array_fetch(&_80$$92, &typesColumnMap, &attribute, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1290);
zephir_array_fast_append(&_79$$92, &_80$$92);
zephir_array_update_zval(&simpleColumnMap, &attribute, &_79$$92, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, &_74$$90, "next", NULL, 0);
@@ -139910,7 +139917,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&attribute);
} else {
array_init(&simpleColumnMap);
- zephir_is_iterable(&columnMap, 0, "phalcon/Mvc/Model/Query.zep", 1307);
+ zephir_is_iterable(&columnMap, 0, "phalcon/Mvc/Model/Query.zep", 1301);
if (Z_TYPE_P(&columnMap) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&columnMap), _83$$93, _84$$93, _81$$93)
{
@@ -139926,7 +139933,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_85$$94, 2, 0);
zephir_array_fast_append(&_85$$94, &attribute);
ZEPHIR_OBS_NVAR(&_86$$94);
- zephir_array_fetch(&_86$$94, &typesColumnMap, &column, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1305);
+ zephir_array_fetch(&_86$$94, &typesColumnMap, &column, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1299);
zephir_array_fast_append(&_85$$94, &_86$$94);
zephir_array_update_zval(&simpleColumnMap, &column, &_85$$94, PH_COPY | PH_SEPARATE);
} ZEND_HASH_FOREACH_END();
@@ -139947,7 +139954,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_87$$95, 2, 0);
zephir_array_fast_append(&_87$$95, &attribute);
ZEPHIR_OBS_NVAR(&_88$$95);
- zephir_array_fetch(&_88$$95, &typesColumnMap, &column, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1305);
+ zephir_array_fetch(&_88$$95, &typesColumnMap, &column, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1299);
zephir_array_fast_append(&_87$$95, &_88$$95);
zephir_array_update_zval(&simpleColumnMap, &column, &_87$$95, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, &columnMap, "next", NULL, 0);
@@ -139977,7 +139984,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_CONCAT_SVS(&_92$$98, "Resultset class \"", &resultsetClassName, "\" not found");
ZEPHIR_CALL_METHOD(NULL, &_91$$98, "__construct", NULL, 33, &_92$$98);
zephir_check_call_status();
- zephir_throw_exception_debug(&_91$$98, "phalcon/Mvc/Model/Query.zep", 1323);
+ zephir_throw_exception_debug(&_91$$98, "phalcon/Mvc/Model/Query.zep", 1317);
ZEPHIR_MM_RESTORE();
return;
}
@@ -139992,7 +139999,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_CONCAT_SVS(&_96$$99, "Resultset class \"", &resultsetClassName, "\" must be an implementation of Phalcon\\Mvc\\Model\\ResultsetInterface");
ZEPHIR_CALL_METHOD(NULL, &_95$$99, "__construct", NULL, 33, &_96$$99);
zephir_check_call_status();
- zephir_throw_exception_debug(&_95$$99, "phalcon/Mvc/Model/Query.zep", 1329);
+ zephir_throw_exception_debug(&_95$$99, "phalcon/Mvc/Model/Query.zep", 1323);
ZEPHIR_MM_RESTORE();
return;
}
@@ -140095,13 +140102,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
zephir_get_arrval(&bindParams, bindParams_param);
zephir_get_arrval(&bindTypes, bindTypes_param);
zephir_memory_observe(&models);
- zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1378);
+ zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1372);
if (UNEXPECTED(zephir_array_isset_long(&models, 1))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Updating several models at the same time is still not supported", "phalcon/Mvc/Model/Query.zep", 1383);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Updating several models at the same time is still not supported", "phalcon/Mvc/Model/Query.zep", 1377);
return;
}
zephir_memory_observe(&modelName);
- zephir_array_fetch_long(&modelName, &models, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1386);
+ zephir_array_fetch_long(&modelName, &models, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1380);
zephir_memory_observe(&model);
zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC | PH_READONLY);
if (!(zephir_array_isset_fetch(&model, &_0, &modelName, 0))) {
@@ -140114,14 +140121,14 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
ZEPHIR_CALL_METHOD(&dialect, &connection, "getdialect", NULL, 0);
zephir_check_call_status();
zephir_memory_observe(&fields);
- zephir_array_fetch_string(&fields, &intermediate, SL("fields"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1405);
+ zephir_array_fetch_string(&fields, &intermediate, SL("fields"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1399);
zephir_memory_observe(&values);
- zephir_array_fetch_string(&values, &intermediate, SL("values"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1406);
+ zephir_array_fetch_string(&values, &intermediate, SL("values"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1400);
ZEPHIR_INIT_VAR(&updateValues);
array_init(&updateValues);
ZEPHIR_CPY_WRT(&selectBindParams, &bindParams);
ZEPHIR_CPY_WRT(&selectBindTypes, &bindTypes);
- zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 1478);
+ zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 1472);
if (Z_TYPE_P(&fields) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _4, _5, _2)
{
@@ -140134,17 +140141,17 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
ZEPHIR_INIT_NVAR(&field);
ZVAL_COPY(&field, _2);
ZEPHIR_OBS_NVAR(&value);
- zephir_array_fetch(&value, &values, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1421);
+ zephir_array_fetch(&value, &values, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1415);
ZEPHIR_OBS_NVAR(&exprValue);
- zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1422);
+ zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1416);
if (zephir_array_isset_string(&field, SL("balias"))) {
ZEPHIR_OBS_NVAR(&fieldName);
- zephir_array_fetch_string(&fieldName, &field, SL("balias"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1425);
+ zephir_array_fetch_string(&fieldName, &field, SL("balias"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1419);
} else {
ZEPHIR_OBS_NVAR(&fieldName);
- zephir_array_fetch_string(&fieldName, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1427);
+ zephir_array_fetch_string(&fieldName, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1421);
}
- zephir_array_fetch_string(&_6$$5, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1430);
+ zephir_array_fetch_string(&_6$$5, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1424);
do {
if (ZEPHIR_IS_LONG(&_6$$5, 260) || ZEPHIR_IS_LONG(&_6$$5, 258) || ZEPHIR_IS_LONG(&_6$$5, 259)) {
ZEPHIR_CALL_METHOD(&updateValue, &dialect, "getsqlexpression", &_7, 0, &exprValue);
@@ -140173,7 +140180,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
ZEPHIR_CONCAT_SVS(&_13$$11, "Bound parameter '", &wildcard, "' cannot be replaced because it's not in the placeholders list");
ZEPHIR_CALL_METHOD(NULL, &_12$$11, "__construct", &_14, 33, &_13$$11);
zephir_check_call_status();
- zephir_throw_exception_debug(&_12$$11, "phalcon/Mvc/Model/Query.zep", 1453);
+ zephir_throw_exception_debug(&_12$$11, "phalcon/Mvc/Model/Query.zep", 1447);
ZEPHIR_MM_RESTORE();
return;
}
@@ -140182,7 +140189,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
break;
}
if (ZEPHIR_IS_LONG(&_6$$5, 277)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not supported", "phalcon/Mvc/Model/Query.zep", 1462);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not supported", "phalcon/Mvc/Model/Query.zep", 1456);
return;
}
ZEPHIR_INIT_NVAR(&updateValue);
@@ -140210,17 +140217,17 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
ZEPHIR_CALL_METHOD(&field, &fields, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&value);
- zephir_array_fetch(&value, &values, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1421);
+ zephir_array_fetch(&value, &values, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1415);
ZEPHIR_OBS_NVAR(&exprValue);
- zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1422);
+ zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1416);
if (zephir_array_isset_string(&field, SL("balias"))) {
ZEPHIR_OBS_NVAR(&fieldName);
- zephir_array_fetch_string(&fieldName, &field, SL("balias"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1425);
+ zephir_array_fetch_string(&fieldName, &field, SL("balias"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1419);
} else {
ZEPHIR_OBS_NVAR(&fieldName);
- zephir_array_fetch_string(&fieldName, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1427);
+ zephir_array_fetch_string(&fieldName, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1421);
}
- zephir_array_fetch_string(&_18$$14, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1430);
+ zephir_array_fetch_string(&_18$$14, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1424);
do {
if (ZEPHIR_IS_LONG(&_18$$14, 260) || ZEPHIR_IS_LONG(&_18$$14, 258) || ZEPHIR_IS_LONG(&_18$$14, 259)) {
ZEPHIR_CALL_METHOD(&updateValue, &dialect, "getsqlexpression", &_19, 0, &exprValue);
@@ -140249,7 +140256,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
ZEPHIR_CONCAT_SVS(&_25$$20, "Bound parameter '", &wildcard, "' cannot be replaced because it's not in the placeholders list");
ZEPHIR_CALL_METHOD(NULL, &_24$$20, "__construct", &_14, 33, &_25$$20);
zephir_check_call_status();
- zephir_throw_exception_debug(&_24$$20, "phalcon/Mvc/Model/Query.zep", 1453);
+ zephir_throw_exception_debug(&_24$$20, "phalcon/Mvc/Model/Query.zep", 1447);
ZEPHIR_MM_RESTORE();
return;
}
@@ -140258,7 +140265,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
break;
}
if (ZEPHIR_IS_LONG(&_18$$14, 277)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not supported", "phalcon/Mvc/Model/Query.zep", 1462);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not supported", "phalcon/Mvc/Model/Query.zep", 1456);
return;
}
ZEPHIR_INIT_NVAR(&updateValue);
@@ -140330,7 +140337,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
ZEPHIR_CPY_WRT(&exception, &_35$$24);
ZEPHIR_CALL_METHOD(NULL, &connection, "rollback", &_36, 0);
zephir_check_call_status();
- zephir_throw_exception_debug(&exception, "phalcon/Mvc/Model/Query.zep", 1528);
+ zephir_throw_exception_debug(&exception, "phalcon/Mvc/Model/Query.zep", 1522);
ZEPHIR_MM_RESTORE();
return;
}
@@ -140362,7 +140369,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getCallArgument)
zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__);
zephir_fetch_params(1, 1, 0, &argument_param);
ZEPHIR_OBS_COPY_OR_DUP(&argument, argument_param);
- zephir_array_fetch_string(&_0, &argument, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1545);
+ zephir_array_fetch_string(&_0, &argument, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1539);
if (ZEPHIR_IS_LONG(&_0, 352)) {
zephir_create_array(return_value, 1, 0);
add_assoc_stringl_ex(return_value, SL("type"), SL("all"));
@@ -140412,8 +140419,8 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression)
ZEPHIR_OBS_COPY_OR_DUP(&expr, expr_param);
ZEPHIR_INIT_VAR(&whenClauses);
array_init(&whenClauses);
- zephir_array_fetch_string(&_0, &expr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1563);
- zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model/Query.zep", 1578);
+ zephir_array_fetch_string(&_0, &expr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1557);
+ zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model/Query.zep", 1572);
if (Z_TYPE_P(&_0) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_0), _1)
{
@@ -140423,24 +140430,24 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression)
ZEPHIR_INIT_NVAR(&_3$$4);
zephir_create_array(&_3$$4, 3, 0);
add_assoc_stringl_ex(&_3$$4, SL("type"), SL("when"));
- zephir_array_fetch_string(&_5$$4, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1567);
+ zephir_array_fetch_string(&_5$$4, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1561);
ZEPHIR_CALL_METHOD(&_4$$4, this_ptr, "getexpression", &_6, 462, &_5$$4);
zephir_check_call_status();
zephir_array_update_string(&_3$$4, SL("expr"), &_4$$4, PH_COPY | PH_SEPARATE);
- zephir_array_fetch_string(&_7$$4, &whenExpr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1568);
+ zephir_array_fetch_string(&_7$$4, &whenExpr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1562);
ZEPHIR_CALL_METHOD(&_4$$4, this_ptr, "getexpression", &_6, 462, &_7$$4);
zephir_check_call_status();
zephir_array_update_string(&_3$$4, SL("then"), &_4$$4, PH_COPY | PH_SEPARATE);
- zephir_array_append(&whenClauses, &_3$$4, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1569);
+ zephir_array_append(&whenClauses, &_3$$4, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1563);
} else {
ZEPHIR_INIT_NVAR(&_8$$5);
zephir_create_array(&_8$$5, 2, 0);
add_assoc_stringl_ex(&_8$$5, SL("type"), SL("else"));
- zephir_array_fetch_string(&_10$$5, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1573);
+ zephir_array_fetch_string(&_10$$5, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1567);
ZEPHIR_CALL_METHOD(&_9$$5, this_ptr, "getexpression", &_6, 462, &_10$$5);
zephir_check_call_status();
zephir_array_update_string(&_8$$5, SL("expr"), &_9$$5, PH_COPY | PH_SEPARATE);
- zephir_array_append(&whenClauses, &_8$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1574);
+ zephir_array_append(&whenClauses, &_8$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1568);
}
} ZEND_HASH_FOREACH_END();
} else {
@@ -140458,24 +140465,24 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression)
ZEPHIR_INIT_NVAR(&_11$$7);
zephir_create_array(&_11$$7, 3, 0);
add_assoc_stringl_ex(&_11$$7, SL("type"), SL("when"));
- zephir_array_fetch_string(&_13$$7, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1567);
+ zephir_array_fetch_string(&_13$$7, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1561);
ZEPHIR_CALL_METHOD(&_12$$7, this_ptr, "getexpression", &_6, 462, &_13$$7);
zephir_check_call_status();
zephir_array_update_string(&_11$$7, SL("expr"), &_12$$7, PH_COPY | PH_SEPARATE);
- zephir_array_fetch_string(&_14$$7, &whenExpr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1568);
+ zephir_array_fetch_string(&_14$$7, &whenExpr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1562);
ZEPHIR_CALL_METHOD(&_12$$7, this_ptr, "getexpression", &_6, 462, &_14$$7);
zephir_check_call_status();
zephir_array_update_string(&_11$$7, SL("then"), &_12$$7, PH_COPY | PH_SEPARATE);
- zephir_array_append(&whenClauses, &_11$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1569);
+ zephir_array_append(&whenClauses, &_11$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1563);
} else {
ZEPHIR_INIT_NVAR(&_15$$8);
zephir_create_array(&_15$$8, 2, 0);
add_assoc_stringl_ex(&_15$$8, SL("type"), SL("else"));
- zephir_array_fetch_string(&_17$$8, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1573);
+ zephir_array_fetch_string(&_17$$8, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1567);
ZEPHIR_CALL_METHOD(&_16$$8, this_ptr, "getexpression", &_6, 462, &_17$$8);
zephir_check_call_status();
zephir_array_update_string(&_15$$8, SL("expr"), &_16$$8, PH_COPY | PH_SEPARATE);
- zephir_array_append(&whenClauses, &_15$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1574);
+ zephir_array_append(&whenClauses, &_15$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1568);
}
ZEPHIR_CALL_METHOD(NULL, &_0, "next", NULL, 0);
zephir_check_call_status();
@@ -140484,7 +140491,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression)
ZEPHIR_INIT_NVAR(&whenExpr);
zephir_create_array(return_value, 3, 0);
add_assoc_stringl_ex(return_value, SL("type"), SL("case"));
- zephir_array_fetch_string(&_19, &expr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1580);
+ zephir_array_fetch_string(&_19, &expr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1574);
ZEPHIR_CALL_METHOD(&_18, this_ptr, "getexpression", &_6, 462, &_19);
zephir_check_call_status();
zephir_array_update_string(return_value, SL("expr"), &_18, PH_COPY | PH_SEPARATE);
@@ -140825,7 +140832,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
zephir_create_array(&_18$$25, 2, 0);
add_assoc_stringl_ex(&_18$$25, SL("type"), SL("literal"));
zephir_memory_observe(&_19$$25);
- zephir_array_fetch_string(&_19$$25, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1796);
+ zephir_array_fetch_string(&_19$$25, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1790);
zephir_array_update_string(&_18$$25, SL("value"), &_19$$25, PH_COPY | PH_SEPARATE);
ZEPHIR_CPY_WRT(&exprReturn, &_18$$25);
break;
@@ -140848,9 +140855,9 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
}
if (ZEPHIR_IS_LONG(&exprType, 260)) {
zephir_memory_observe(&value);
- zephir_array_fetch_string(&value, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1817);
+ zephir_array_fetch_string(&value, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1811);
if (quoting) {
- if (zephir_memnstr_str(&value, SL("'"), "phalcon/Mvc/Model/Query.zep", 1824)) {
+ if (zephir_memnstr_str(&value, SL("'"), "phalcon/Mvc/Model/Query.zep", 1818)) {
ZEPHIR_INIT_VAR(&escapedValue);
phalcon_orm_singlequotes(&escapedValue, &value);
} else {
@@ -140873,7 +140880,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
zephir_create_array(&_23$$33, 2, 0);
add_assoc_stringl_ex(&_23$$33, SL("type"), SL("placeholder"));
ZEPHIR_INIT_VAR(&_24$$33);
- zephir_array_fetch_string(&_25$$33, &expr, SL("value"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1845);
+ zephir_array_fetch_string(&_25$$33, &expr, SL("value"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1839);
ZEPHIR_INIT_VAR(&_26$$33);
ZVAL_STRING(&_26$$33, "?");
ZEPHIR_INIT_VAR(&_27$$33);
@@ -140887,7 +140894,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZEPHIR_INIT_VAR(&_28$$34);
zephir_create_array(&_28$$34, 2, 0);
add_assoc_stringl_ex(&_28$$34, SL("type"), SL("placeholder"));
- zephir_array_fetch_string(&_29$$34, &expr, SL("value"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1854);
+ zephir_array_fetch_string(&_29$$34, &expr, SL("value"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1848);
ZEPHIR_INIT_VAR(&_30$$34);
ZEPHIR_CONCAT_SV(&_30$$34, ":", &_29$$34);
zephir_array_update_string(&_28$$34, SL("value"), &_30$$34, PH_COPY | PH_SEPARATE);
@@ -140896,14 +140903,14 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
}
if (ZEPHIR_IS_LONG(&exprType, 277)) {
ZEPHIR_OBS_NVAR(&value);
- zephir_array_fetch_string(&value, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1859);
- if (zephir_memnstr_str(&value, SL(":"), "phalcon/Mvc/Model/Query.zep", 1861)) {
+ zephir_array_fetch_string(&value, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1853);
+ if (zephir_memnstr_str(&value, SL(":"), "phalcon/Mvc/Model/Query.zep", 1855)) {
ZEPHIR_INIT_VAR(&valueParts);
zephir_fast_explode_str(&valueParts, SL(":"), &value, LONG_MAX);
zephir_memory_observe(&name);
- zephir_array_fetch_long(&name, &valueParts, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1863);
+ zephir_array_fetch_long(&name, &valueParts, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1857);
zephir_memory_observe(&bindType);
- zephir_array_fetch_long(&bindType, &valueParts, 1, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1864);
+ zephir_array_fetch_long(&bindType, &valueParts, 1, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1858);
do {
if (ZEPHIR_IS_STRING(&bindType, "str")) {
ZEPHIR_INIT_VAR(&_31$$37);
@@ -140993,7 +141000,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZEPHIR_CONCAT_SV(&_51$$44, "Bind value is required for array type placeholder: ", &name);
ZEPHIR_CALL_METHOD(NULL, &_50$$44, "__construct", NULL, 33, &_51$$44);
zephir_check_call_status();
- zephir_throw_exception_debug(&_50$$44, "phalcon/Mvc/Model/Query.zep", 1934);
+ zephir_throw_exception_debug(&_50$$44, "phalcon/Mvc/Model/Query.zep", 1928);
ZEPHIR_MM_RESTORE();
return;
}
@@ -141004,7 +141011,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZEPHIR_CONCAT_SV(&_53$$45, "Bind type requires an array in placeholder: ", &name);
ZEPHIR_CALL_METHOD(NULL, &_52$$45, "__construct", NULL, 33, &_53$$45);
zephir_check_call_status();
- zephir_throw_exception_debug(&_52$$45, "phalcon/Mvc/Model/Query.zep", 1940);
+ zephir_throw_exception_debug(&_52$$45, "phalcon/Mvc/Model/Query.zep", 1934);
ZEPHIR_MM_RESTORE();
return;
}
@@ -141015,7 +141022,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZEPHIR_CONCAT_SV(&_55$$46, "At least one value must be bound in placeholder: ", &name);
ZEPHIR_CALL_METHOD(NULL, &_54$$46, "__construct", NULL, 33, &_55$$46);
zephir_check_call_status();
- zephir_throw_exception_debug(&_54$$46, "phalcon/Mvc/Model/Query.zep", 1946);
+ zephir_throw_exception_debug(&_54$$46, "phalcon/Mvc/Model/Query.zep", 1940);
ZEPHIR_MM_RESTORE();
return;
}
@@ -141036,7 +141043,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZEPHIR_CONCAT_SV(&_59$$47, "Unknown bind type: ", &bindType);
ZEPHIR_CALL_METHOD(NULL, &_58$$47, "__construct", NULL, 33, &_59$$47);
zephir_check_call_status();
- zephir_throw_exception_debug(&_58$$47, "phalcon/Mvc/Model/Query.zep", 1961);
+ zephir_throw_exception_debug(&_58$$47, "phalcon/Mvc/Model/Query.zep", 1955);
ZEPHIR_MM_RESTORE();
return;
} while(0);
@@ -141218,7 +141225,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
zephir_create_array(&_79$$66, 2, 0);
add_assoc_stringl_ex(&_79$$66, SL("type"), SL("literal"));
zephir_memory_observe(&_80$$66);
- zephir_array_fetch_string(&_80$$66, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2137);
+ zephir_array_fetch_string(&_80$$66, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2131);
zephir_array_update_string(&_79$$66, SL("value"), &_80$$66, PH_COPY | PH_SEPARATE);
ZEPHIR_CPY_WRT(&exprReturn, &_79$$66);
break;
@@ -141250,7 +141257,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZEPHIR_CONCAT_SV(&_85$$70, "Unknown expression type ", &exprType);
ZEPHIR_CALL_METHOD(NULL, &_84$$70, "__construct", NULL, 33, &_85$$70);
zephir_check_call_status();
- zephir_throw_exception_debug(&_84$$70, "phalcon/Mvc/Model/Query.zep", 2160);
+ zephir_throw_exception_debug(&_84$$70, "phalcon/Mvc/Model/Query.zep", 2154);
ZEPHIR_MM_RESTORE();
return;
} while(0);
@@ -141265,7 +141272,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
if (zephir_array_isset_long(&expr, 0)) {
ZEPHIR_INIT_VAR(&listItems);
array_init(&listItems);
- zephir_is_iterable(&expr, 0, "phalcon/Mvc/Model/Query.zep", 2183);
+ zephir_is_iterable(&expr, 0, "phalcon/Mvc/Model/Query.zep", 2177);
if (Z_TYPE_P(&expr) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&expr), _86$$72)
{
@@ -141273,7 +141280,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZVAL_COPY(&exprListItem, _86$$72);
ZEPHIR_CALL_METHOD(&_88$$73, this_ptr, "getexpression", NULL, 462, &exprListItem);
zephir_check_call_status();
- zephir_array_append(&listItems, &_88$$73, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2180);
+ zephir_array_append(&listItems, &_88$$73, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2174);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &expr, "rewind", NULL, 0);
@@ -141288,7 +141295,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_89$$74, this_ptr, "getexpression", NULL, 462, &exprListItem);
zephir_check_call_status();
- zephir_array_append(&listItems, &_89$$74, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2180);
+ zephir_array_append(&listItems, &_89$$74, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2174);
ZEPHIR_CALL_METHOD(NULL, &expr, "next", NULL, 0);
zephir_check_call_status();
}
@@ -141299,7 +141306,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
zephir_array_fast_append(return_value, &listItems);
RETURN_MM();
}
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Unknown expression", "phalcon/Mvc/Model/Query.zep", 2189);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Unknown expression", "phalcon/Mvc/Model/Query.zep", 2183);
return;
}
@@ -141342,7 +141349,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall)
if (zephir_array_isset_long(&arguments, 0)) {
ZEPHIR_INIT_VAR(&functionArgs);
array_init(&functionArgs);
- zephir_is_iterable(&arguments, 0, "phalcon/Mvc/Model/Query.zep", 2215);
+ zephir_is_iterable(&arguments, 0, "phalcon/Mvc/Model/Query.zep", 2209);
if (Z_TYPE_P(&arguments) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&arguments), _0$$6)
{
@@ -141350,7 +141357,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall)
ZVAL_COPY(&argument, _0$$6);
ZEPHIR_CALL_METHOD(&_2$$7, this_ptr, "getcallargument", &_3, 466, &argument);
zephir_check_call_status();
- zephir_array_append(&functionArgs, &_2$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2213);
+ zephir_array_append(&functionArgs, &_2$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2207);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &arguments, "rewind", NULL, 0);
@@ -141365,7 +141372,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall)
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_4$$8, this_ptr, "getcallargument", &_3, 466, &argument);
zephir_check_call_status();
- zephir_array_append(&functionArgs, &_4$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2213);
+ zephir_array_append(&functionArgs, &_4$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2207);
ZEPHIR_CALL_METHOD(NULL, &arguments, "next", NULL, 0);
zephir_check_call_status();
}
@@ -141383,7 +141390,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall)
zephir_create_array(return_value, 4, 0);
add_assoc_stringl_ex(return_value, SL("type"), SL("functionCall"));
zephir_memory_observe(&_7$$10);
- zephir_array_fetch_string(&_7$$10, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2225);
+ zephir_array_fetch_string(&_7$$10, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2219);
zephir_array_update_string(return_value, SL("name"), &_7$$10, PH_COPY | PH_SEPARATE);
zephir_array_update_string(return_value, SL("arguments"), &functionArgs, PH_COPY | PH_SEPARATE);
ZEPHIR_INIT_VAR(&_8$$10);
@@ -141394,7 +141401,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall)
zephir_create_array(return_value, 3, 0);
add_assoc_stringl_ex(return_value, SL("type"), SL("functionCall"));
zephir_memory_observe(&_9$$11);
- zephir_array_fetch_string(&_9$$11, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2232);
+ zephir_array_fetch_string(&_9$$11, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2226);
zephir_array_update_string(return_value, SL("name"), &_9$$11, PH_COPY | PH_SEPARATE);
zephir_array_update_string(return_value, SL("arguments"), &functionArgs, PH_COPY | PH_SEPARATE);
RETURN_MM();
@@ -141403,7 +141410,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall)
zephir_create_array(return_value, 2, 0);
add_assoc_stringl_ex(return_value, SL("type"), SL("functionCall"));
zephir_memory_observe(&_10);
- zephir_array_fetch_string(&_10, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2241);
+ zephir_array_fetch_string(&_10, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2235);
zephir_array_update_string(return_value, SL("name"), &_10, PH_COPY | PH_SEPARATE);
RETURN_MM();
}
@@ -141435,7 +141442,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getGroupClause)
if (zephir_array_isset_long(&group, 0)) {
ZEPHIR_INIT_VAR(&groupParts);
array_init(&groupParts);
- zephir_is_iterable(&group, 0, "phalcon/Mvc/Model/Query.zep", 2261);
+ zephir_is_iterable(&group, 0, "phalcon/Mvc/Model/Query.zep", 2255);
if (Z_TYPE_P(&group) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&group), _0$$3)
{
@@ -141443,7 +141450,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getGroupClause)
ZVAL_COPY(&groupItem, _0$$3);
ZEPHIR_CALL_METHOD(&_2$$4, this_ptr, "getexpression", &_3, 462, &groupItem);
zephir_check_call_status();
- zephir_array_append(&groupParts, &_2$$4, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2259);
+ zephir_array_append(&groupParts, &_2$$4, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2253);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &group, "rewind", NULL, 0);
@@ -141458,7 +141465,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getGroupClause)
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_4$$5, this_ptr, "getexpression", &_3, 462, &groupItem);
zephir_check_call_status();
- zephir_array_append(&groupParts, &_4$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2259);
+ zephir_array_append(&groupParts, &_4$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2253);
ZEPHIR_CALL_METHOD(NULL, &group, "next", NULL, 0);
zephir_check_call_status();
}
@@ -141538,10 +141545,10 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoin)
zephir_get_arrval(&join, join_param);
zephir_memory_observe(&qualified);
if (zephir_array_isset_string_fetch(&qualified, &join, SL("qualified"), 0)) {
- zephir_array_fetch_string(&_0$$3, &qualified, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2297);
+ zephir_array_fetch_string(&_0$$3, &qualified, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2291);
if (ZEPHIR_IS_LONG(&_0$$3, 355)) {
zephir_memory_observe(&modelName);
- zephir_array_fetch_string(&modelName, &qualified, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2298);
+ zephir_array_fetch_string(&modelName, &qualified, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2292);
ZEPHIR_CALL_METHOD(&model, manager, "load", NULL, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&source, &model, "getsource", NULL, 0);
@@ -141556,7 +141563,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoin)
RETURN_MM();
}
}
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 2313);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 2307);
return;
}
@@ -141582,7 +141589,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoinType)
zephir_get_arrval(&join, join_param);
zephir_memory_observe(&type);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&type, &join, SL("type"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 2324);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 2318);
return;
}
do {
@@ -141610,7 +141617,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoinType)
ZEPHIR_CONCAT_SVSV(&_2, "Unknown join type ", &type, ", when preparing: ", &_1);
ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 33, &_2);
zephir_check_call_status();
- zephir_throw_exception_debug(&_0, "phalcon/Mvc/Model/Query.zep", 2346);
+ zephir_throw_exception_debug(&_0, "phalcon/Mvc/Model/Query.zep", 2340);
ZEPHIR_MM_RESTORE();
return;
}
@@ -141774,7 +141781,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&manager, &_0);
zephir_memory_observe(&tables);
- zephir_array_fetch_string(&tables, &select, SL("tables"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2382);
+ zephir_array_fetch_string(&tables, &select, SL("tables"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2376);
if (!(zephir_array_isset_long(&tables, 0))) {
ZEPHIR_INIT_VAR(&selectTables);
zephir_create_array(&selectTables, 1, 0);
@@ -141783,7 +141790,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CPY_WRT(&selectTables, &tables);
}
zephir_memory_observe(&joins);
- zephir_array_fetch_string(&joins, &select, SL("joins"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2390);
+ zephir_array_fetch_string(&joins, &select, SL("joins"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2384);
if (!(zephir_array_isset_long(&joins, 0))) {
ZEPHIR_INIT_VAR(&selectJoins);
zephir_create_array(&selectJoins, 1, 0);
@@ -141791,7 +141798,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
} else {
ZEPHIR_CPY_WRT(&selectJoins, &joins);
}
- zephir_is_iterable(&selectJoins, 0, "phalcon/Mvc/Model/Query.zep", 2541);
+ zephir_is_iterable(&selectJoins, 0, "phalcon/Mvc/Model/Query.zep", 2535);
if (Z_TYPE_P(&selectJoins) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&selectJoins), _1)
{
@@ -141800,13 +141807,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CALL_METHOD(&joinData, this_ptr, "getjoin", &_3, 467, &manager, &joinItem);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&source);
- zephir_array_fetch_string(&source, &joinData, SL("source"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2404);
+ zephir_array_fetch_string(&source, &joinData, SL("source"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2398);
ZEPHIR_OBS_NVAR(&schema);
- zephir_array_fetch_string(&schema, &joinData, SL("schema"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2405);
+ zephir_array_fetch_string(&schema, &joinData, SL("schema"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2399);
ZEPHIR_OBS_NVAR(&model);
- zephir_array_fetch_string(&model, &joinData, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2406);
+ zephir_array_fetch_string(&model, &joinData, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2400);
ZEPHIR_OBS_NVAR(&realModelName);
- zephir_array_fetch_string(&realModelName, &joinData, SL("modelName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2407);
+ zephir_array_fetch_string(&realModelName, &joinData, SL("modelName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2401);
ZEPHIR_INIT_NVAR(&completeSource);
zephir_create_array(&completeSource, 2, 0);
zephir_array_fast_append(&completeSource, &source);
@@ -141816,7 +141823,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_OBS_NVAR(&aliasExpr);
if (zephir_array_isset_string_fetch(&aliasExpr, &joinItem, SL("alias"), 0)) {
ZEPHIR_OBS_NVAR(&alias);
- zephir_array_fetch_string(&alias, &aliasExpr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2419);
+ zephir_array_fetch_string(&alias, &aliasExpr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2413);
if (UNEXPECTED(zephir_array_isset(&joinModels, &alias))) {
ZEPHIR_INIT_NVAR(&_5$$9);
object_init_ex(&_5$$9, phalcon_mvc_model_exception_ce);
@@ -141825,11 +141832,11 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSV(&_7$$9, "Cannot use '", &alias, "' as join alias because it was already used, when preparing: ", &_6$$9);
ZEPHIR_CALL_METHOD(NULL, &_5$$9, "__construct", &_8, 33, &_7$$9);
zephir_check_call_status();
- zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/Model/Query.zep", 2427);
+ zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/Model/Query.zep", 2421);
ZEPHIR_MM_RESTORE();
return;
}
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2433);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2427);
zephir_array_update_zval(&joinTypes, &alias, &joinType, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliases, &alias, &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&joinModels, &alias, &realModelName, PH_COPY | PH_SEPARATE);
@@ -141848,7 +141855,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSV(&_11$$11, "Cannot use '", &realModelName, "' as join alias because it was already used, when preparing: ", &_10$$11);
ZEPHIR_CALL_METHOD(NULL, &_9$$11, "__construct", &_8, 33, &_11$$11);
zephir_check_call_status();
- zephir_throw_exception_debug(&_9$$11, "phalcon/Mvc/Model/Query.zep", 2486);
+ zephir_throw_exception_debug(&_9$$11, "phalcon/Mvc/Model/Query.zep", 2480);
ZEPHIR_MM_RESTORE();
return;
}
@@ -141878,13 +141885,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CALL_METHOD(&joinData, this_ptr, "getjoin", &_3, 467, &manager, &joinItem);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&source);
- zephir_array_fetch_string(&source, &joinData, SL("source"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2404);
+ zephir_array_fetch_string(&source, &joinData, SL("source"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2398);
ZEPHIR_OBS_NVAR(&schema);
- zephir_array_fetch_string(&schema, &joinData, SL("schema"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2405);
+ zephir_array_fetch_string(&schema, &joinData, SL("schema"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2399);
ZEPHIR_OBS_NVAR(&model);
- zephir_array_fetch_string(&model, &joinData, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2406);
+ zephir_array_fetch_string(&model, &joinData, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2400);
ZEPHIR_OBS_NVAR(&realModelName);
- zephir_array_fetch_string(&realModelName, &joinData, SL("modelName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2407);
+ zephir_array_fetch_string(&realModelName, &joinData, SL("modelName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2401);
ZEPHIR_INIT_NVAR(&_12$$12);
zephir_create_array(&_12$$12, 2, 0);
zephir_array_fast_append(&_12$$12, &source);
@@ -141895,7 +141902,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_OBS_NVAR(&aliasExpr);
if (zephir_array_isset_string_fetch(&aliasExpr, &joinItem, SL("alias"), 0)) {
ZEPHIR_OBS_NVAR(&alias);
- zephir_array_fetch_string(&alias, &aliasExpr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2419);
+ zephir_array_fetch_string(&alias, &aliasExpr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2413);
if (UNEXPECTED(zephir_array_isset(&joinModels, &alias))) {
ZEPHIR_INIT_NVAR(&_13$$14);
object_init_ex(&_13$$14, phalcon_mvc_model_exception_ce);
@@ -141904,11 +141911,11 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSV(&_15$$14, "Cannot use '", &alias, "' as join alias because it was already used, when preparing: ", &_14$$14);
ZEPHIR_CALL_METHOD(NULL, &_13$$14, "__construct", &_8, 33, &_15$$14);
zephir_check_call_status();
- zephir_throw_exception_debug(&_13$$14, "phalcon/Mvc/Model/Query.zep", 2427);
+ zephir_throw_exception_debug(&_13$$14, "phalcon/Mvc/Model/Query.zep", 2421);
ZEPHIR_MM_RESTORE();
return;
}
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2433);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2427);
zephir_array_update_zval(&joinTypes, &alias, &joinType, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliases, &alias, &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&joinModels, &alias, &realModelName, PH_COPY | PH_SEPARATE);
@@ -141927,7 +141934,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSV(&_18$$16, "Cannot use '", &realModelName, "' as join alias because it was already used, when preparing: ", &_17$$16);
ZEPHIR_CALL_METHOD(NULL, &_16$$16, "__construct", &_8, 33, &_18$$16);
zephir_check_call_status();
- zephir_throw_exception_debug(&_16$$16, "phalcon/Mvc/Model/Query.zep", 2486);
+ zephir_throw_exception_debug(&_16$$16, "phalcon/Mvc/Model/Query.zep", 2480);
ZEPHIR_MM_RESTORE();
return;
}
@@ -141953,7 +141960,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_update_property_zval(this_ptr, ZEND_STRL("sqlModelsAliases"), &sqlModelsAliases);
zephir_update_property_zval(this_ptr, ZEND_STRL("sqlAliasesModelsInstances"), &sqlAliasesModelsInstances);
zephir_update_property_zval(this_ptr, ZEND_STRL("modelsInstances"), &modelsInstances);
- zephir_is_iterable(&joinPrepared, 0, "phalcon/Mvc/Model/Query.zep", 2561);
+ zephir_is_iterable(&joinPrepared, 0, "phalcon/Mvc/Model/Query.zep", 2555);
if (Z_TYPE_P(&joinPrepared) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&joinPrepared), _21, _22, _19)
{
@@ -142000,7 +142007,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_read_property(&_0, this_ptr, ZEND_STRL("enableImplicitJoins"), PH_NOISY_CC | PH_READONLY);
if (!(zephir_is_true(&_0))) {
ZEPHIR_INIT_VAR(&_26$$21);
- zephir_is_iterable(&joinPrepared, 0, "phalcon/Mvc/Model/Query.zep", 2573);
+ zephir_is_iterable(&joinPrepared, 0, "phalcon/Mvc/Model/Query.zep", 2567);
if (Z_TYPE_P(&joinPrepared) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&joinPrepared), _29$$21, _30$$21, _27$$21)
{
@@ -142013,11 +142020,11 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&_26$$21);
ZVAL_COPY(&_26$$21, _27$$21);
ZEPHIR_OBS_NVAR(&joinType);
- zephir_array_fetch(&joinType, &joinTypes, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2563);
+ zephir_array_fetch(&joinType, &joinTypes, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2557);
ZEPHIR_OBS_NVAR(&joinSource);
- zephir_array_fetch(&joinSource, &joinSources, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2564);
+ zephir_array_fetch(&joinSource, &joinSources, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2558);
ZEPHIR_OBS_NVAR(&preCondition);
- zephir_array_fetch(&preCondition, &joinPreCondition, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2565);
+ zephir_array_fetch(&preCondition, &joinPreCondition, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2559);
ZEPHIR_INIT_NVAR(&_31$$22);
zephir_create_array(&_31$$22, 3, 0);
zephir_array_update_string(&_31$$22, SL("type"), &joinType, PH_COPY | PH_SEPARATE);
@@ -142026,7 +142033,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_create_array(&_32$$22, 1, 0);
zephir_array_fast_append(&_32$$22, &preCondition);
zephir_array_update_string(&_31$$22, SL("conditions"), &_32$$22, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_31$$22, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2570);
+ zephir_array_append(&sqlJoins, &_31$$22, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2564);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &joinPrepared, "rewind", NULL, 0);
@@ -142042,11 +142049,11 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CALL_METHOD(&_26$$21, &joinPrepared, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&joinType);
- zephir_array_fetch(&joinType, &joinTypes, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2563);
+ zephir_array_fetch(&joinType, &joinTypes, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2557);
ZEPHIR_OBS_NVAR(&joinSource);
- zephir_array_fetch(&joinSource, &joinSources, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2564);
+ zephir_array_fetch(&joinSource, &joinSources, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2558);
ZEPHIR_OBS_NVAR(&preCondition);
- zephir_array_fetch(&preCondition, &joinPreCondition, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2565);
+ zephir_array_fetch(&preCondition, &joinPreCondition, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2559);
ZEPHIR_INIT_NVAR(&_33$$23);
zephir_create_array(&_33$$23, 3, 0);
zephir_array_update_string(&_33$$23, SL("type"), &joinType, PH_COPY | PH_SEPARATE);
@@ -142055,7 +142062,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_create_array(&_34$$23, 1, 0);
zephir_array_fast_append(&_34$$23, &preCondition);
zephir_array_update_string(&_33$$23, SL("conditions"), &_34$$23, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_33$$23, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2570);
+ zephir_array_append(&sqlJoins, &_33$$23, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2564);
ZEPHIR_CALL_METHOD(NULL, &joinPrepared, "next", NULL, 0);
zephir_check_call_status();
}
@@ -142066,15 +142073,15 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_INIT_NVAR(&fromModels);
array_init(&fromModels);
- zephir_is_iterable(&selectTables, 0, "phalcon/Mvc/Model/Query.zep", 2588);
+ zephir_is_iterable(&selectTables, 0, "phalcon/Mvc/Model/Query.zep", 2582);
if (Z_TYPE_P(&selectTables) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&selectTables), _35)
{
ZEPHIR_INIT_NVAR(&tableItem);
ZVAL_COPY(&tableItem, _35);
- zephir_array_fetch_string(&_37$$24, &tableItem, SL("qualifiedName"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2582);
+ zephir_array_fetch_string(&_37$$24, &tableItem, SL("qualifiedName"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2576);
ZEPHIR_OBS_NVAR(&_38$$24);
- zephir_array_fetch_string(&_38$$24, &_37$$24, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2582);
+ zephir_array_fetch_string(&_38$$24, &_37$$24, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2576);
zephir_array_update_zval(&fromModels, &_38$$24, &__$true, PH_COPY | PH_SEPARATE);
} ZEND_HASH_FOREACH_END();
} else {
@@ -142088,9 +142095,9 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_CALL_METHOD(&tableItem, &selectTables, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_fetch_string(&_39$$25, &tableItem, SL("qualifiedName"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2582);
+ zephir_array_fetch_string(&_39$$25, &tableItem, SL("qualifiedName"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2576);
ZEPHIR_OBS_NVAR(&_40$$25);
- zephir_array_fetch_string(&_40$$25, &_39$$25, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2582);
+ zephir_array_fetch_string(&_40$$25, &_39$$25, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2576);
zephir_array_update_zval(&fromModels, &_40$$25, &__$true, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, &selectTables, "next", NULL, 0);
zephir_check_call_status();
@@ -142098,7 +142105,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_INIT_NVAR(&tableItem);
ZEPHIR_INIT_VAR(&_41);
- zephir_is_iterable(&fromModels, 0, "phalcon/Mvc/Model/Query.zep", 2708);
+ zephir_is_iterable(&fromModels, 0, "phalcon/Mvc/Model/Query.zep", 2702);
if (Z_TYPE_P(&fromModels) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fromModels), _44, _45, _42)
{
@@ -142110,7 +142117,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_INIT_NVAR(&_41);
ZVAL_COPY(&_41, _42);
- zephir_is_iterable(&joinModels, 0, "phalcon/Mvc/Model/Query.zep", 2706);
+ zephir_is_iterable(&joinModels, 0, "phalcon/Mvc/Model/Query.zep", 2700);
if (Z_TYPE_P(&joinModels) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&joinModels), _48$$26, _49$$26, _46$$26)
{
@@ -142123,13 +142130,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&joinModel);
ZVAL_COPY(&joinModel, _46$$26);
ZEPHIR_OBS_NVAR(&joinSource);
- zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2593);
+ zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2587);
ZEPHIR_OBS_NVAR(&joinType);
- zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2598);
+ zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2592);
ZEPHIR_OBS_NVAR(&preCondition);
if (!(zephir_array_isset_fetch(&preCondition, &joinPreCondition, &joinAlias, 0))) {
ZEPHIR_OBS_NVAR(&modelNameAlias);
- zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2607);
+ zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2601);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_50, 0, &fromModelName, &modelNameAlias);
zephir_check_call_status();
if (ZEPHIR_IS_FALSE_IDENTICAL(&relation)) {
@@ -142144,17 +142151,17 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSVSV(&_54$$31, "There is more than one relation between models '", &fromModelName, "' and '", &joinModel, "', the join must be done using an alias, when preparing: ", &_53$$31);
ZEPHIR_CALL_METHOD(NULL, &_52$$31, "__construct", &_8, 33, &_54$$31);
zephir_check_call_status();
- zephir_throw_exception_debug(&_52$$31, "phalcon/Mvc/Model/Query.zep", 2633);
+ zephir_throw_exception_debug(&_52$$31, "phalcon/Mvc/Model/Query.zep", 2627);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_OBS_NVAR(&relation);
- zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2639);
+ zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2633);
}
}
if (Z_TYPE_P(&relation) == IS_OBJECT) {
ZEPHIR_OBS_NVAR(&modelAlias);
- zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2650);
+ zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2644);
ZEPHIR_CALL_METHOD(&_55$$32, &relation, "isthrough", NULL, 0);
zephir_check_call_status();
if (!(zephir_is_true(&_55$$32))) {
@@ -142165,13 +142172,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_check_call_status();
}
if (zephir_array_isset_long(&sqlJoin, 0)) {
- zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2680);
+ zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2674);
if (Z_TYPE_P(&sqlJoin) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&sqlJoin), _58$$35)
{
ZEPHIR_INIT_NVAR(&sqlJoinItem);
ZVAL_COPY(&sqlJoinItem, _58$$35);
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "rewind", NULL, 0);
@@ -142184,14 +142191,14 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_CALL_METHOD(&sqlJoinItem, &sqlJoin, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "next", NULL, 0);
zephir_check_call_status();
}
}
ZEPHIR_INIT_NVAR(&sqlJoinItem);
} else {
- zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2681);
+ zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2675);
}
} else {
ZEPHIR_INIT_NVAR(&_60$$39);
@@ -142201,7 +142208,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&_61$$39);
array_init(&_61$$39);
zephir_array_update_string(&_60$$39, SL("conditions"), &_61$$39, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_60$$39, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2692);
+ zephir_array_append(&sqlJoins, &_60$$39, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2686);
}
} else {
ZEPHIR_INIT_NVAR(&_62$$40);
@@ -142212,7 +142219,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_create_array(&_63$$40, 1, 0);
zephir_array_fast_append(&_63$$40, &preCondition);
zephir_array_update_string(&_62$$40, SL("conditions"), &_63$$40, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_62$$40, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2703);
+ zephir_array_append(&sqlJoins, &_62$$40, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2697);
}
} ZEND_HASH_FOREACH_END();
} else {
@@ -142229,13 +142236,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CALL_METHOD(&joinModel, &joinModels, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&joinSource);
- zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2593);
+ zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2587);
ZEPHIR_OBS_NVAR(&joinType);
- zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2598);
+ zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2592);
ZEPHIR_OBS_NVAR(&preCondition);
if (!(zephir_array_isset_fetch(&preCondition, &joinPreCondition, &joinAlias, 0))) {
ZEPHIR_OBS_NVAR(&modelNameAlias);
- zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2607);
+ zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2601);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_64, 0, &fromModelName, &modelNameAlias);
zephir_check_call_status();
if (ZEPHIR_IS_FALSE_IDENTICAL(&relation)) {
@@ -142250,17 +142257,17 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSVSV(&_68$$45, "There is more than one relation between models '", &fromModelName, "' and '", &joinModel, "', the join must be done using an alias, when preparing: ", &_67$$45);
ZEPHIR_CALL_METHOD(NULL, &_66$$45, "__construct", &_8, 33, &_68$$45);
zephir_check_call_status();
- zephir_throw_exception_debug(&_66$$45, "phalcon/Mvc/Model/Query.zep", 2633);
+ zephir_throw_exception_debug(&_66$$45, "phalcon/Mvc/Model/Query.zep", 2627);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_OBS_NVAR(&relation);
- zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2639);
+ zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2633);
}
}
if (Z_TYPE_P(&relation) == IS_OBJECT) {
ZEPHIR_OBS_NVAR(&modelAlias);
- zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2650);
+ zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2644);
ZEPHIR_CALL_METHOD(&_69$$46, &relation, "isthrough", NULL, 0);
zephir_check_call_status();
if (!(zephir_is_true(&_69$$46))) {
@@ -142271,13 +142278,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_check_call_status();
}
if (zephir_array_isset_long(&sqlJoin, 0)) {
- zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2680);
+ zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2674);
if (Z_TYPE_P(&sqlJoin) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&sqlJoin), _70$$49)
{
ZEPHIR_INIT_NVAR(&sqlJoinItem);
ZVAL_COPY(&sqlJoinItem, _70$$49);
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "rewind", NULL, 0);
@@ -142290,14 +142297,14 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_CALL_METHOD(&sqlJoinItem, &sqlJoin, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "next", NULL, 0);
zephir_check_call_status();
}
}
ZEPHIR_INIT_NVAR(&sqlJoinItem);
} else {
- zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2681);
+ zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2675);
}
} else {
ZEPHIR_INIT_NVAR(&_72$$53);
@@ -142307,7 +142314,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&_73$$53);
array_init(&_73$$53);
zephir_array_update_string(&_72$$53, SL("conditions"), &_73$$53, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_72$$53, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2692);
+ zephir_array_append(&sqlJoins, &_72$$53, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2686);
}
} else {
ZEPHIR_INIT_NVAR(&_74$$54);
@@ -142318,7 +142325,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_create_array(&_75$$54, 1, 0);
zephir_array_fast_append(&_75$$54, &preCondition);
zephir_array_update_string(&_74$$54, SL("conditions"), &_75$$54, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_74$$54, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2703);
+ zephir_array_append(&sqlJoins, &_74$$54, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2697);
}
ZEPHIR_CALL_METHOD(NULL, &joinModels, "next", NULL, 0);
zephir_check_call_status();
@@ -142340,7 +142347,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_41, &fromModels, "current", NULL, 0);
zephir_check_call_status();
- zephir_is_iterable(&joinModels, 0, "phalcon/Mvc/Model/Query.zep", 2706);
+ zephir_is_iterable(&joinModels, 0, "phalcon/Mvc/Model/Query.zep", 2700);
if (Z_TYPE_P(&joinModels) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&joinModels), _78$$55, _79$$55, _76$$55)
{
@@ -142353,13 +142360,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&joinModel);
ZVAL_COPY(&joinModel, _76$$55);
ZEPHIR_OBS_NVAR(&joinSource);
- zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2593);
+ zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2587);
ZEPHIR_OBS_NVAR(&joinType);
- zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2598);
+ zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2592);
ZEPHIR_OBS_NVAR(&preCondition);
if (!(zephir_array_isset_fetch(&preCondition, &joinPreCondition, &joinAlias, 0))) {
ZEPHIR_OBS_NVAR(&modelNameAlias);
- zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2607);
+ zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2601);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_80, 0, &fromModelName, &modelNameAlias);
zephir_check_call_status();
if (ZEPHIR_IS_FALSE_IDENTICAL(&relation)) {
@@ -142374,17 +142381,17 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSVSV(&_84$$60, "There is more than one relation between models '", &fromModelName, "' and '", &joinModel, "', the join must be done using an alias, when preparing: ", &_83$$60);
ZEPHIR_CALL_METHOD(NULL, &_82$$60, "__construct", &_8, 33, &_84$$60);
zephir_check_call_status();
- zephir_throw_exception_debug(&_82$$60, "phalcon/Mvc/Model/Query.zep", 2633);
+ zephir_throw_exception_debug(&_82$$60, "phalcon/Mvc/Model/Query.zep", 2627);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_OBS_NVAR(&relation);
- zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2639);
+ zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2633);
}
}
if (Z_TYPE_P(&relation) == IS_OBJECT) {
ZEPHIR_OBS_NVAR(&modelAlias);
- zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2650);
+ zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2644);
ZEPHIR_CALL_METHOD(&_85$$61, &relation, "isthrough", NULL, 0);
zephir_check_call_status();
if (!(zephir_is_true(&_85$$61))) {
@@ -142395,13 +142402,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_check_call_status();
}
if (zephir_array_isset_long(&sqlJoin, 0)) {
- zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2680);
+ zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2674);
if (Z_TYPE_P(&sqlJoin) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&sqlJoin), _86$$64)
{
ZEPHIR_INIT_NVAR(&sqlJoinItem);
ZVAL_COPY(&sqlJoinItem, _86$$64);
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "rewind", NULL, 0);
@@ -142414,14 +142421,14 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_CALL_METHOD(&sqlJoinItem, &sqlJoin, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "next", NULL, 0);
zephir_check_call_status();
}
}
ZEPHIR_INIT_NVAR(&sqlJoinItem);
} else {
- zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2681);
+ zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2675);
}
} else {
ZEPHIR_INIT_NVAR(&_88$$68);
@@ -142431,7 +142438,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&_89$$68);
array_init(&_89$$68);
zephir_array_update_string(&_88$$68, SL("conditions"), &_89$$68, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_88$$68, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2692);
+ zephir_array_append(&sqlJoins, &_88$$68, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2686);
}
} else {
ZEPHIR_INIT_NVAR(&_90$$69);
@@ -142442,7 +142449,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_create_array(&_91$$69, 1, 0);
zephir_array_fast_append(&_91$$69, &preCondition);
zephir_array_update_string(&_90$$69, SL("conditions"), &_91$$69, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_90$$69, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2703);
+ zephir_array_append(&sqlJoins, &_90$$69, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2697);
}
} ZEND_HASH_FOREACH_END();
} else {
@@ -142459,13 +142466,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CALL_METHOD(&joinModel, &joinModels, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&joinSource);
- zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2593);
+ zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2587);
ZEPHIR_OBS_NVAR(&joinType);
- zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2598);
+ zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2592);
ZEPHIR_OBS_NVAR(&preCondition);
if (!(zephir_array_isset_fetch(&preCondition, &joinPreCondition, &joinAlias, 0))) {
ZEPHIR_OBS_NVAR(&modelNameAlias);
- zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2607);
+ zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2601);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_92, 0, &fromModelName, &modelNameAlias);
zephir_check_call_status();
if (ZEPHIR_IS_FALSE_IDENTICAL(&relation)) {
@@ -142480,17 +142487,17 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSVSV(&_96$$74, "There is more than one relation between models '", &fromModelName, "' and '", &joinModel, "', the join must be done using an alias, when preparing: ", &_95$$74);
ZEPHIR_CALL_METHOD(NULL, &_94$$74, "__construct", &_8, 33, &_96$$74);
zephir_check_call_status();
- zephir_throw_exception_debug(&_94$$74, "phalcon/Mvc/Model/Query.zep", 2633);
+ zephir_throw_exception_debug(&_94$$74, "phalcon/Mvc/Model/Query.zep", 2627);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_OBS_NVAR(&relation);
- zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2639);
+ zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2633);
}
}
if (Z_TYPE_P(&relation) == IS_OBJECT) {
ZEPHIR_OBS_NVAR(&modelAlias);
- zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2650);
+ zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2644);
ZEPHIR_CALL_METHOD(&_97$$75, &relation, "isthrough", NULL, 0);
zephir_check_call_status();
if (!(zephir_is_true(&_97$$75))) {
@@ -142501,13 +142508,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_check_call_status();
}
if (zephir_array_isset_long(&sqlJoin, 0)) {
- zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2680);
+ zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2674);
if (Z_TYPE_P(&sqlJoin) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&sqlJoin), _98$$78)
{
ZEPHIR_INIT_NVAR(&sqlJoinItem);
ZVAL_COPY(&sqlJoinItem, _98$$78);
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "rewind", NULL, 0);
@@ -142520,14 +142527,14 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_CALL_METHOD(&sqlJoinItem, &sqlJoin, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "next", NULL, 0);
zephir_check_call_status();
}
}
ZEPHIR_INIT_NVAR(&sqlJoinItem);
} else {
- zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2681);
+ zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2675);
}
} else {
ZEPHIR_INIT_NVAR(&_100$$82);
@@ -142537,7 +142544,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&_101$$82);
array_init(&_101$$82);
zephir_array_update_string(&_100$$82, SL("conditions"), &_101$$82, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_100$$82, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2692);
+ zephir_array_append(&sqlJoins, &_100$$82, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2686);
}
} else {
ZEPHIR_INIT_NVAR(&_102$$83);
@@ -142548,7 +142555,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_create_array(&_103$$83, 1, 0);
zephir_array_fast_append(&_103$$83, &preCondition);
zephir_array_update_string(&_102$$83, SL("conditions"), &_103$$83, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_102$$83, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2703);
+ zephir_array_append(&sqlJoins, &_102$$83, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2697);
}
ZEPHIR_CALL_METHOD(NULL, &joinModels, "next", NULL, 0);
zephir_check_call_status();
@@ -142667,7 +142674,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin)
ZEPHIR_CALL_METHOD(&referencedModelName, relation, "getreferencedmodel", NULL, 0);
zephir_check_call_status();
if (Z_TYPE_P(&fields) == IS_ARRAY) {
- zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 2825);
+ zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 2819);
if (Z_TYPE_P(&fields) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _3$$3, _4$$3, _1$$3)
{
@@ -142687,12 +142694,12 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin)
ZEPHIR_CONCAT_SVSVSV(&_7$$5, "The number of fields must be equal to the number of referenced fields in join ", &modelAlias, "-", &joinAlias, ", when preparing: ", &_6$$5);
ZEPHIR_CALL_METHOD(NULL, &_5$$5, "__construct", &_8, 33, &_7$$5);
zephir_check_call_status();
- zephir_throw_exception_debug(&_5$$5, "phalcon/Mvc/Model/Query.zep", 2792);
+ zephir_throw_exception_debug(&_5$$5, "phalcon/Mvc/Model/Query.zep", 2786);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_OBS_NVAR(&intermediateField);
- zephir_array_fetch(&intermediateField, &intermediateFields, &position, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2798);
+ zephir_array_fetch(&intermediateField, &intermediateFields, &position, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2792);
ZEPHIR_INIT_NVAR(&sqlEqualsJoinCondition);
zephir_create_array(&sqlEqualsJoinCondition, 4, 0);
add_assoc_stringl_ex(&sqlEqualsJoinCondition, SL("type"), SL("binary-op"));
@@ -142735,12 +142742,12 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin)
ZEPHIR_CONCAT_SVSVSV(&_15$$7, "The number of fields must be equal to the number of referenced fields in join ", &modelAlias, "-", &joinAlias, ", when preparing: ", &_14$$7);
ZEPHIR_CALL_METHOD(NULL, &_13$$7, "__construct", &_8, 33, &_15$$7);
zephir_check_call_status();
- zephir_throw_exception_debug(&_13$$7, "phalcon/Mvc/Model/Query.zep", 2792);
+ zephir_throw_exception_debug(&_13$$7, "phalcon/Mvc/Model/Query.zep", 2786);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_OBS_NVAR(&intermediateField);
- zephir_array_fetch(&intermediateField, &intermediateFields, &position, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2798);
+ zephir_array_fetch(&intermediateField, &intermediateFields, &position, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2792);
ZEPHIR_INIT_NVAR(&_16$$6);
zephir_create_array(&_16$$6, 4, 0);
add_assoc_stringl_ex(&_16$$6, SL("type"), SL("binary-op"));
@@ -142881,13 +142888,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getOrderClause)
}
ZEPHIR_INIT_VAR(&orderParts);
array_init(&orderParts);
- zephir_is_iterable(&orderColumns, 0, "phalcon/Mvc/Model/Query.zep", 2934);
+ zephir_is_iterable(&orderColumns, 0, "phalcon/Mvc/Model/Query.zep", 2928);
if (Z_TYPE_P(&orderColumns) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&orderColumns), _0)
{
ZEPHIR_INIT_NVAR(&orderItem);
ZVAL_COPY(&orderItem, _0);
- zephir_array_fetch_string(&_2$$5, &orderItem, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2916);
+ zephir_array_fetch_string(&_2$$5, &orderItem, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2910);
ZEPHIR_CALL_METHOD(&orderPartExpr, this_ptr, "getexpression", &_3, 462, &_2$$5);
zephir_check_call_status();
if (zephir_array_isset_string_fetch(&orderSort, &orderItem, SL("sort"), 1)) {
@@ -142913,7 +142920,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getOrderClause)
zephir_array_fast_append(&_7$$9, &orderPartExpr);
ZEPHIR_CPY_WRT(&orderPartSort, &_7$$9);
}
- zephir_array_append(&orderParts, &orderPartSort, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2931);
+ zephir_array_append(&orderParts, &orderPartSort, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2925);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &orderColumns, "rewind", NULL, 0);
@@ -142926,7 +142933,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getOrderClause)
}
ZEPHIR_CALL_METHOD(&orderItem, &orderColumns, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_fetch_string(&_8$$10, &orderItem, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2916);
+ zephir_array_fetch_string(&_8$$10, &orderItem, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2910);
ZEPHIR_CALL_METHOD(&orderPartExpr, this_ptr, "getexpression", &_3, 462, &_8$$10);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&orderSort);
@@ -142954,7 +142961,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getOrderClause)
zephir_array_fast_append(&_13$$14, &orderPartExpr);
ZEPHIR_CPY_WRT(&orderPartSort, &_13$$14);
}
- zephir_array_append(&orderParts, &orderPartSort, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2931);
+ zephir_array_append(&orderParts, &orderPartSort, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2925);
ZEPHIR_CALL_METHOD(NULL, &orderColumns, "next", NULL, 0);
zephir_check_call_status();
}
@@ -143032,13 +143039,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
zephir_fetch_params(1, 1, 0, &expr_param);
ZEPHIR_OBS_COPY_OR_DUP(&expr, expr_param);
zephir_memory_observe(&columnName);
- zephir_array_fetch_string(&columnName, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2948);
+ zephir_array_fetch_string(&columnName, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2942);
zephir_read_property(&_0, this_ptr, ZEND_STRL("nestingLevel"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&nestingLevel, &_0);
zephir_read_property(&_0, this_ptr, ZEND_STRL("sqlColumnAliases"), PH_NOISY_CC | PH_READONLY);
if (zephir_array_isset(&_0, &nestingLevel)) {
zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("sqlColumnAliases"), PH_NOISY_CC | PH_READONLY);
- zephir_array_fetch(&_2$$3, &_1$$3, &nestingLevel, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2956);
+ zephir_array_fetch(&_2$$3, &_1$$3, &nestingLevel, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2950);
ZEPHIR_CPY_WRT(&sqlColumnAliases, &_2$$3);
} else {
ZEPHIR_INIT_NVAR(&sqlColumnAliases);
@@ -143048,7 +143055,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
if (_3) {
_4 = !(zephir_array_isset_string(&expr, SL("domain")));
if (!(_4)) {
- zephir_array_fetch_string(&_5, &expr, SL("domain"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2961);
+ zephir_array_fetch_string(&_5, &expr, SL("domain"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2955);
_4 = ZEPHIR_IS_EMPTY(&_5);
}
_3 = _4;
@@ -143074,7 +143081,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_10$$7, "Unknown model or alias '", &columnDomain, "' (11), when preparing: ", &_9$$7);
ZEPHIR_CALL_METHOD(NULL, &_8$$7, "__construct", NULL, 33, &_10$$7);
zephir_check_call_status();
- zephir_throw_exception_debug(&_8$$7, "phalcon/Mvc/Model/Query.zep", 2982);
+ zephir_throw_exception_debug(&_8$$7, "phalcon/Mvc/Model/Query.zep", 2976);
ZEPHIR_MM_RESTORE();
return;
}
@@ -143090,7 +143097,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_14$$9, "There is no model related to model or alias '", &columnDomain, "', when executing: ", &_13$$9);
ZEPHIR_CALL_METHOD(NULL, &_12$$9, "__construct", NULL, 33, &_14$$9);
zephir_check_call_status();
- zephir_throw_exception_debug(&_12$$9, "phalcon/Mvc/Model/Query.zep", 3001);
+ zephir_throw_exception_debug(&_12$$9, "phalcon/Mvc/Model/Query.zep", 2995);
ZEPHIR_MM_RESTORE();
return;
}
@@ -143110,7 +143117,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSVSV(&_17$$12, "Column '", &columnName, "' doesn't belong to the model or alias '", &columnDomain, "', when executing: ", &_16$$12);
ZEPHIR_CALL_METHOD(NULL, &_15$$12, "__construct", NULL, 33, &_17$$12);
zephir_check_call_status();
- zephir_throw_exception_debug(&_15$$12, "phalcon/Mvc/Model/Query.zep", 3013);
+ zephir_throw_exception_debug(&_15$$12, "phalcon/Mvc/Model/Query.zep", 3007);
ZEPHIR_MM_RESTORE();
return;
}
@@ -143122,7 +143129,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_INIT_VAR(&hasModel);
ZVAL_BOOL(&hasModel, 0);
zephir_read_property(&_18$$14, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC | PH_READONLY);
- zephir_is_iterable(&_18$$14, 0, "phalcon/Mvc/Model/Query.zep", 3047);
+ zephir_is_iterable(&_18$$14, 0, "phalcon/Mvc/Model/Query.zep", 3041);
if (Z_TYPE_P(&_18$$14) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_18$$14), _19$$14)
{
@@ -143140,7 +143147,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_25$$17, "The column '", &columnName, "' is ambiguous, when preparing: ", &_24$$17);
ZEPHIR_CALL_METHOD(NULL, &_23$$17, "__construct", NULL, 33, &_25$$17);
zephir_check_call_status();
- zephir_throw_exception_debug(&_23$$17, "phalcon/Mvc/Model/Query.zep", 3036);
+ zephir_throw_exception_debug(&_23$$17, "phalcon/Mvc/Model/Query.zep", 3030);
ZEPHIR_MM_RESTORE();
return;
}
@@ -143170,7 +143177,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_30$$20, "The column '", &columnName, "' is ambiguous, when preparing: ", &_29$$20);
ZEPHIR_CALL_METHOD(NULL, &_28$$20, "__construct", NULL, 33, &_30$$20);
zephir_check_call_status();
- zephir_throw_exception_debug(&_28$$20, "phalcon/Mvc/Model/Query.zep", 3036);
+ zephir_throw_exception_debug(&_28$$20, "phalcon/Mvc/Model/Query.zep", 3030);
ZEPHIR_MM_RESTORE();
return;
}
@@ -143189,14 +143196,14 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_33$$21, "Column '", &columnName, "' doesn't belong to any of the selected models (1), when preparing: ", &_32$$21);
ZEPHIR_CALL_METHOD(NULL, &_31$$21, "__construct", NULL, 33, &_33$$21);
zephir_check_call_status();
- zephir_throw_exception_debug(&_31$$21, "phalcon/Mvc/Model/Query.zep", 3050);
+ zephir_throw_exception_debug(&_31$$21, "phalcon/Mvc/Model/Query.zep", 3044);
ZEPHIR_MM_RESTORE();
return;
}
zephir_read_property(&_34$$14, this_ptr, ZEND_STRL("models"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&models, &_34$$14);
if (UNEXPECTED(Z_TYPE_P(&models) != IS_ARRAY)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The models list was not loaded correctly", "phalcon/Mvc/Model/Query.zep", 3061);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The models list was not loaded correctly", "phalcon/Mvc/Model/Query.zep", 3055);
return;
}
ZEPHIR_INIT_VAR(&className);
@@ -143210,7 +143217,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_37$$23, "Can't obtain model's source from models list: '", &className, "', when preparing: ", &_36$$23);
ZEPHIR_CALL_METHOD(NULL, &_35$$23, "__construct", NULL, 33, &_37$$23);
zephir_check_call_status();
- zephir_throw_exception_debug(&_35$$23, "phalcon/Mvc/Model/Query.zep", 3072);
+ zephir_throw_exception_debug(&_35$$23, "phalcon/Mvc/Model/Query.zep", 3066);
ZEPHIR_MM_RESTORE();
return;
}
@@ -143231,7 +143238,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_40$$27, "Column '", &columnName, "' doesn't belong to any of the selected models (3), when preparing: ", &_39$$27);
ZEPHIR_CALL_METHOD(NULL, &_38$$27, "__construct", NULL, 33, &_40$$27);
zephir_check_call_status();
- zephir_throw_exception_debug(&_38$$27, "phalcon/Mvc/Model/Query.zep", 3091);
+ zephir_throw_exception_debug(&_38$$27, "phalcon/Mvc/Model/Query.zep", 3085);
ZEPHIR_MM_RESTORE();
return;
}
@@ -143308,7 +143315,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getReadConnection)
ZEPHIR_CALL_METHOD(&connection, model, "selectreadconnection", NULL, 0, &intermediate, &bindParams, &bindTypes);
zephir_check_call_status();
if (UNEXPECTED(Z_TYPE_P(&connection) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "selectReadConnection did not return a connection", "phalcon/Mvc/Model/Query.zep", 3135);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "selectReadConnection did not return a connection", "phalcon/Mvc/Model/Query.zep", 3129);
return;
}
RETURN_CCTOR(&connection);
@@ -143369,10 +143376,10 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getRelatedRecords)
zephir_array_fast_append(&_0, &_1);
zephir_array_update_string(&selectIr, SL("columns"), &_0, PH_COPY | PH_SEPARATE);
zephir_memory_observe(&_4);
- zephir_array_fetch_string(&_4, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3165);
+ zephir_array_fetch_string(&_4, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3159);
zephir_array_update_string(&selectIr, SL("models"), &_4, PH_COPY | PH_SEPARATE);
ZEPHIR_OBS_NVAR(&_4);
- zephir_array_fetch_string(&_4, &intermediate, SL("tables"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3167);
+ zephir_array_fetch_string(&_4, &intermediate, SL("tables"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3161);
zephir_array_update_string(&selectIr, SL("tables"), &_4, PH_COPY | PH_SEPARATE);
zephir_memory_observe(&whereConditions);
if (zephir_array_isset_string_fetch(&whereConditions, &intermediate, SL("where"), 0)) {
@@ -143451,7 +143458,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
ZEPHIR_OBS_COPY_OR_DUP(&column, column_param);
zephir_memory_observe(&columnType);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&columnType, &column, SL("type"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3207);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3201);
return;
}
ZEPHIR_INIT_VAR(&sqlColumns);
@@ -143460,7 +143467,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
zephir_array_isset_string_fetch(&eager, &column, SL("eager"), 0);
if (ZEPHIR_IS_LONG(&columnType, 352)) {
zephir_read_property(&_0$$4, this_ptr, ZEND_STRL("models"), PH_NOISY_CC | PH_READONLY);
- zephir_is_iterable(&_0$$4, 0, "phalcon/Mvc/Model/Query.zep", 3237);
+ zephir_is_iterable(&_0$$4, 0, "phalcon/Mvc/Model/Query.zep", 3231);
if (Z_TYPE_P(&_0$$4) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_0$$4), _3$$4, _4$$4, _1$$4)
{
@@ -143482,10 +143489,10 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
zephir_array_update_string(&sqlColumn, SL("balias"), &_5$$5, PH_COPY | PH_SEPARATE);
if (Z_TYPE_P(&eager) != IS_NULL) {
zephir_array_update_string(&sqlColumn, SL("eager"), &eager, PH_COPY | PH_SEPARATE);
- zephir_array_fetch_string(&_7$$6, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3231);
+ zephir_array_fetch_string(&_7$$6, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3225);
zephir_array_update_string(&sqlColumn, SL("eagerType"), &_7$$6, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3234);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3228);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &_0$$4, "rewind", NULL, 0);
@@ -143511,10 +143518,10 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
ZEPHIR_CPY_WRT(&sqlColumn, &_8$$7);
if (Z_TYPE_P(&eager) != IS_NULL) {
zephir_array_update_string(&sqlColumn, SL("eager"), &eager, PH_COPY | PH_SEPARATE);
- zephir_array_fetch_string(&_10$$8, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3231);
+ zephir_array_fetch_string(&_10$$8, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3225);
zephir_array_update_string(&sqlColumn, SL("eagerType"), &_10$$8, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3234);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3228);
ZEPHIR_CALL_METHOD(NULL, &_0$$4, "next", NULL, 0);
zephir_check_call_status();
}
@@ -143524,14 +143531,14 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
RETURN_CTOR(&sqlColumns);
}
if (UNEXPECTED(!(zephir_array_isset_string(&column, SL("column"))))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3241);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3235);
return;
}
if (ZEPHIR_IS_LONG(&columnType, 353)) {
zephir_read_property(&_11$$10, this_ptr, ZEND_STRL("sqlAliases"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&sqlAliases, &_11$$10);
zephir_memory_observe(&columnDomain);
- zephir_array_fetch_string(&columnDomain, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3253);
+ zephir_array_fetch_string(&columnDomain, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3247);
ZEPHIR_OBS_NVAR(&source);
if (UNEXPECTED(!(zephir_array_isset_fetch(&source, &sqlAliases, &columnDomain, 0)))) {
ZEPHIR_INIT_VAR(&_12$$11);
@@ -143541,7 +143548,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
ZEPHIR_CONCAT_SVSV(&_14$$11, "Unknown model or alias '", &columnDomain, "' (2), when preparing: ", &_13$$11);
ZEPHIR_CALL_METHOD(NULL, &_12$$11, "__construct", NULL, 33, &_14$$11);
zephir_check_call_status();
- zephir_throw_exception_debug(&_12$$11, "phalcon/Mvc/Model/Query.zep", 3258);
+ zephir_throw_exception_debug(&_12$$11, "phalcon/Mvc/Model/Query.zep", 3252);
ZEPHIR_MM_RESTORE();
return;
}
@@ -143551,7 +143558,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
zephir_read_property(&_11$$10, this_ptr, ZEND_STRL("sqlAliasesModels"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&sqlAliasesModels, &_11$$10);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch(&modelName, &sqlAliasesModels, &columnDomain, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3272);
+ zephir_array_fetch(&modelName, &sqlAliasesModels, &columnDomain, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3266);
if (Z_TYPE_P(&preparedAlias) != IS_STRING) {
if (ZEPHIR_IS_EQUAL(&columnDomain, &modelName)) {
ZEPHIR_CALL_FUNCTION(&preparedAlias, "lcfirst", &_6, 76, &modelName);
@@ -143569,10 +143576,10 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
ZEPHIR_CPY_WRT(&sqlColumn, &_15$$10);
if (Z_TYPE_P(&eager) != IS_NULL) {
zephir_array_update_string(&sqlColumn, SL("eager"), &eager, PH_COPY | PH_SEPARATE);
- zephir_array_fetch_string(&_16$$15, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3299);
+ zephir_array_fetch_string(&_16$$15, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3293);
zephir_array_update_string(&sqlColumn, SL("eagerType"), &_16$$15, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3302);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3296);
RETURN_CTOR(&sqlColumns);
}
if (ZEPHIR_IS_LONG(&columnType, 354)) {
@@ -143581,7 +143588,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
add_assoc_stringl_ex(&_17$$16, SL("type"), SL("scalar"));
ZEPHIR_CPY_WRT(&sqlColumn, &_17$$16);
zephir_memory_observe(&columnData);
- zephir_array_fetch_string(&columnData, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3316);
+ zephir_array_fetch_string(&columnData, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3310);
ZEPHIR_CALL_METHOD(&sqlExprColumn, this_ptr, "getexpression", NULL, 462, &columnData);
zephir_check_call_status();
zephir_memory_observe(&balias);
@@ -143591,11 +143598,11 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
}
if (Z_TYPE_P(&eager) != IS_NULL) {
zephir_array_update_string(&sqlColumn, SL("eager"), &eager, PH_COPY | PH_SEPARATE);
- zephir_array_fetch_string(&_18$$18, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3329);
+ zephir_array_fetch_string(&_18$$18, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3323);
zephir_array_update_string(&sqlColumn, SL("eagerType"), &_18$$18, PH_COPY | PH_SEPARATE);
}
zephir_array_update_string(&sqlColumn, SL("column"), &sqlExprColumn, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3333);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3327);
RETURN_CTOR(&sqlColumns);
}
ZEPHIR_INIT_VAR(&_19);
@@ -143604,7 +143611,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
ZEPHIR_CONCAT_SV(&_20, "Unknown type of column ", &columnType);
ZEPHIR_CALL_METHOD(NULL, &_19, "__construct", NULL, 33, &_20);
zephir_check_call_status();
- zephir_throw_exception_debug(&_19, "phalcon/Mvc/Model/Query.zep", 3338);
+ zephir_throw_exception_debug(&_19, "phalcon/Mvc/Model/Query.zep", 3332);
ZEPHIR_MM_RESTORE();
return;
}
@@ -143708,7 +143715,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin)
} else {
ZEPHIR_INIT_VAR(&sqlJoinPartialConditions);
array_init(&sqlJoinPartialConditions);
- zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 3428);
+ zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 3422);
if (Z_TYPE_P(&fields) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _7$$4, _8$$4, _5$$4)
{
@@ -143729,7 +143736,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin)
ZEPHIR_CONCAT_SVSVSV(&_11$$6, "The number of fields must be equal to the number of referenced fields in join ", &modelAlias, "-", &joinAlias, ", when preparing: ", &_10$$6);
ZEPHIR_CALL_METHOD(NULL, &_9$$6, "__construct", &_12, 33, &_11$$6);
zephir_check_call_status();
- zephir_throw_exception_debug(&_9$$6, "phalcon/Mvc/Model/Query.zep", 3400);
+ zephir_throw_exception_debug(&_9$$6, "phalcon/Mvc/Model/Query.zep", 3394);
ZEPHIR_MM_RESTORE();
return;
}
@@ -143753,7 +143760,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin)
ZEPHIR_CALL_METHOD(&_14$$5, this_ptr, "getqualified", NULL, 463, &_16$$5);
zephir_check_call_status();
zephir_array_update_string(&_13$$5, SL("right"), &_14$$5, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoinPartialConditions, &_13$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3425);
+ zephir_array_append(&sqlJoinPartialConditions, &_13$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3419);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &fields, "rewind", NULL, 0);
@@ -143777,7 +143784,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin)
ZEPHIR_CONCAT_SVSVSV(&_19$$8, "The number of fields must be equal to the number of referenced fields in join ", &modelAlias, "-", &joinAlias, ", when preparing: ", &_18$$8);
ZEPHIR_CALL_METHOD(NULL, &_17$$8, "__construct", &_12, 33, &_19$$8);
zephir_check_call_status();
- zephir_throw_exception_debug(&_17$$8, "phalcon/Mvc/Model/Query.zep", 3400);
+ zephir_throw_exception_debug(&_17$$8, "phalcon/Mvc/Model/Query.zep", 3394);
ZEPHIR_MM_RESTORE();
return;
}
@@ -143801,7 +143808,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin)
ZEPHIR_CALL_METHOD(&_21$$7, this_ptr, "getqualified", NULL, 463, &_23$$7);
zephir_check_call_status();
zephir_array_update_string(&_20$$7, SL("right"), &_21$$7, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoinPartialConditions, &_20$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3425);
+ zephir_array_append(&sqlJoinPartialConditions, &_20$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3419);
ZEPHIR_CALL_METHOD(NULL, &fields, "next", NULL, 0);
zephir_check_call_status();
}
@@ -143839,7 +143846,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getTable)
zephir_get_arrval(&qualifiedName, qualifiedName_param);
zephir_memory_observe(&modelName);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&modelName, &qualifiedName, SL("name"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3450);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3444);
return;
}
ZEPHIR_CALL_METHOD(&model, manager, "load", NULL, 0, &modelName);
@@ -143918,7 +143925,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, getWriteConnection)
ZEPHIR_CALL_METHOD(&connection, model, "selectwriteconnection", NULL, 0, &intermediate, &bindParams, &bindTypes);
zephir_check_call_status();
if (UNEXPECTED(Z_TYPE_P(&connection) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "selectWriteConnection did not return a connection", "phalcon/Mvc/Model/Query.zep", 3488);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "selectWriteConnection did not return a connection", "phalcon/Mvc/Model/Query.zep", 3482);
return;
}
RETURN_CCTOR(&connection);
@@ -143975,12 +143982,12 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete)
ZEPHIR_CPY_WRT(&ast, &_0);
zephir_memory_observe(&delete);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&delete, &ast, SL("delete"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted DELETE AST", "phalcon/Mvc/Model/Query.zep", 3510);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted DELETE AST", "phalcon/Mvc/Model/Query.zep", 3504);
return;
}
zephir_memory_observe(&tables);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&tables, &delete, SL("tables"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted DELETE AST", "phalcon/Mvc/Model/Query.zep", 3514);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted DELETE AST", "phalcon/Mvc/Model/Query.zep", 3508);
return;
}
ZEPHIR_INIT_VAR(&models);
@@ -144004,16 +144011,16 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete)
}
zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&manager, &_0);
- zephir_is_iterable(&deleteTables, 0, "phalcon/Mvc/Model/Query.zep", 3574);
+ zephir_is_iterable(&deleteTables, 0, "phalcon/Mvc/Model/Query.zep", 3568);
if (Z_TYPE_P(&deleteTables) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&deleteTables), _1)
{
ZEPHIR_INIT_NVAR(&table);
ZVAL_COPY(&table, _1);
ZEPHIR_OBS_NVAR(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3538);
+ zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3532);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3539);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3533);
ZEPHIR_CALL_METHOD(&model, &manager, "load", &_3, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&source, &model, "getsource", NULL, 0);
@@ -144037,17 +144044,17 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete)
ZEPHIR_OBS_NVAR(&alias);
if (zephir_array_isset_string_fetch(&alias, &table, SL("alias"), 0)) {
zephir_array_update_zval(&sqlAliases, &alias, &alias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3556);
- zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3557);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3550);
+ zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3551);
zephir_array_update_zval(&sqlAliasesModelsInstances, &alias, &model, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&models, &alias, &modelName, PH_COPY | PH_SEPARATE);
} else {
zephir_array_update_zval(&sqlAliases, &modelName, &source, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliasesModelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3563);
+ zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3557);
zephir_array_update_zval(&models, &modelName, &source, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3567);
+ zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3561);
zephir_array_update_zval(&modelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
} ZEND_HASH_FOREACH_END();
} else {
@@ -144062,9 +144069,9 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete)
ZEPHIR_CALL_METHOD(&table, &deleteTables, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3538);
+ zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3532);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3539);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3533);
ZEPHIR_CALL_METHOD(&model, &manager, "load", &_6, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&source, &model, "getsource", NULL, 0);
@@ -144087,17 +144094,17 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete)
ZEPHIR_OBS_NVAR(&alias);
if (zephir_array_isset_string_fetch(&alias, &table, SL("alias"), 0)) {
zephir_array_update_zval(&sqlAliases, &alias, &alias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3556);
- zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3557);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3550);
+ zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3551);
zephir_array_update_zval(&sqlAliasesModelsInstances, &alias, &model, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&models, &alias, &modelName, PH_COPY | PH_SEPARATE);
} else {
zephir_array_update_zval(&sqlAliases, &modelName, &source, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliasesModelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3563);
+ zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3557);
zephir_array_update_zval(&models, &modelName, &source, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3567);
+ zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3561);
zephir_array_update_zval(&modelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, &deleteTables, "next", NULL, 0);
zephir_check_call_status();
@@ -144180,23 +144187,23 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
zephir_read_property(&_0, this_ptr, ZEND_STRL("ast"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&ast, &_0);
if (UNEXPECTED(!(zephir_array_isset_string(&ast, SL("qualifiedName"))))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3608);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3602);
return;
}
if (UNEXPECTED(!(zephir_array_isset_string(&ast, SL("values"))))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3612);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3606);
return;
}
zephir_memory_observe(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &ast, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3615);
+ zephir_array_fetch_string(&qualifiedName, &ast, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3609);
if (UNEXPECTED(!(zephir_array_isset_string(&qualifiedName, SL("name"))))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3619);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3613);
return;
}
zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&manager, &_0);
zephir_memory_observe(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3623);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3617);
ZEPHIR_CALL_METHOD(&model, &manager, "load", NULL, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&source, &model, "getsource", NULL, 0);
@@ -144213,8 +144220,8 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
notQuoting = 0;
ZEPHIR_INIT_VAR(&exprValues);
array_init(&exprValues);
- zephir_array_fetch_string(&_2, &ast, SL("values"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3636);
- zephir_is_iterable(&_2, 0, "phalcon/Mvc/Model/Query.zep", 3644);
+ zephir_array_fetch_string(&_2, &ast, SL("values"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3630);
+ zephir_is_iterable(&_2, 0, "phalcon/Mvc/Model/Query.zep", 3638);
if (Z_TYPE_P(&_2) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_2), _3)
{
@@ -144223,7 +144230,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_INIT_NVAR(&_5$$7);
zephir_create_array(&_5$$7, 2, 0);
ZEPHIR_OBS_NVAR(&_6$$7);
- zephir_array_fetch_string(&_6$$7, &exprValue, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3639);
+ zephir_array_fetch_string(&_6$$7, &exprValue, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3633);
zephir_array_update_string(&_5$$7, SL("type"), &_6$$7, PH_COPY | PH_SEPARATE);
if (notQuoting) {
ZVAL_BOOL(&_8$$7, 1);
@@ -144233,7 +144240,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_CALL_METHOD(&_7$$7, this_ptr, "getexpression", &_9, 462, &exprValue, &_8$$7);
zephir_check_call_status();
zephir_array_update_string(&_5$$7, SL("value"), &_7$$7, PH_COPY | PH_SEPARATE);
- zephir_array_append(&exprValues, &_5$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3641);
+ zephir_array_append(&exprValues, &_5$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3635);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &_2, "rewind", NULL, 0);
@@ -144249,7 +144256,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_INIT_NVAR(&_10$$8);
zephir_create_array(&_10$$8, 2, 0);
ZEPHIR_OBS_NVAR(&_11$$8);
- zephir_array_fetch_string(&_11$$8, &exprValue, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3639);
+ zephir_array_fetch_string(&_11$$8, &exprValue, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3633);
zephir_array_update_string(&_10$$8, SL("type"), &_11$$8, PH_COPY | PH_SEPARATE);
if (notQuoting) {
ZVAL_BOOL(&_13$$8, 1);
@@ -144259,7 +144266,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_CALL_METHOD(&_12$$8, this_ptr, "getexpression", &_9, 462, &exprValue, &_13$$8);
zephir_check_call_status();
zephir_array_update_string(&_10$$8, SL("value"), &_12$$8, PH_COPY | PH_SEPARATE);
- zephir_array_append(&exprValues, &_10$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3641);
+ zephir_array_append(&exprValues, &_10$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3635);
ZEPHIR_CALL_METHOD(NULL, &_2, "next", NULL, 0);
zephir_check_call_status();
}
@@ -144275,14 +144282,14 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
if (zephir_array_isset_string_fetch(&fields, &ast, SL("fields"), 0)) {
ZEPHIR_INIT_VAR(&sqlFields);
array_init(&sqlFields);
- zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 3668);
+ zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 3662);
if (Z_TYPE_P(&fields) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&fields), _14$$9)
{
ZEPHIR_INIT_NVAR(&field);
ZVAL_COPY(&field, _14$$9);
ZEPHIR_OBS_NVAR(&name);
- zephir_array_fetch_string(&name, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3655);
+ zephir_array_fetch_string(&name, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3649);
ZEPHIR_CALL_METHOD(&_16$$10, &metaData, "hasattribute", &_17, 0, &model, &name);
zephir_check_call_status();
if (UNEXPECTED(!zephir_is_true(&_16$$10))) {
@@ -144293,11 +144300,11 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_CONCAT_SVSVSV(&_20$$11, "The model '", &modelName, "' doesn't have the attribute '", &name, "', when preparing: ", &_19$$11);
ZEPHIR_CALL_METHOD(NULL, &_18$$11, "__construct", &_21, 33, &_20$$11);
zephir_check_call_status();
- zephir_throw_exception_debug(&_18$$11, "phalcon/Mvc/Model/Query.zep", 3661);
+ zephir_throw_exception_debug(&_18$$11, "phalcon/Mvc/Model/Query.zep", 3655);
ZEPHIR_MM_RESTORE();
return;
}
- zephir_array_append(&sqlFields, &name, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3665);
+ zephir_array_append(&sqlFields, &name, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3659);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &fields, "rewind", NULL, 0);
@@ -144311,7 +144318,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_CALL_METHOD(&field, &fields, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&name);
- zephir_array_fetch_string(&name, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3655);
+ zephir_array_fetch_string(&name, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3649);
ZEPHIR_CALL_METHOD(&_22$$12, &metaData, "hasattribute", &_23, 0, &model, &name);
zephir_check_call_status();
if (UNEXPECTED(!zephir_is_true(&_22$$12))) {
@@ -144322,11 +144329,11 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_CONCAT_SVSVSV(&_26$$13, "The model '", &modelName, "' doesn't have the attribute '", &name, "', when preparing: ", &_25$$13);
ZEPHIR_CALL_METHOD(NULL, &_24$$13, "__construct", &_21, 33, &_26$$13);
zephir_check_call_status();
- zephir_throw_exception_debug(&_24$$13, "phalcon/Mvc/Model/Query.zep", 3661);
+ zephir_throw_exception_debug(&_24$$13, "phalcon/Mvc/Model/Query.zep", 3655);
ZEPHIR_MM_RESTORE();
return;
}
- zephir_array_append(&sqlFields, &name, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3665);
+ zephir_array_append(&sqlFields, &name, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3659);
ZEPHIR_CALL_METHOD(NULL, &fields, "next", NULL, 0);
zephir_check_call_status();
}
@@ -144523,12 +144530,12 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
}
zephir_memory_observe(&tables);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&tables, &select, SL("tables"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3704);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3698);
return;
}
zephir_memory_observe(&columns);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&columns, &select, SL("columns"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3708);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3702);
return;
}
RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("nestingLevel")));
@@ -144569,26 +144576,26 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_read_property(&_1, this_ptr, ZEND_STRL("metaData"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&metaData, &_1);
if (UNEXPECTED(Z_TYPE_P(&manager) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A models-manager is required to execute the query", "phalcon/Mvc/Model/Query.zep", 3775);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A models-manager is required to execute the query", "phalcon/Mvc/Model/Query.zep", 3769);
return;
}
if (UNEXPECTED(Z_TYPE_P(&metaData) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A meta-data is required to execute the query", "phalcon/Mvc/Model/Query.zep", 3781);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A meta-data is required to execute the query", "phalcon/Mvc/Model/Query.zep", 3775);
return;
}
number = 0;
ZEPHIR_INIT_VAR(&automaticJoins);
array_init(&automaticJoins);
- zephir_is_iterable(&selectedModels, 0, "phalcon/Mvc/Model/Query.zep", 3911);
+ zephir_is_iterable(&selectedModels, 0, "phalcon/Mvc/Model/Query.zep", 3905);
if (Z_TYPE_P(&selectedModels) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&selectedModels), _2)
{
ZEPHIR_INIT_NVAR(&selectedModel);
ZVAL_COPY(&selectedModel, _2);
ZEPHIR_OBS_NVAR(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &selectedModel, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3789);
+ zephir_array_fetch_string(&qualifiedName, &selectedModel, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3783);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3790);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3784);
ZEPHIR_CALL_METHOD(&model, &manager, "load", &_4, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&schema, &model, "getschema", NULL, 0);
@@ -144613,7 +144620,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SVSV(&_7$$17, "Alias '", &alias, "' is used more than once, when preparing: ", &_6$$17);
ZEPHIR_CALL_METHOD(NULL, &_5$$17, "__construct", &_8, 33, &_7$$17);
zephir_check_call_status();
- zephir_throw_exception_debug(&_5$$17, "phalcon/Mvc/Model/Query.zep", 3815);
+ zephir_throw_exception_debug(&_5$$17, "phalcon/Mvc/Model/Query.zep", 3809);
ZEPHIR_MM_RESTORE();
return;
}
@@ -144622,7 +144629,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_array_update_zval(&sqlModelsAliases, &modelName, &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliasesModelsInstances, &alias, &model, PH_COPY | PH_SEPARATE);
if (Z_TYPE_P(&completeSource) == IS_ARRAY) {
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3827);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3821);
} else {
ZEPHIR_INIT_NVAR(&_9$$19);
zephir_create_array(&_9$$19, 3, 0);
@@ -144649,7 +144656,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
} else {
ZEPHIR_CPY_WRT(&withs, &with);
}
- zephir_is_iterable(&withs, 0, "phalcon/Mvc/Model/Query.zep", 3903);
+ zephir_is_iterable(&withs, 0, "phalcon/Mvc/Model/Query.zep", 3897);
if (Z_TYPE_P(&withs) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&withs), _10$$21)
{
@@ -144661,7 +144668,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_13$$24, "AA", &_12$$24);
ZEPHIR_CPY_WRT(&joinAlias, &_13$$24);
ZEPHIR_OBS_NVAR(&relationModel);
- zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3853);
+ zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3847);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_14, 0, &modelName, &relationModel);
zephir_check_call_status();
if (Z_TYPE_P(&relation) == IS_OBJECT) {
@@ -144684,7 +144691,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SVSVSV(&_19$$27, "Can't find a relationship between '", &modelName, "' and '", &relationModel, "' when preparing: ", &_18$$27);
ZEPHIR_CALL_METHOD(NULL, &_17$$27, "__construct", &_8, 33, &_19$$27);
zephir_check_call_status();
- zephir_throw_exception_debug(&_17$$27, "phalcon/Mvc/Model/Query.zep", 3873);
+ zephir_throw_exception_debug(&_17$$27, "phalcon/Mvc/Model/Query.zep", 3867);
ZEPHIR_MM_RESTORE();
return;
}
@@ -144704,7 +144711,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_array_update_string(&_21$$24, SL("eager"), &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_21$$24, SL("eagerType"), &eagerType, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_21$$24, SL("balias"), &bestAlias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&selectColumns, &_21$$24, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3887);
+ zephir_array_append(&selectColumns, &_21$$24, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3881);
ZEPHIR_INIT_NVAR(&_22$$24);
zephir_create_array(&_22$$24, 3, 0);
add_assoc_long_ex(&_22$$24, SL("type"), 360);
@@ -144718,7 +144725,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
add_assoc_long_ex(&_23$$24, SL("type"), 355);
zephir_array_update_string(&_23$$24, SL("name"), &joinAlias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_22$$24, SL("alias"), &_23$$24, PH_COPY | PH_SEPARATE);
- zephir_array_append(&automaticJoins, &_22$$24, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3899);
+ zephir_array_append(&automaticJoins, &_22$$24, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3893);
number++;
} ZEND_HASH_FOREACH_END();
} else {
@@ -144738,7 +144745,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_25$$28, "AA", &_24$$28);
ZEPHIR_CPY_WRT(&joinAlias, &_25$$28);
ZEPHIR_OBS_NVAR(&relationModel);
- zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3853);
+ zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3847);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_26, 0, &modelName, &relationModel);
zephir_check_call_status();
if (Z_TYPE_P(&relation) == IS_OBJECT) {
@@ -144761,7 +144768,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SVSVSV(&_31$$31, "Can't find a relationship between '", &modelName, "' and '", &relationModel, "' when preparing: ", &_30$$31);
ZEPHIR_CALL_METHOD(NULL, &_29$$31, "__construct", &_8, 33, &_31$$31);
zephir_check_call_status();
- zephir_throw_exception_debug(&_29$$31, "phalcon/Mvc/Model/Query.zep", 3873);
+ zephir_throw_exception_debug(&_29$$31, "phalcon/Mvc/Model/Query.zep", 3867);
ZEPHIR_MM_RESTORE();
return;
}
@@ -144781,7 +144788,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_array_update_string(&_33$$28, SL("eager"), &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_33$$28, SL("eagerType"), &eagerType, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_33$$28, SL("balias"), &bestAlias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&selectColumns, &_33$$28, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3887);
+ zephir_array_append(&selectColumns, &_33$$28, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3881);
ZEPHIR_INIT_NVAR(&_34$$28);
zephir_create_array(&_34$$28, 3, 0);
add_assoc_long_ex(&_34$$28, SL("type"), 360);
@@ -144795,7 +144802,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
add_assoc_long_ex(&_35$$28, SL("type"), 355);
zephir_array_update_string(&_35$$28, SL("name"), &joinAlias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_34$$28, SL("alias"), &_35$$28, PH_COPY | PH_SEPARATE);
- zephir_array_append(&automaticJoins, &_34$$28, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3899);
+ zephir_array_append(&automaticJoins, &_34$$28, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3893);
number++;
ZEPHIR_CALL_METHOD(NULL, &withs, "next", NULL, 0);
zephir_check_call_status();
@@ -144803,8 +144810,8 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
}
ZEPHIR_INIT_NVAR(&withItem);
}
- zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3905);
- zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3906);
+ zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3899);
+ zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3900);
zephir_array_update_zval(&modelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
} ZEND_HASH_FOREACH_END();
} else {
@@ -144819,9 +144826,9 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CALL_METHOD(&selectedModel, &selectedModels, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &selectedModel, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3789);
+ zephir_array_fetch_string(&qualifiedName, &selectedModel, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3783);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3790);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3784);
ZEPHIR_CALL_METHOD(&model, &manager, "load", &_36, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&schema, &model, "getschema", NULL, 0);
@@ -144847,7 +144854,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SVSV(&_40$$36, "Alias '", &alias, "' is used more than once, when preparing: ", &_39$$36);
ZEPHIR_CALL_METHOD(NULL, &_38$$36, "__construct", &_8, 33, &_40$$36);
zephir_check_call_status();
- zephir_throw_exception_debug(&_38$$36, "phalcon/Mvc/Model/Query.zep", 3815);
+ zephir_throw_exception_debug(&_38$$36, "phalcon/Mvc/Model/Query.zep", 3809);
ZEPHIR_MM_RESTORE();
return;
}
@@ -144856,7 +144863,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_array_update_zval(&sqlModelsAliases, &modelName, &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliasesModelsInstances, &alias, &model, PH_COPY | PH_SEPARATE);
if (Z_TYPE_P(&completeSource) == IS_ARRAY) {
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3827);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3821);
} else {
ZEPHIR_INIT_NVAR(&_41$$38);
zephir_create_array(&_41$$38, 3, 0);
@@ -144884,7 +144891,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
} else {
ZEPHIR_CPY_WRT(&withs, &with);
}
- zephir_is_iterable(&withs, 0, "phalcon/Mvc/Model/Query.zep", 3903);
+ zephir_is_iterable(&withs, 0, "phalcon/Mvc/Model/Query.zep", 3897);
if (Z_TYPE_P(&withs) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&withs), _43$$40)
{
@@ -144896,7 +144903,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_46$$43, "AA", &_45$$43);
ZEPHIR_CPY_WRT(&joinAlias, &_46$$43);
ZEPHIR_OBS_NVAR(&relationModel);
- zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3853);
+ zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3847);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_47, 0, &modelName, &relationModel);
zephir_check_call_status();
if (Z_TYPE_P(&relation) == IS_OBJECT) {
@@ -144919,7 +144926,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SVSVSV(&_52$$46, "Can't find a relationship between '", &modelName, "' and '", &relationModel, "' when preparing: ", &_51$$46);
ZEPHIR_CALL_METHOD(NULL, &_50$$46, "__construct", &_8, 33, &_52$$46);
zephir_check_call_status();
- zephir_throw_exception_debug(&_50$$46, "phalcon/Mvc/Model/Query.zep", 3873);
+ zephir_throw_exception_debug(&_50$$46, "phalcon/Mvc/Model/Query.zep", 3867);
ZEPHIR_MM_RESTORE();
return;
}
@@ -144939,7 +144946,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_array_update_string(&_54$$43, SL("eager"), &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_54$$43, SL("eagerType"), &eagerType, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_54$$43, SL("balias"), &bestAlias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&selectColumns, &_54$$43, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3887);
+ zephir_array_append(&selectColumns, &_54$$43, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3881);
ZEPHIR_INIT_NVAR(&_55$$43);
zephir_create_array(&_55$$43, 3, 0);
add_assoc_long_ex(&_55$$43, SL("type"), 360);
@@ -144953,7 +144960,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
add_assoc_long_ex(&_56$$43, SL("type"), 355);
zephir_array_update_string(&_56$$43, SL("name"), &joinAlias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_55$$43, SL("alias"), &_56$$43, PH_COPY | PH_SEPARATE);
- zephir_array_append(&automaticJoins, &_55$$43, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3899);
+ zephir_array_append(&automaticJoins, &_55$$43, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3893);
number++;
} ZEND_HASH_FOREACH_END();
} else {
@@ -144973,7 +144980,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_58$$47, "AA", &_57$$47);
ZEPHIR_CPY_WRT(&joinAlias, &_58$$47);
ZEPHIR_OBS_NVAR(&relationModel);
- zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3853);
+ zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3847);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_59, 0, &modelName, &relationModel);
zephir_check_call_status();
if (Z_TYPE_P(&relation) == IS_OBJECT) {
@@ -144996,7 +145003,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SVSVSV(&_64$$50, "Can't find a relationship between '", &modelName, "' and '", &relationModel, "' when preparing: ", &_63$$50);
ZEPHIR_CALL_METHOD(NULL, &_62$$50, "__construct", &_8, 33, &_64$$50);
zephir_check_call_status();
- zephir_throw_exception_debug(&_62$$50, "phalcon/Mvc/Model/Query.zep", 3873);
+ zephir_throw_exception_debug(&_62$$50, "phalcon/Mvc/Model/Query.zep", 3867);
ZEPHIR_MM_RESTORE();
return;
}
@@ -145016,7 +145023,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_array_update_string(&_66$$47, SL("eager"), &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_66$$47, SL("eagerType"), &eagerType, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_66$$47, SL("balias"), &bestAlias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&selectColumns, &_66$$47, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3887);
+ zephir_array_append(&selectColumns, &_66$$47, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3881);
ZEPHIR_INIT_NVAR(&_67$$47);
zephir_create_array(&_67$$47, 3, 0);
add_assoc_long_ex(&_67$$47, SL("type"), 360);
@@ -145030,7 +145037,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
add_assoc_long_ex(&_68$$47, SL("type"), 355);
zephir_array_update_string(&_68$$47, SL("name"), &joinAlias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_67$$47, SL("alias"), &_68$$47, PH_COPY | PH_SEPARATE);
- zephir_array_append(&automaticJoins, &_67$$47, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3899);
+ zephir_array_append(&automaticJoins, &_67$$47, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3893);
number++;
ZEPHIR_CALL_METHOD(NULL, &withs, "next", NULL, 0);
zephir_check_call_status();
@@ -145038,8 +145045,8 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
}
ZEPHIR_INIT_NVAR(&withItem);
}
- zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3905);
- zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3906);
+ zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3899);
+ zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3900);
zephir_array_update_zval(&modelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, &selectedModels, "next", NULL, 0);
zephir_check_call_status();
@@ -145100,7 +145107,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_fast_array_merge(&_81$$55, &joins, &automaticJoins);
zephir_array_update_string(&select, SL("joins"), &_81$$55, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_append(&automaticJoins, &joins, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3942);
+ zephir_array_append(&automaticJoins, &joins, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3936);
zephir_array_update_string(&select, SL("joins"), &automaticJoins, PH_COPY | PH_SEPARATE);
}
}
@@ -145119,7 +145126,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
position = 0;
ZEPHIR_INIT_VAR(&sqlColumnAliases);
array_init(&sqlColumnAliases);
- zephir_is_iterable(&selectColumns, 0, "phalcon/Mvc/Model/Query.zep", 3993);
+ zephir_is_iterable(&selectColumns, 0, "phalcon/Mvc/Model/Query.zep", 3987);
if (Z_TYPE_P(&selectColumns) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&selectColumns), _82)
{
@@ -145127,7 +145134,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZVAL_COPY(&column, _82);
ZEPHIR_CALL_METHOD(&_84$$60, this_ptr, "getselectcolumn", &_85, 478, &column);
zephir_check_call_status();
- zephir_is_iterable(&_84$$60, 0, "phalcon/Mvc/Model/Query.zep", 3991);
+ zephir_is_iterable(&_84$$60, 0, "phalcon/Mvc/Model/Query.zep", 3985);
if (Z_TYPE_P(&_84$$60) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_84$$60), _86$$60)
{
@@ -145144,7 +145151,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
if (zephir_array_isset_string_fetch(&alias, &sqlColumn, SL("balias"), 0)) {
zephir_array_update_zval(&sqlColumns, &alias, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_fetch_string(&_88$$65, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3981);
+ zephir_array_fetch_string(&_88$$65, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3975);
if (ZEPHIR_IS_STRING(&_88$$65, "scalar")) {
ZEPHIR_INIT_NVAR(&_89$$66);
ZVAL_LONG(&_89$$66, position);
@@ -145152,7 +145159,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_90$$66, "_", &_89$$66);
zephir_array_update_zval(&sqlColumns, &_90$$66, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3984);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3978);
}
}
}
@@ -145180,7 +145187,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
if (zephir_array_isset_string_fetch(&alias, &sqlColumn, SL("balias"), 0)) {
zephir_array_update_zval(&sqlColumns, &alias, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_fetch_string(&_91$$72, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3981);
+ zephir_array_fetch_string(&_91$$72, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3975);
if (ZEPHIR_IS_STRING(&_91$$72, "scalar")) {
ZEPHIR_INIT_NVAR(&_92$$73);
ZVAL_LONG(&_92$$73, position);
@@ -145188,7 +145195,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_93$$73, "_", &_92$$73);
zephir_array_update_zval(&sqlColumns, &_93$$73, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3984);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3978);
}
}
}
@@ -145212,7 +145219,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_94$$75, this_ptr, "getselectcolumn", &_85, 478, &column);
zephir_check_call_status();
- zephir_is_iterable(&_94$$75, 0, "phalcon/Mvc/Model/Query.zep", 3991);
+ zephir_is_iterable(&_94$$75, 0, "phalcon/Mvc/Model/Query.zep", 3985);
if (Z_TYPE_P(&_94$$75) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_94$$75), _95$$75)
{
@@ -145229,7 +145236,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
if (zephir_array_isset_string_fetch(&alias, &sqlColumn, SL("balias"), 0)) {
zephir_array_update_zval(&sqlColumns, &alias, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_fetch_string(&_97$$80, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3981);
+ zephir_array_fetch_string(&_97$$80, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3975);
if (ZEPHIR_IS_STRING(&_97$$80, "scalar")) {
ZEPHIR_INIT_NVAR(&_98$$81);
ZVAL_LONG(&_98$$81, position);
@@ -145237,7 +145244,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_99$$81, "_", &_98$$81);
zephir_array_update_zval(&sqlColumns, &_99$$81, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3984);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3978);
}
}
}
@@ -145265,7 +145272,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
if (zephir_array_isset_string_fetch(&alias, &sqlColumn, SL("balias"), 0)) {
zephir_array_update_zval(&sqlColumns, &alias, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_fetch_string(&_100$$87, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3981);
+ zephir_array_fetch_string(&_100$$87, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3975);
if (ZEPHIR_IS_STRING(&_100$$87, "scalar")) {
ZEPHIR_INIT_NVAR(&_101$$88);
ZVAL_LONG(&_101$$88, position);
@@ -145273,7 +145280,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_102$$88, "_", &_101$$88);
zephir_array_update_zval(&sqlColumns, &_102$$88, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3984);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3978);
}
}
}
@@ -145418,17 +145425,17 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_CPY_WRT(&ast, &_0);
zephir_memory_observe(&update);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&update, &ast, SL("update"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4070);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4064);
return;
}
zephir_memory_observe(&tables);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&tables, &update, SL("tables"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4074);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4068);
return;
}
zephir_memory_observe(&values);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&values, &update, SL("values"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4078);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4072);
return;
}
ZEPHIR_INIT_VAR(&models);
@@ -145452,16 +145459,16 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
}
zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&manager, &_0);
- zephir_is_iterable(&updateTables, 0, "phalcon/Mvc/Model/Query.zep", 4144);
+ zephir_is_iterable(&updateTables, 0, "phalcon/Mvc/Model/Query.zep", 4138);
if (Z_TYPE_P(&updateTables) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&updateTables), _1)
{
ZEPHIR_INIT_NVAR(&table);
ZVAL_COPY(&table, _1);
ZEPHIR_OBS_NVAR(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4102);
+ zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4096);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4103);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4097);
ZEPHIR_CALL_METHOD(&model, &manager, "load", &_3, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&source, &model, "getsource", NULL, 0);
@@ -145485,17 +145492,17 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_OBS_NVAR(&alias);
if (zephir_array_isset_string_fetch(&alias, &table, SL("alias"), 0)) {
zephir_array_update_zval(&sqlAliases, &alias, &alias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4126);
- zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4127);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4120);
+ zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4121);
zephir_array_update_zval(&sqlAliasesModelsInstances, &alias, &model, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&models, &alias, &modelName, PH_COPY | PH_SEPARATE);
} else {
zephir_array_update_zval(&sqlAliases, &modelName, &source, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliasesModelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4133);
+ zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4127);
zephir_array_update_zval(&models, &modelName, &source, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4137);
+ zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4131);
zephir_array_update_zval(&modelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
} ZEND_HASH_FOREACH_END();
} else {
@@ -145510,9 +145517,9 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_CALL_METHOD(&table, &updateTables, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4102);
+ zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4096);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4103);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4097);
ZEPHIR_CALL_METHOD(&model, &manager, "load", &_6, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&source, &model, "getsource", NULL, 0);
@@ -145535,17 +145542,17 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_OBS_NVAR(&alias);
if (zephir_array_isset_string_fetch(&alias, &table, SL("alias"), 0)) {
zephir_array_update_zval(&sqlAliases, &alias, &alias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4126);
- zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4127);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4120);
+ zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4121);
zephir_array_update_zval(&sqlAliasesModelsInstances, &alias, &model, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&models, &alias, &modelName, PH_COPY | PH_SEPARATE);
} else {
zephir_array_update_zval(&sqlAliases, &modelName, &source, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliasesModelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4133);
+ zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4127);
zephir_array_update_zval(&models, &modelName, &source, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4137);
+ zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4131);
zephir_array_update_zval(&modelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, &updateTables, "next", NULL, 0);
zephir_check_call_status();
@@ -145568,13 +145575,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_CPY_WRT(&updateValues, &values);
}
notQuoting = 0;
- zephir_is_iterable(&updateValues, 0, "phalcon/Mvc/Model/Query.zep", 4168);
+ zephir_is_iterable(&updateValues, 0, "phalcon/Mvc/Model/Query.zep", 4162);
if (Z_TYPE_P(&updateValues) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&updateValues), _9)
{
ZEPHIR_INIT_NVAR(&updateValue);
ZVAL_COPY(&updateValue, _9);
- zephir_array_fetch_string(&_12$$20, &updateValue, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 4160);
+ zephir_array_fetch_string(&_12$$20, &updateValue, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 4154);
if (notQuoting) {
ZVAL_BOOL(&_13$$20, 1);
} else {
@@ -145582,13 +145589,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
}
ZEPHIR_CALL_METHOD(&_11$$20, this_ptr, "getexpression", &_14, 462, &_12$$20, &_13$$20);
zephir_check_call_status();
- zephir_array_append(&sqlFields, &_11$$20, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4160);
+ zephir_array_append(&sqlFields, &_11$$20, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4154);
ZEPHIR_OBS_NVAR(&exprColumn);
- zephir_array_fetch_string(&exprColumn, &updateValue, SL("expr"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4161);
+ zephir_array_fetch_string(&exprColumn, &updateValue, SL("expr"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4155);
ZEPHIR_INIT_NVAR(&_15$$20);
zephir_create_array(&_15$$20, 2, 0);
ZEPHIR_OBS_NVAR(&_16$$20);
- zephir_array_fetch_string(&_16$$20, &exprColumn, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4163);
+ zephir_array_fetch_string(&_16$$20, &exprColumn, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4157);
zephir_array_update_string(&_15$$20, SL("type"), &_16$$20, PH_COPY | PH_SEPARATE);
if (notQuoting) {
ZVAL_BOOL(&_18$$20, 1);
@@ -145598,7 +145605,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_CALL_METHOD(&_17$$20, this_ptr, "getexpression", &_14, 462, &exprColumn, &_18$$20);
zephir_check_call_status();
zephir_array_update_string(&_15$$20, SL("value"), &_17$$20, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlValues, &_15$$20, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4165);
+ zephir_array_append(&sqlValues, &_15$$20, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4159);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &updateValues, "rewind", NULL, 0);
@@ -145611,7 +145618,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
}
ZEPHIR_CALL_METHOD(&updateValue, &updateValues, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_fetch_string(&_20$$21, &updateValue, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 4160);
+ zephir_array_fetch_string(&_20$$21, &updateValue, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 4154);
if (notQuoting) {
ZVAL_BOOL(&_21$$21, 1);
} else {
@@ -145619,13 +145626,13 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
}
ZEPHIR_CALL_METHOD(&_19$$21, this_ptr, "getexpression", &_14, 462, &_20$$21, &_21$$21);
zephir_check_call_status();
- zephir_array_append(&sqlFields, &_19$$21, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4160);
+ zephir_array_append(&sqlFields, &_19$$21, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4154);
ZEPHIR_OBS_NVAR(&exprColumn);
- zephir_array_fetch_string(&exprColumn, &updateValue, SL("expr"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4161);
+ zephir_array_fetch_string(&exprColumn, &updateValue, SL("expr"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4155);
ZEPHIR_INIT_NVAR(&_22$$21);
zephir_create_array(&_22$$21, 2, 0);
ZEPHIR_OBS_NVAR(&_23$$21);
- zephir_array_fetch_string(&_23$$21, &exprColumn, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4163);
+ zephir_array_fetch_string(&_23$$21, &exprColumn, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4157);
zephir_array_update_string(&_22$$21, SL("type"), &_23$$21, PH_COPY | PH_SEPARATE);
if (notQuoting) {
ZVAL_BOOL(&_25$$21, 1);
@@ -145635,7 +145642,7 @@ static PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_CALL_METHOD(&_24$$21, this_ptr, "getexpression", &_14, 462, &exprColumn, &_25$$21);
zephir_check_call_status();
zephir_array_update_string(&_22$$21, SL("value"), &_24$$21, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlValues, &_22$$21, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4165);
+ zephir_array_append(&sqlValues, &_22$$21, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4159);
ZEPHIR_CALL_METHOD(NULL, &updateValues, "next", NULL, 0);
zephir_check_call_status();
}
@@ -197033,7 +197040,7 @@ static PHP_METHOD(Phalcon_Support_Version, getVersion)
ZVAL_LONG(&_0, 9);
zephir_array_fast_append(return_value, &_0);
ZEPHIR_INIT_NVAR(&_0);
- ZVAL_LONG(&_0, 1);
+ ZVAL_LONG(&_0, 2);
zephir_array_fast_append(return_value, &_0);
ZEPHIR_INIT_NVAR(&_0);
ZVAL_LONG(&_0, 4);
diff --git a/build/phalcon/phalcon.zep.h b/build/phalcon/phalcon.zep.h
index eb3d4a87f07..466e5710ff2 100644
--- a/build/phalcon/phalcon.zep.h
+++ b/build/phalcon/phalcon.zep.h
@@ -31120,12 +31120,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_translate_adapter_csv_qu
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, placeholders, IS_ARRAY, 0, "[]")
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_translate_adapter_csv_load, 0, 4, IS_VOID, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_translate_adapter_csv_load, 0, 5, IS_VOID, 0)
ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, delimiter, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, enclosure, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, escape, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_translate_adapter_csv_toarray, 0, 0, IS_ARRAY, 0)
diff --git a/build/phalcon/php_phalcon.h b/build/phalcon/php_phalcon.h
index 7a71651eec1..d6c156053bb 100644
--- a/build/phalcon/php_phalcon.h
+++ b/build/phalcon/php_phalcon.h
@@ -103,7 +103,7 @@ typedef zend_function zephir_fcall_cache_entry;
#define PHP_PHALCON_NAME "phalcon"
-#define PHP_PHALCON_VERSION "5.9.1"
+#define PHP_PHALCON_VERSION "5.9.2"
#define PHP_PHALCON_EXTNAME "phalcon"
#define PHP_PHALCON_AUTHOR "Phalcon Team and contributors"
#define PHP_PHALCON_ZEPVERSION "0.18.0-$Id$"
diff --git a/composer.json b/composer.json
index 1a70c8e04ff..20d1149c38d 100644
--- a/composer.json
+++ b/composer.json
@@ -8,7 +8,7 @@
"high load",
"mvc"
],
- "version": "5.9.1",
+ "version": "5.9.2",
"license": "BSD-3-Clause",
"authors": [
{
diff --git a/composer.lock b/composer.lock
index 0c4bd40a728..95956bda90e 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "cc904510693218e291b7b89f0f2c2c68",
+ "content-hash": "7176cb4b55ecbc1b8c11eba308478c2c",
"packages": [],
"packages-dev": [
{
@@ -1643,16 +1643,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
- "version": "v3.74.0",
+ "version": "v3.75.0",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
- "reference": "6b7cb12a6cf592fd9a2b46a2d5d4c3b44003973d"
+ "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/6b7cb12a6cf592fd9a2b46a2d5d4c3b44003973d",
- "reference": "6b7cb12a6cf592fd9a2b46a2d5d4c3b44003973d",
+ "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/399a128ff2fdaf4281e4e79b755693286cdf325c",
+ "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c",
"shasum": ""
},
"require": {
@@ -1735,7 +1735,7 @@
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
- "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.74.0"
+ "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.75.0"
},
"funding": [
{
@@ -1743,7 +1743,7 @@
"type": "github"
}
],
- "time": "2025-03-27T22:31:30+00:00"
+ "time": "2025-03-31T18:40:42+00:00"
},
{
"name": "graham-campbell/result-type",
@@ -2600,16 +2600,16 @@
},
{
"name": "phalcon/ide-stubs",
- "version": "v5.9.0",
+ "version": "v5.9.1",
"source": {
"type": "git",
"url": "https://github.com/phalcon/ide-stubs.git",
- "reference": "1ba9552a45df84031f561133923a7c8d601e2da1"
+ "reference": "14bb6376444345dea0a860f39b8e3eb2481a6c63"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phalcon/ide-stubs/zipball/1ba9552a45df84031f561133923a7c8d601e2da1",
- "reference": "1ba9552a45df84031f561133923a7c8d601e2da1",
+ "url": "https://api.github.com/repos/phalcon/ide-stubs/zipball/14bb6376444345dea0a860f39b8e3eb2481a6c63",
+ "reference": "14bb6376444345dea0a860f39b8e3eb2481a6c63",
"shasum": ""
},
"require": {
@@ -2663,7 +2663,7 @@
"type": "open_collective"
}
],
- "time": "2025-03-10T17:29:12+00:00"
+ "time": "2025-04-01T00:20:50+00:00"
},
{
"name": "phalcon/zephir",
diff --git a/config.json b/config.json
index fd5519d3461..4d7b18db929 100644
--- a/config.json
+++ b/config.json
@@ -3,7 +3,7 @@
"name": "phalcon",
"description": "Phalcon is a full stack PHP framework, delivered as a PHP extension, offering lower resource consumption and high performance.",
"author": "Phalcon Team and contributors",
- "version": "5.9.1",
+ "version": "5.9.2",
"verbose": false,
"stubs": {
"path": "ide\/%version%\/%namespace%\/",
diff --git a/ext/phalcon/mvc/model/query.zep.c b/ext/phalcon/mvc/model/query.zep.c
index d05eebd2f74..343c99de7ab 100644
--- a/ext/phalcon/mvc/model/query.zep.c
+++ b/ext/phalcon/mvc/model/query.zep.c
@@ -328,10 +328,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, clean)
*/
PHP_METHOD(Phalcon_Mvc_Model_Query, execute)
{
- zval _5$$8;
+ zval _5$$7;
zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL;
zend_long ZEPHIR_LAST_CALL_STATUS;
- zval *bindParams_param = NULL, *bindTypes_param = NULL, adapter, cache, cacheLifetime, cacheOptions, cacheService, defaultBindParams, defaultBindTypes, intermediate, key, lifetime, mergedParams, mergedTypes, preparedResult, result, type, uniqueRow, _0, _1$$3, _2$$3, _3$$3, _4$$8, _6$$10, _7$$20, _8$$20;
+ zval *bindParams_param = NULL, *bindTypes_param = NULL, adapter, cache, cacheLifetime, cacheOptions, cacheService, defaultBindParams, defaultBindTypes, intermediate, key, lifetime, mergedParams, mergedTypes, preparedResult, result, type, uniqueRow, _0, _1$$3, _2$$3, _3$$3, _4$$7, _6$$9, _7$$19, _8$$19;
zval bindParams, bindTypes;
zval *this_ptr = getThis();
@@ -357,11 +357,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, execute)
ZVAL_UNDEF(&_1$$3);
ZVAL_UNDEF(&_2$$3);
ZVAL_UNDEF(&_3$$3);
- ZVAL_UNDEF(&_4$$8);
- ZVAL_UNDEF(&_6$$10);
- ZVAL_UNDEF(&_7$$20);
- ZVAL_UNDEF(&_8$$20);
- ZVAL_UNDEF(&_5$$8);
+ ZVAL_UNDEF(&_4$$7);
+ ZVAL_UNDEF(&_6$$9);
+ ZVAL_UNDEF(&_7$$19);
+ ZVAL_UNDEF(&_8$$19);
+ ZVAL_UNDEF(&_5$$7);
ZEND_PARSE_PARAMETERS_START(0, 2)
Z_PARAM_OPTIONAL
Z_PARAM_ARRAY(bindParams)
@@ -396,11 +396,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, execute)
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A cache key must be provided to identify the cached resultset in the cache backend", "phalcon/Mvc/Model/Query.zep", 283);
return;
}
- zephir_memory_observe(&lifetime);
- if (!(zephir_array_isset_string_fetch(&lifetime, &cacheOptions, SL("lifetime"), 0))) {
- ZEPHIR_INIT_NVAR(&lifetime);
- ZVAL_LONG(&lifetime, 3600);
- }
zephir_memory_observe(&cacheService);
if (!(zephir_array_isset_string_fetch(&cacheService, &cacheOptions, SL("service"), 0))) {
ZEPHIR_INIT_NVAR(&cacheService);
@@ -414,13 +409,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, execute)
ZEPHIR_CALL_FUNCTION(&_3$$3, "is_a", NULL, 87, &cache, &_2$$3);
zephir_check_call_status();
if (UNEXPECTED(!ZEPHIR_IS_TRUE_IDENTICAL(&_3$$3))) {
- ZEPHIR_INIT_VAR(&_4$$8);
- object_init_ex(&_4$$8, phalcon_mvc_model_exception_ce);
- ZEPHIR_INIT_VAR(&_5$$8);
- ZEPHIR_CONCAT_SS(&_5$$8, "Cache service must be an object implementing ", "Phalcon\\Cache\\CacheInterface");
- ZEPHIR_CALL_METHOD(NULL, &_4$$8, "__construct", NULL, 33, &_5$$8);
+ ZEPHIR_INIT_VAR(&_4$$7);
+ object_init_ex(&_4$$7, phalcon_mvc_model_exception_ce);
+ ZEPHIR_INIT_VAR(&_5$$7);
+ ZEPHIR_CONCAT_SS(&_5$$7, "Cache service must be an object implementing ", "Phalcon\\Cache\\CacheInterface");
+ ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", NULL, 33, &_5$$7);
zephir_check_call_status();
- zephir_throw_exception_debug(&_4$$8, "phalcon/Mvc/Model/Query.zep", 303);
+ zephir_throw_exception_debug(&_4$$7, "phalcon/Mvc/Model/Query.zep", 296);
ZEPHIR_MM_RESTORE();
return;
}
@@ -428,18 +423,19 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, execute)
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&cacheLifetime, &adapter, "getlifetime", NULL, 0);
zephir_check_call_status();
- if (!ZEPHIR_IS_IDENTICAL(&lifetime, &cacheLifetime)) {
+ zephir_memory_observe(&lifetime);
+ if (!(zephir_array_isset_string_fetch(&lifetime, &cacheOptions, SL("lifetime"), 0))) {
ZEPHIR_CPY_WRT(&lifetime, &cacheLifetime);
}
ZEPHIR_CALL_METHOD(&result, &cache, "get", NULL, 0, &key);
zephir_check_call_status();
if (!(ZEPHIR_IS_EMPTY(&result))) {
if (UNEXPECTED(Z_TYPE_P(&result) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Cache didn't return a valid resultset", "phalcon/Mvc/Model/Query.zep", 322);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Cache didn't return a valid resultset", "phalcon/Mvc/Model/Query.zep", 316);
return;
}
- ZVAL_BOOL(&_6$$10, 0);
- ZEPHIR_CALL_METHOD(NULL, &result, "setisfresh", NULL, 0, &_6$$10);
+ ZVAL_BOOL(&_6$$9, 0);
+ ZEPHIR_CALL_METHOD(NULL, &result, "setisfresh", NULL, 0, &_6$$9);
zephir_check_call_status();
if (zephir_is_true(&uniqueRow)) {
ZEPHIR_CALL_METHOD(&preparedResult, &result, "getfirst", NULL, 0);
@@ -488,20 +484,20 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, execute)
zephir_check_call_status();
break;
}
- ZEPHIR_INIT_VAR(&_7$$20);
- object_init_ex(&_7$$20, phalcon_mvc_model_exception_ce);
- ZEPHIR_INIT_VAR(&_8$$20);
- ZEPHIR_CONCAT_SV(&_8$$20, "Unknown statement ", &type);
- ZEPHIR_CALL_METHOD(NULL, &_7$$20, "__construct", NULL, 33, &_8$$20);
+ ZEPHIR_INIT_VAR(&_7$$19);
+ object_init_ex(&_7$$19, phalcon_mvc_model_exception_ce);
+ ZEPHIR_INIT_VAR(&_8$$19);
+ ZEPHIR_CONCAT_SV(&_8$$19, "Unknown statement ", &type);
+ ZEPHIR_CALL_METHOD(NULL, &_7$$19, "__construct", NULL, 33, &_8$$19);
zephir_check_call_status();
- zephir_throw_exception_debug(&_7$$20, "phalcon/Mvc/Model/Query.zep", 405);
+ zephir_throw_exception_debug(&_7$$19, "phalcon/Mvc/Model/Query.zep", 399);
ZEPHIR_MM_RESTORE();
return;
} while(0);
if (Z_TYPE_P(&cacheOptions) != IS_NULL) {
if (!ZEPHIR_IS_LONG(&type, 309)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only PHQL statements that return resultsets can be cached", "phalcon/Mvc/Model/Query.zep", 418);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only PHQL statements that return resultsets can be cached", "phalcon/Mvc/Model/Query.zep", 412);
return;
}
ZEPHIR_CALL_METHOD(NULL, &cache, "set", NULL, 0, &key, &result, &lifetime);
@@ -648,7 +644,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSql)
zephir_check_call_status();
RETURN_MM();
}
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "This type of statement generates multiple SQL statements", "phalcon/Mvc/Model/Query.zep", 524);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "This type of statement generates multiple SQL statements", "phalcon/Mvc/Model/Query.zep", 518);
return;
}
@@ -730,7 +726,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, parse)
zephir_read_static_property_ce(&_1$$5, phalcon_mvc_model_query_ce, SL("internalPhqlCache"), PH_NOISY_CC | PH_READONLY);
if (zephir_array_isset_fetch(&irPhql, &_1$$5, &uniqueId, 0)) {
if (Z_TYPE_P(&irPhql) == IS_ARRAY) {
- zephir_array_fetch_string(&_2$$7, &ast, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 589);
+ zephir_array_fetch_string(&_2$$7, &ast, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 583);
zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_2$$7);
RETURN_CCTOR(&irPhql);
}
@@ -767,7 +763,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, parse)
ZEPHIR_CONCAT_SVSV(&_4$$13, "Unknown statement ", &type, ", when preparing: ", &phql);
ZEPHIR_CALL_METHOD(NULL, &_3$$13, "__construct", NULL, 33, &_4$$13);
zephir_check_call_status();
- zephir_throw_exception_debug(&_3$$13, "phalcon/Mvc/Model/Query.zep", 623);
+ zephir_throw_exception_debug(&_3$$13, "phalcon/Mvc/Model/Query.zep", 617);
ZEPHIR_MM_RESTORE();
return;
} while(0);
@@ -775,7 +771,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, parse)
}
}
if (UNEXPECTED(Z_TYPE_P(&irPhql) != IS_ARRAY)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted AST", "phalcon/Mvc/Model/Query.zep", 629);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted AST", "phalcon/Mvc/Model/Query.zep", 623);
return;
}
if (Z_TYPE_P(&uniqueId) == IS_LONG) {
@@ -892,7 +888,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, setDI)
ZEPHIR_CALL_METHOD(&manager, container, "getshared", NULL, 0, &_0);
zephir_check_call_status();
if (UNEXPECTED(Z_TYPE_P(&manager) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Injected service 'modelsManager' is invalid", "phalcon/Mvc/Model/Query.zep", 693);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Injected service 'modelsManager' is invalid", "phalcon/Mvc/Model/Query.zep", 687);
return;
}
ZEPHIR_INIT_NVAR(&_0);
@@ -900,7 +896,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, setDI)
ZEPHIR_CALL_METHOD(&metaData, container, "getshared", NULL, 0, &_0);
zephir_check_call_status();
if (UNEXPECTED(Z_TYPE_P(&metaData) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Injected service 'modelsMetaData' is invalid", "phalcon/Mvc/Model/Query.zep", 699);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Injected service 'modelsMetaData' is invalid", "phalcon/Mvc/Model/Query.zep", 693);
return;
}
zephir_update_property_zval(this_ptr, ZEND_STRL("manager"), &manager);
@@ -1063,13 +1059,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeDelete)
zephir_get_arrval(&bindParams, bindParams_param);
zephir_get_arrval(&bindTypes, bindTypes_param);
zephir_memory_observe(&models);
- zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 767);
+ zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 761);
if (UNEXPECTED(zephir_array_isset_long(&models, 1))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Delete from several models at the same time is still not supported", "phalcon/Mvc/Model/Query.zep", 772);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Delete from several models at the same time is still not supported", "phalcon/Mvc/Model/Query.zep", 766);
return;
}
zephir_memory_observe(&modelName);
- zephir_array_fetch_long(&modelName, &models, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 775);
+ zephir_array_fetch_long(&modelName, &models, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 769);
zephir_memory_observe(&model);
zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC | PH_READONLY);
if (!(zephir_array_isset_fetch(&model, &_0, &modelName, 0))) {
@@ -1128,7 +1124,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeDelete)
ZEPHIR_CPY_WRT(&exception, &_9$$6);
ZEPHIR_CALL_METHOD(NULL, &connection, "rollback", &_10, 0);
zephir_check_call_status();
- zephir_throw_exception_debug(&exception, "phalcon/Mvc/Model/Query.zep", 834);
+ zephir_throw_exception_debug(&exception, "phalcon/Mvc/Model/Query.zep", 828);
ZEPHIR_MM_RESTORE();
return;
}
@@ -1215,7 +1211,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
zephir_get_arrval(&bindParams, bindParams_param);
zephir_get_arrval(&bindTypes, bindTypes_param);
zephir_memory_observe(&modelName);
- zephir_array_fetch_string(&modelName, &intermediate, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 862);
+ zephir_array_fetch_string(&modelName, &intermediate, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 856);
zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&manager, &_0);
zephir_memory_observe(&model);
@@ -1244,16 +1240,16 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
}
}
zephir_memory_observe(&values);
- zephir_array_fetch_string(&values, &intermediate, SL("values"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 897);
+ zephir_array_fetch_string(&values, &intermediate, SL("values"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 891);
if (UNEXPECTED(zephir_fast_count_int(&fields) != zephir_fast_count_int(&values))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The column count does not match the values count", "phalcon/Mvc/Model/Query.zep", 906);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The column count does not match the values count", "phalcon/Mvc/Model/Query.zep", 900);
return;
}
ZEPHIR_CALL_METHOD(&dialect, &connection, "getdialect", NULL, 0);
zephir_check_call_status();
ZEPHIR_INIT_VAR(&insertValues);
array_init(&insertValues);
- zephir_is_iterable(&values, 0, "phalcon/Mvc/Model/Query.zep", 977);
+ zephir_is_iterable(&values, 0, "phalcon/Mvc/Model/Query.zep", 971);
if (Z_TYPE_P(&values) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&values), _4, _5, _2)
{
@@ -1266,8 +1262,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
ZEPHIR_INIT_NVAR(&value);
ZVAL_COPY(&value, _2);
ZEPHIR_OBS_NVAR(&exprValue);
- zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 916);
- zephir_array_fetch_string(&_6$$8, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 918);
+ zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 910);
+ zephir_array_fetch_string(&_6$$8, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 912);
do {
if (ZEPHIR_IS_LONG(&_6$$8, 260) || ZEPHIR_IS_LONG(&_6$$8, 258) || ZEPHIR_IS_LONG(&_6$$8, 259)) {
ZEPHIR_CALL_METHOD(&insertValue, &dialect, "getsqlexpression", &_7, 0, &exprValue);
@@ -1296,7 +1292,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
ZEPHIR_CONCAT_SVS(&_13$$12, "Bound parameter '", &wildcard, "' cannot be replaced because it isn't in the placeholders list");
ZEPHIR_CALL_METHOD(NULL, &_12$$12, "__construct", &_14, 33, &_13$$12);
zephir_check_call_status();
- zephir_throw_exception_debug(&_12$$12, "phalcon/Mvc/Model/Query.zep", 942);
+ zephir_throw_exception_debug(&_12$$12, "phalcon/Mvc/Model/Query.zep", 936);
ZEPHIR_MM_RESTORE();
return;
}
@@ -1312,7 +1308,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
} while(0);
ZEPHIR_OBS_NVAR(&fieldName);
- zephir_array_fetch(&fieldName, &fields, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 955);
+ zephir_array_fetch(&fieldName, &fields, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 949);
_18$$8 = automaticFields;
if (_18$$8) {
_18$$8 = Z_TYPE_P(&columnMap) == IS_ARRAY;
@@ -1326,7 +1322,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
ZEPHIR_CONCAT_SVS(&_20$$15, "Column '", &fieldName, "' isn't part of the column map");
ZEPHIR_CALL_METHOD(NULL, &_19$$15, "__construct", &_14, 33, &_20$$15);
zephir_check_call_status();
- zephir_throw_exception_debug(&_19$$15, "phalcon/Mvc/Model/Query.zep", 965);
+ zephir_throw_exception_debug(&_19$$15, "phalcon/Mvc/Model/Query.zep", 959);
ZEPHIR_MM_RESTORE();
return;
}
@@ -1349,8 +1345,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
ZEPHIR_CALL_METHOD(&value, &values, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&exprValue);
- zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 916);
- zephir_array_fetch_string(&_21$$17, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 918);
+ zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 910);
+ zephir_array_fetch_string(&_21$$17, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 912);
do {
if (ZEPHIR_IS_LONG(&_21$$17, 260) || ZEPHIR_IS_LONG(&_21$$17, 258) || ZEPHIR_IS_LONG(&_21$$17, 259)) {
ZEPHIR_CALL_METHOD(&insertValue, &dialect, "getsqlexpression", &_22, 0, &exprValue);
@@ -1379,7 +1375,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
ZEPHIR_CONCAT_SVS(&_28$$21, "Bound parameter '", &wildcard, "' cannot be replaced because it isn't in the placeholders list");
ZEPHIR_CALL_METHOD(NULL, &_27$$21, "__construct", &_14, 33, &_28$$21);
zephir_check_call_status();
- zephir_throw_exception_debug(&_27$$21, "phalcon/Mvc/Model/Query.zep", 942);
+ zephir_throw_exception_debug(&_27$$21, "phalcon/Mvc/Model/Query.zep", 936);
ZEPHIR_MM_RESTORE();
return;
}
@@ -1395,7 +1391,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
} while(0);
ZEPHIR_OBS_NVAR(&fieldName);
- zephir_array_fetch(&fieldName, &fields, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 955);
+ zephir_array_fetch(&fieldName, &fields, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 949);
_31$$17 = automaticFields;
if (_31$$17) {
_31$$17 = Z_TYPE_P(&columnMap) == IS_ARRAY;
@@ -1409,7 +1405,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert)
ZEPHIR_CONCAT_SVS(&_33$$24, "Column '", &fieldName, "' isn't part of the column map");
ZEPHIR_CALL_METHOD(NULL, &_32$$24, "__construct", &_14, 33, &_33$$24);
zephir_check_call_status();
- zephir_throw_exception_debug(&_32$$24, "phalcon/Mvc/Model/Query.zep", 965);
+ zephir_throw_exception_debug(&_32$$24, "phalcon/Mvc/Model/Query.zep", 959);
ZEPHIR_MM_RESTORE();
return;
}
@@ -1579,8 +1575,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_VAR(&connectionTypes);
array_init(&connectionTypes);
zephir_memory_observe(&models);
- zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1014);
- zephir_is_iterable(&models, 0, "phalcon/Mvc/Model/Query.zep", 1042);
+ zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1008);
+ zephir_is_iterable(&models, 0, "phalcon/Mvc/Model/Query.zep", 1036);
if (Z_TYPE_P(&models) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&models), _1)
{
@@ -1600,7 +1596,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_check_call_status();
zephir_array_update_zval(&connectionTypes, &_6$$5, &__$true, PH_COPY | PH_SEPARATE);
if (UNEXPECTED(zephir_fast_count_int(&connectionTypes) == 2)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Cannot use models of different database systems in the same query", "phalcon/Mvc/Model/Query.zep", 1037);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Cannot use models of different database systems in the same query", "phalcon/Mvc/Model/Query.zep", 1031);
return;
}
}
@@ -1630,7 +1626,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_check_call_status();
zephir_array_update_zval(&connectionTypes, &_9$$9, &__$true, PH_COPY | PH_SEPARATE);
if (UNEXPECTED(zephir_fast_count_int(&connectionTypes) == 2)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Cannot use models of different database systems in the same query", "phalcon/Mvc/Model/Query.zep", 1037);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Cannot use models of different database systems in the same query", "phalcon/Mvc/Model/Query.zep", 1031);
return;
}
}
@@ -1640,23 +1636,23 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
}
ZEPHIR_INIT_NVAR(&modelName);
zephir_memory_observe(&columns);
- zephir_array_fetch_string(&columns, &intermediate, SL("columns"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1042);
+ zephir_array_fetch_string(&columns, &intermediate, SL("columns"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1036);
haveObjects = 0;
haveScalars = 0;
isComplex = 0;
numberObjects = 0;
ZEPHIR_CPY_WRT(&columns1, &columns);
- zephir_is_iterable(&columns, 0, "phalcon/Mvc/Model/Query.zep", 1070);
+ zephir_is_iterable(&columns, 0, "phalcon/Mvc/Model/Query.zep", 1064);
if (Z_TYPE_P(&columns) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&columns), _10)
{
ZEPHIR_INIT_NVAR(&column);
ZVAL_COPY(&column, _10);
if (UNEXPECTED(Z_TYPE_P(&column) != IS_ARRAY)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid column definition", "phalcon/Mvc/Model/Query.zep", 1054);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid column definition", "phalcon/Mvc/Model/Query.zep", 1048);
return;
}
- zephir_array_fetch_string(&_12$$11, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1057);
+ zephir_array_fetch_string(&_12$$11, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1051);
if (ZEPHIR_IS_STRING(&_12$$11, "scalar")) {
if (!(zephir_array_isset_string(&column, SL("balias")))) {
isComplex = 1;
@@ -1679,10 +1675,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_CALL_METHOD(&column, &columns, "current", NULL, 0);
zephir_check_call_status();
if (UNEXPECTED(Z_TYPE_P(&column) != IS_ARRAY)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid column definition", "phalcon/Mvc/Model/Query.zep", 1054);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid column definition", "phalcon/Mvc/Model/Query.zep", 1048);
return;
}
- zephir_array_fetch_string(&_13$$16, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1057);
+ zephir_array_fetch_string(&_13$$16, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1051);
if (ZEPHIR_IS_STRING(&_13$$16, "scalar")) {
if (!(zephir_array_isset_string(&column, SL("balias")))) {
isComplex = 1;
@@ -1720,7 +1716,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
array_init(&simpleColumnMap);
zephir_read_property(&_0, this_ptr, ZEND_STRL("metaData"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&metaData, &_0);
- zephir_is_iterable(&columns, 0, "phalcon/Mvc/Model/Query.zep", 1176);
+ zephir_is_iterable(&columns, 0, "phalcon/Mvc/Model/Query.zep", 1170);
if (Z_TYPE_P(&columns) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&columns), _16, _17, _14)
{
@@ -1733,11 +1729,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&column);
ZVAL_COPY(&column, _14);
ZEPHIR_OBS_NVAR(&sqlColumn);
- zephir_array_fetch_string(&sqlColumn, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1093);
- zephir_array_fetch_string(&_18$$28, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1096);
+ zephir_array_fetch_string(&sqlColumn, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1087);
+ zephir_array_fetch_string(&_18$$28, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1090);
if (ZEPHIR_IS_STRING(&_18$$28, "object")) {
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &column, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1097);
+ zephir_array_fetch_string(&modelName, &column, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1091);
ZEPHIR_OBS_NVAR(&instance);
zephir_read_property(&_19$$29, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC | PH_READONLY);
if (!(zephir_array_isset_fetch(&instance, &_19$$29, &modelName, 0))) {
@@ -1755,7 +1751,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&columnMap);
ZVAL_NULL(&columnMap);
}
- zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1133);
+ zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1127);
if (Z_TYPE_P(&attributes) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _23$$31)
{
@@ -1768,7 +1764,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&_26$$34);
ZEPHIR_CONCAT_SVSV(&_26$$34, "_", &sqlColumn, "_", &attribute);
zephir_array_fast_append(&_25$$34, &_26$$34);
- zephir_array_append(&selectColumns, &_25$$34, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1126);
+ zephir_array_append(&selectColumns, &_25$$34, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1120);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &attributes, "rewind", NULL, 0);
@@ -1788,7 +1784,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&_28$$35);
ZEPHIR_CONCAT_SVSV(&_28$$35, "_", &sqlColumn, "_", &attribute);
zephir_array_fast_append(&_27$$35, &_28$$35);
- zephir_array_append(&selectColumns, &_27$$35, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1126);
+ zephir_array_append(&selectColumns, &_27$$35, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1120);
ZEPHIR_CALL_METHOD(NULL, &attributes, "next", NULL, 0);
zephir_check_call_status();
}
@@ -1806,7 +1802,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_array_update_multi(&columns1, &_31$$36, SL("zs"), 3, &aliasCopy, SL("keepSnapshots"));
}
} else {
- zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1150);
+ zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1144);
if (Z_TYPE_P(&attributes) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _32$$37)
{
@@ -1816,7 +1812,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_34$$38, 2, 0);
zephir_array_fast_append(&_34$$38, &attribute);
zephir_array_fast_append(&_34$$38, &sqlColumn);
- zephir_array_append(&selectColumns, &_34$$38, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1148);
+ zephir_array_append(&selectColumns, &_34$$38, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1142);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &attributes, "rewind", NULL, 0);
@@ -1833,7 +1829,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_35$$39, 2, 0);
zephir_array_fast_append(&_35$$39, &attribute);
zephir_array_fast_append(&_35$$39, &sqlColumn);
- zephir_array_append(&selectColumns, &_35$$39, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1148);
+ zephir_array_append(&selectColumns, &_35$$39, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1142);
ZEPHIR_CALL_METHOD(NULL, &attributes, "next", NULL, 0);
zephir_check_call_status();
}
@@ -1856,7 +1852,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_array_fast_append(&_37$$42, &aliasCopy);
ZEPHIR_CPY_WRT(&columnAlias, &_37$$42);
}
- zephir_array_append(&selectColumns, &columnAlias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1161);
+ zephir_array_append(&selectColumns, &columnAlias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1155);
}
_38$$28 = !isComplex;
if (_38$$28) {
@@ -1885,11 +1881,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_CALL_METHOD(&column, &columns, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&sqlColumn);
- zephir_array_fetch_string(&sqlColumn, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1093);
- zephir_array_fetch_string(&_39$$46, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1096);
+ zephir_array_fetch_string(&sqlColumn, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1087);
+ zephir_array_fetch_string(&_39$$46, &column, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1090);
if (ZEPHIR_IS_STRING(&_39$$46, "object")) {
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &column, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1097);
+ zephir_array_fetch_string(&modelName, &column, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1091);
ZEPHIR_OBS_NVAR(&instance);
zephir_read_property(&_40$$47, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC | PH_READONLY);
if (!(zephir_array_isset_fetch(&instance, &_40$$47, &modelName, 0))) {
@@ -1907,7 +1903,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&columnMap);
ZVAL_NULL(&columnMap);
}
- zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1133);
+ zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1127);
if (Z_TYPE_P(&attributes) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _44$$49)
{
@@ -1920,7 +1916,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&_47$$52);
ZEPHIR_CONCAT_SVSV(&_47$$52, "_", &sqlColumn, "_", &attribute);
zephir_array_fast_append(&_46$$52, &_47$$52);
- zephir_array_append(&selectColumns, &_46$$52, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1126);
+ zephir_array_append(&selectColumns, &_46$$52, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1120);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &attributes, "rewind", NULL, 0);
@@ -1940,7 +1936,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&_49$$53);
ZEPHIR_CONCAT_SVSV(&_49$$53, "_", &sqlColumn, "_", &attribute);
zephir_array_fast_append(&_48$$53, &_49$$53);
- zephir_array_append(&selectColumns, &_48$$53, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1126);
+ zephir_array_append(&selectColumns, &_48$$53, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1120);
ZEPHIR_CALL_METHOD(NULL, &attributes, "next", NULL, 0);
zephir_check_call_status();
}
@@ -1958,7 +1954,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_array_update_multi(&columns1, &_52$$54, SL("zs"), 3, &aliasCopy, SL("keepSnapshots"));
}
} else {
- zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1150);
+ zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model/Query.zep", 1144);
if (Z_TYPE_P(&attributes) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _53$$55)
{
@@ -1968,7 +1964,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_55$$56, 2, 0);
zephir_array_fast_append(&_55$$56, &attribute);
zephir_array_fast_append(&_55$$56, &sqlColumn);
- zephir_array_append(&selectColumns, &_55$$56, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1148);
+ zephir_array_append(&selectColumns, &_55$$56, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1142);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &attributes, "rewind", NULL, 0);
@@ -1985,7 +1981,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_56$$57, 2, 0);
zephir_array_fast_append(&_56$$57, &attribute);
zephir_array_fast_append(&_56$$57, &sqlColumn);
- zephir_array_append(&selectColumns, &_56$$57, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1148);
+ zephir_array_append(&selectColumns, &_56$$57, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1142);
ZEPHIR_CALL_METHOD(NULL, &attributes, "next", NULL, 0);
zephir_check_call_status();
}
@@ -2007,7 +2003,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_array_fast_append(&_58$$60, &aliasCopy);
ZEPHIR_CPY_WRT(&columnAlias, &_58$$60);
}
- zephir_array_append(&selectColumns, &columnAlias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1161);
+ zephir_array_append(&selectColumns, &columnAlias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1155);
}
_59$$46 = !isComplex;
if (_59$$46) {
@@ -2032,7 +2028,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_VAR(&bindCounts);
array_init(&bindCounts);
zephir_array_update_string(&intermediate, SL("columns"), &selectColumns, PH_COPY | PH_SEPARATE);
- zephir_is_iterable(&bindParams, 0, "phalcon/Mvc/Model/Query.zep", 1197);
+ zephir_is_iterable(&bindParams, 0, "phalcon/Mvc/Model/Query.zep", 1191);
if (Z_TYPE_P(&bindParams) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&bindParams), _62, _63, _60)
{
@@ -2090,7 +2086,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&wildcard);
ZEPHIR_INIT_VAR(&processedTypes);
array_init(&processedTypes);
- zephir_is_iterable(&bindTypes, 0, "phalcon/Mvc/Model/Query.zep", 1210);
+ zephir_is_iterable(&bindTypes, 0, "phalcon/Mvc/Model/Query.zep", 1204);
if (Z_TYPE_P(&bindTypes) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&bindTypes), _68, _69, _66)
{
@@ -2195,7 +2191,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
array_init(&simpleColumnMap);
ZEPHIR_CALL_METHOD(&_74$$90, &metaData, "getattributes", NULL, 0, &resultObject);
zephir_check_call_status();
- zephir_is_iterable(&_74$$90, 0, "phalcon/Mvc/Model/Query.zep", 1298);
+ zephir_is_iterable(&_74$$90, 0, "phalcon/Mvc/Model/Query.zep", 1292);
if (Z_TYPE_P(&_74$$90) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_74$$90), _75$$90)
{
@@ -2205,7 +2201,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_77$$91, 2, 0);
zephir_array_fast_append(&_77$$91, &attribute);
ZEPHIR_OBS_NVAR(&_78$$91);
- zephir_array_fetch(&_78$$91, &typesColumnMap, &attribute, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1296);
+ zephir_array_fetch(&_78$$91, &typesColumnMap, &attribute, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1290);
zephir_array_fast_append(&_77$$91, &_78$$91);
zephir_array_update_zval(&simpleColumnMap, &attribute, &_77$$91, PH_COPY | PH_SEPARATE);
} ZEND_HASH_FOREACH_END();
@@ -2224,7 +2220,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_79$$92, 2, 0);
zephir_array_fast_append(&_79$$92, &attribute);
ZEPHIR_OBS_NVAR(&_80$$92);
- zephir_array_fetch(&_80$$92, &typesColumnMap, &attribute, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1296);
+ zephir_array_fetch(&_80$$92, &typesColumnMap, &attribute, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1290);
zephir_array_fast_append(&_79$$92, &_80$$92);
zephir_array_update_zval(&simpleColumnMap, &attribute, &_79$$92, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, &_74$$90, "next", NULL, 0);
@@ -2234,7 +2230,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_INIT_NVAR(&attribute);
} else {
array_init(&simpleColumnMap);
- zephir_is_iterable(&columnMap, 0, "phalcon/Mvc/Model/Query.zep", 1307);
+ zephir_is_iterable(&columnMap, 0, "phalcon/Mvc/Model/Query.zep", 1301);
if (Z_TYPE_P(&columnMap) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&columnMap), _83$$93, _84$$93, _81$$93)
{
@@ -2250,7 +2246,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_85$$94, 2, 0);
zephir_array_fast_append(&_85$$94, &attribute);
ZEPHIR_OBS_NVAR(&_86$$94);
- zephir_array_fetch(&_86$$94, &typesColumnMap, &column, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1305);
+ zephir_array_fetch(&_86$$94, &typesColumnMap, &column, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1299);
zephir_array_fast_append(&_85$$94, &_86$$94);
zephir_array_update_zval(&simpleColumnMap, &column, &_85$$94, PH_COPY | PH_SEPARATE);
} ZEND_HASH_FOREACH_END();
@@ -2271,7 +2267,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
zephir_create_array(&_87$$95, 2, 0);
zephir_array_fast_append(&_87$$95, &attribute);
ZEPHIR_OBS_NVAR(&_88$$95);
- zephir_array_fetch(&_88$$95, &typesColumnMap, &column, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1305);
+ zephir_array_fetch(&_88$$95, &typesColumnMap, &column, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1299);
zephir_array_fast_append(&_87$$95, &_88$$95);
zephir_array_update_zval(&simpleColumnMap, &column, &_87$$95, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, &columnMap, "next", NULL, 0);
@@ -2301,7 +2297,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_CONCAT_SVS(&_92$$98, "Resultset class \"", &resultsetClassName, "\" not found");
ZEPHIR_CALL_METHOD(NULL, &_91$$98, "__construct", NULL, 33, &_92$$98);
zephir_check_call_status();
- zephir_throw_exception_debug(&_91$$98, "phalcon/Mvc/Model/Query.zep", 1323);
+ zephir_throw_exception_debug(&_91$$98, "phalcon/Mvc/Model/Query.zep", 1317);
ZEPHIR_MM_RESTORE();
return;
}
@@ -2316,7 +2312,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect)
ZEPHIR_CONCAT_SVS(&_96$$99, "Resultset class \"", &resultsetClassName, "\" must be an implementation of Phalcon\\Mvc\\Model\\ResultsetInterface");
ZEPHIR_CALL_METHOD(NULL, &_95$$99, "__construct", NULL, 33, &_96$$99);
zephir_check_call_status();
- zephir_throw_exception_debug(&_95$$99, "phalcon/Mvc/Model/Query.zep", 1329);
+ zephir_throw_exception_debug(&_95$$99, "phalcon/Mvc/Model/Query.zep", 1323);
ZEPHIR_MM_RESTORE();
return;
}
@@ -2423,13 +2419,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
zephir_get_arrval(&bindParams, bindParams_param);
zephir_get_arrval(&bindTypes, bindTypes_param);
zephir_memory_observe(&models);
- zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1378);
+ zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1372);
if (UNEXPECTED(zephir_array_isset_long(&models, 1))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Updating several models at the same time is still not supported", "phalcon/Mvc/Model/Query.zep", 1383);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Updating several models at the same time is still not supported", "phalcon/Mvc/Model/Query.zep", 1377);
return;
}
zephir_memory_observe(&modelName);
- zephir_array_fetch_long(&modelName, &models, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1386);
+ zephir_array_fetch_long(&modelName, &models, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1380);
zephir_memory_observe(&model);
zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC | PH_READONLY);
if (!(zephir_array_isset_fetch(&model, &_0, &modelName, 0))) {
@@ -2442,14 +2438,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
ZEPHIR_CALL_METHOD(&dialect, &connection, "getdialect", NULL, 0);
zephir_check_call_status();
zephir_memory_observe(&fields);
- zephir_array_fetch_string(&fields, &intermediate, SL("fields"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1405);
+ zephir_array_fetch_string(&fields, &intermediate, SL("fields"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1399);
zephir_memory_observe(&values);
- zephir_array_fetch_string(&values, &intermediate, SL("values"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1406);
+ zephir_array_fetch_string(&values, &intermediate, SL("values"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1400);
ZEPHIR_INIT_VAR(&updateValues);
array_init(&updateValues);
ZEPHIR_CPY_WRT(&selectBindParams, &bindParams);
ZEPHIR_CPY_WRT(&selectBindTypes, &bindTypes);
- zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 1478);
+ zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 1472);
if (Z_TYPE_P(&fields) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _4, _5, _2)
{
@@ -2462,17 +2458,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
ZEPHIR_INIT_NVAR(&field);
ZVAL_COPY(&field, _2);
ZEPHIR_OBS_NVAR(&value);
- zephir_array_fetch(&value, &values, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1421);
+ zephir_array_fetch(&value, &values, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1415);
ZEPHIR_OBS_NVAR(&exprValue);
- zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1422);
+ zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1416);
if (zephir_array_isset_string(&field, SL("balias"))) {
ZEPHIR_OBS_NVAR(&fieldName);
- zephir_array_fetch_string(&fieldName, &field, SL("balias"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1425);
+ zephir_array_fetch_string(&fieldName, &field, SL("balias"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1419);
} else {
ZEPHIR_OBS_NVAR(&fieldName);
- zephir_array_fetch_string(&fieldName, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1427);
+ zephir_array_fetch_string(&fieldName, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1421);
}
- zephir_array_fetch_string(&_6$$5, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1430);
+ zephir_array_fetch_string(&_6$$5, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1424);
do {
if (ZEPHIR_IS_LONG(&_6$$5, 260) || ZEPHIR_IS_LONG(&_6$$5, 258) || ZEPHIR_IS_LONG(&_6$$5, 259)) {
ZEPHIR_CALL_METHOD(&updateValue, &dialect, "getsqlexpression", &_7, 0, &exprValue);
@@ -2501,7 +2497,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
ZEPHIR_CONCAT_SVS(&_13$$11, "Bound parameter '", &wildcard, "' cannot be replaced because it's not in the placeholders list");
ZEPHIR_CALL_METHOD(NULL, &_12$$11, "__construct", &_14, 33, &_13$$11);
zephir_check_call_status();
- zephir_throw_exception_debug(&_12$$11, "phalcon/Mvc/Model/Query.zep", 1453);
+ zephir_throw_exception_debug(&_12$$11, "phalcon/Mvc/Model/Query.zep", 1447);
ZEPHIR_MM_RESTORE();
return;
}
@@ -2510,7 +2506,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
break;
}
if (ZEPHIR_IS_LONG(&_6$$5, 277)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not supported", "phalcon/Mvc/Model/Query.zep", 1462);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not supported", "phalcon/Mvc/Model/Query.zep", 1456);
return;
}
ZEPHIR_INIT_NVAR(&updateValue);
@@ -2538,17 +2534,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
ZEPHIR_CALL_METHOD(&field, &fields, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&value);
- zephir_array_fetch(&value, &values, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1421);
+ zephir_array_fetch(&value, &values, &number, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1415);
ZEPHIR_OBS_NVAR(&exprValue);
- zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1422);
+ zephir_array_fetch_string(&exprValue, &value, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1416);
if (zephir_array_isset_string(&field, SL("balias"))) {
ZEPHIR_OBS_NVAR(&fieldName);
- zephir_array_fetch_string(&fieldName, &field, SL("balias"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1425);
+ zephir_array_fetch_string(&fieldName, &field, SL("balias"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1419);
} else {
ZEPHIR_OBS_NVAR(&fieldName);
- zephir_array_fetch_string(&fieldName, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1427);
+ zephir_array_fetch_string(&fieldName, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1421);
}
- zephir_array_fetch_string(&_18$$14, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1430);
+ zephir_array_fetch_string(&_18$$14, &value, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1424);
do {
if (ZEPHIR_IS_LONG(&_18$$14, 260) || ZEPHIR_IS_LONG(&_18$$14, 258) || ZEPHIR_IS_LONG(&_18$$14, 259)) {
ZEPHIR_CALL_METHOD(&updateValue, &dialect, "getsqlexpression", &_19, 0, &exprValue);
@@ -2577,7 +2573,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
ZEPHIR_CONCAT_SVS(&_25$$20, "Bound parameter '", &wildcard, "' cannot be replaced because it's not in the placeholders list");
ZEPHIR_CALL_METHOD(NULL, &_24$$20, "__construct", &_14, 33, &_25$$20);
zephir_check_call_status();
- zephir_throw_exception_debug(&_24$$20, "phalcon/Mvc/Model/Query.zep", 1453);
+ zephir_throw_exception_debug(&_24$$20, "phalcon/Mvc/Model/Query.zep", 1447);
ZEPHIR_MM_RESTORE();
return;
}
@@ -2586,7 +2582,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
break;
}
if (ZEPHIR_IS_LONG(&_18$$14, 277)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not supported", "phalcon/Mvc/Model/Query.zep", 1462);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not supported", "phalcon/Mvc/Model/Query.zep", 1456);
return;
}
ZEPHIR_INIT_NVAR(&updateValue);
@@ -2658,7 +2654,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate)
ZEPHIR_CPY_WRT(&exception, &_35$$24);
ZEPHIR_CALL_METHOD(NULL, &connection, "rollback", &_36, 0);
zephir_check_call_status();
- zephir_throw_exception_debug(&exception, "phalcon/Mvc/Model/Query.zep", 1528);
+ zephir_throw_exception_debug(&exception, "phalcon/Mvc/Model/Query.zep", 1522);
ZEPHIR_MM_RESTORE();
return;
}
@@ -2693,7 +2689,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCallArgument)
zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__);
zephir_fetch_params(1, 1, 0, &argument_param);
ZEPHIR_OBS_COPY_OR_DUP(&argument, argument_param);
- zephir_array_fetch_string(&_0, &argument, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1545);
+ zephir_array_fetch_string(&_0, &argument, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1539);
if (ZEPHIR_IS_LONG(&_0, 352)) {
zephir_create_array(return_value, 1, 0);
add_assoc_stringl_ex(return_value, SL("type"), SL("all"));
@@ -2746,8 +2742,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression)
ZEPHIR_OBS_COPY_OR_DUP(&expr, expr_param);
ZEPHIR_INIT_VAR(&whenClauses);
array_init(&whenClauses);
- zephir_array_fetch_string(&_0, &expr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1563);
- zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model/Query.zep", 1578);
+ zephir_array_fetch_string(&_0, &expr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1557);
+ zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model/Query.zep", 1572);
if (Z_TYPE_P(&_0) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_0), _1)
{
@@ -2757,24 +2753,24 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression)
ZEPHIR_INIT_NVAR(&_3$$4);
zephir_create_array(&_3$$4, 3, 0);
add_assoc_stringl_ex(&_3$$4, SL("type"), SL("when"));
- zephir_array_fetch_string(&_5$$4, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1567);
+ zephir_array_fetch_string(&_5$$4, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1561);
ZEPHIR_CALL_METHOD(&_4$$4, this_ptr, "getexpression", &_6, 462, &_5$$4);
zephir_check_call_status();
zephir_array_update_string(&_3$$4, SL("expr"), &_4$$4, PH_COPY | PH_SEPARATE);
- zephir_array_fetch_string(&_7$$4, &whenExpr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1568);
+ zephir_array_fetch_string(&_7$$4, &whenExpr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1562);
ZEPHIR_CALL_METHOD(&_4$$4, this_ptr, "getexpression", &_6, 462, &_7$$4);
zephir_check_call_status();
zephir_array_update_string(&_3$$4, SL("then"), &_4$$4, PH_COPY | PH_SEPARATE);
- zephir_array_append(&whenClauses, &_3$$4, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1569);
+ zephir_array_append(&whenClauses, &_3$$4, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1563);
} else {
ZEPHIR_INIT_NVAR(&_8$$5);
zephir_create_array(&_8$$5, 2, 0);
add_assoc_stringl_ex(&_8$$5, SL("type"), SL("else"));
- zephir_array_fetch_string(&_10$$5, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1573);
+ zephir_array_fetch_string(&_10$$5, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1567);
ZEPHIR_CALL_METHOD(&_9$$5, this_ptr, "getexpression", &_6, 462, &_10$$5);
zephir_check_call_status();
zephir_array_update_string(&_8$$5, SL("expr"), &_9$$5, PH_COPY | PH_SEPARATE);
- zephir_array_append(&whenClauses, &_8$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1574);
+ zephir_array_append(&whenClauses, &_8$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1568);
}
} ZEND_HASH_FOREACH_END();
} else {
@@ -2792,24 +2788,24 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression)
ZEPHIR_INIT_NVAR(&_11$$7);
zephir_create_array(&_11$$7, 3, 0);
add_assoc_stringl_ex(&_11$$7, SL("type"), SL("when"));
- zephir_array_fetch_string(&_13$$7, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1567);
+ zephir_array_fetch_string(&_13$$7, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1561);
ZEPHIR_CALL_METHOD(&_12$$7, this_ptr, "getexpression", &_6, 462, &_13$$7);
zephir_check_call_status();
zephir_array_update_string(&_11$$7, SL("expr"), &_12$$7, PH_COPY | PH_SEPARATE);
- zephir_array_fetch_string(&_14$$7, &whenExpr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1568);
+ zephir_array_fetch_string(&_14$$7, &whenExpr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1562);
ZEPHIR_CALL_METHOD(&_12$$7, this_ptr, "getexpression", &_6, 462, &_14$$7);
zephir_check_call_status();
zephir_array_update_string(&_11$$7, SL("then"), &_12$$7, PH_COPY | PH_SEPARATE);
- zephir_array_append(&whenClauses, &_11$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1569);
+ zephir_array_append(&whenClauses, &_11$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1563);
} else {
ZEPHIR_INIT_NVAR(&_15$$8);
zephir_create_array(&_15$$8, 2, 0);
add_assoc_stringl_ex(&_15$$8, SL("type"), SL("else"));
- zephir_array_fetch_string(&_17$$8, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1573);
+ zephir_array_fetch_string(&_17$$8, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1567);
ZEPHIR_CALL_METHOD(&_16$$8, this_ptr, "getexpression", &_6, 462, &_17$$8);
zephir_check_call_status();
zephir_array_update_string(&_15$$8, SL("expr"), &_16$$8, PH_COPY | PH_SEPARATE);
- zephir_array_append(&whenClauses, &_15$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1574);
+ zephir_array_append(&whenClauses, &_15$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1568);
}
ZEPHIR_CALL_METHOD(NULL, &_0, "next", NULL, 0);
zephir_check_call_status();
@@ -2818,7 +2814,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression)
ZEPHIR_INIT_NVAR(&whenExpr);
zephir_create_array(return_value, 3, 0);
add_assoc_stringl_ex(return_value, SL("type"), SL("case"));
- zephir_array_fetch_string(&_19, &expr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1580);
+ zephir_array_fetch_string(&_19, &expr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1574);
ZEPHIR_CALL_METHOD(&_18, this_ptr, "getexpression", &_6, 462, &_19);
zephir_check_call_status();
zephir_array_update_string(return_value, SL("expr"), &_18, PH_COPY | PH_SEPARATE);
@@ -3162,7 +3158,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
zephir_create_array(&_18$$25, 2, 0);
add_assoc_stringl_ex(&_18$$25, SL("type"), SL("literal"));
zephir_memory_observe(&_19$$25);
- zephir_array_fetch_string(&_19$$25, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1796);
+ zephir_array_fetch_string(&_19$$25, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1790);
zephir_array_update_string(&_18$$25, SL("value"), &_19$$25, PH_COPY | PH_SEPARATE);
ZEPHIR_CPY_WRT(&exprReturn, &_18$$25);
break;
@@ -3185,9 +3181,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
}
if (ZEPHIR_IS_LONG(&exprType, 260)) {
zephir_memory_observe(&value);
- zephir_array_fetch_string(&value, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1817);
+ zephir_array_fetch_string(&value, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1811);
if (quoting) {
- if (zephir_memnstr_str(&value, SL("'"), "phalcon/Mvc/Model/Query.zep", 1824)) {
+ if (zephir_memnstr_str(&value, SL("'"), "phalcon/Mvc/Model/Query.zep", 1818)) {
ZEPHIR_INIT_VAR(&escapedValue);
phalcon_orm_singlequotes(&escapedValue, &value);
} else {
@@ -3210,7 +3206,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
zephir_create_array(&_23$$33, 2, 0);
add_assoc_stringl_ex(&_23$$33, SL("type"), SL("placeholder"));
ZEPHIR_INIT_VAR(&_24$$33);
- zephir_array_fetch_string(&_25$$33, &expr, SL("value"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1845);
+ zephir_array_fetch_string(&_25$$33, &expr, SL("value"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1839);
ZEPHIR_INIT_VAR(&_26$$33);
ZVAL_STRING(&_26$$33, "?");
ZEPHIR_INIT_VAR(&_27$$33);
@@ -3224,7 +3220,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZEPHIR_INIT_VAR(&_28$$34);
zephir_create_array(&_28$$34, 2, 0);
add_assoc_stringl_ex(&_28$$34, SL("type"), SL("placeholder"));
- zephir_array_fetch_string(&_29$$34, &expr, SL("value"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1854);
+ zephir_array_fetch_string(&_29$$34, &expr, SL("value"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1848);
ZEPHIR_INIT_VAR(&_30$$34);
ZEPHIR_CONCAT_SV(&_30$$34, ":", &_29$$34);
zephir_array_update_string(&_28$$34, SL("value"), &_30$$34, PH_COPY | PH_SEPARATE);
@@ -3233,14 +3229,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
}
if (ZEPHIR_IS_LONG(&exprType, 277)) {
ZEPHIR_OBS_NVAR(&value);
- zephir_array_fetch_string(&value, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1859);
- if (zephir_memnstr_str(&value, SL(":"), "phalcon/Mvc/Model/Query.zep", 1861)) {
+ zephir_array_fetch_string(&value, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1853);
+ if (zephir_memnstr_str(&value, SL(":"), "phalcon/Mvc/Model/Query.zep", 1855)) {
ZEPHIR_INIT_VAR(&valueParts);
zephir_fast_explode_str(&valueParts, SL(":"), &value, LONG_MAX);
zephir_memory_observe(&name);
- zephir_array_fetch_long(&name, &valueParts, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1863);
+ zephir_array_fetch_long(&name, &valueParts, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1857);
zephir_memory_observe(&bindType);
- zephir_array_fetch_long(&bindType, &valueParts, 1, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1864);
+ zephir_array_fetch_long(&bindType, &valueParts, 1, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1858);
do {
if (ZEPHIR_IS_STRING(&bindType, "str")) {
ZEPHIR_INIT_VAR(&_31$$37);
@@ -3330,7 +3326,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZEPHIR_CONCAT_SV(&_51$$44, "Bind value is required for array type placeholder: ", &name);
ZEPHIR_CALL_METHOD(NULL, &_50$$44, "__construct", NULL, 33, &_51$$44);
zephir_check_call_status();
- zephir_throw_exception_debug(&_50$$44, "phalcon/Mvc/Model/Query.zep", 1934);
+ zephir_throw_exception_debug(&_50$$44, "phalcon/Mvc/Model/Query.zep", 1928);
ZEPHIR_MM_RESTORE();
return;
}
@@ -3341,7 +3337,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZEPHIR_CONCAT_SV(&_53$$45, "Bind type requires an array in placeholder: ", &name);
ZEPHIR_CALL_METHOD(NULL, &_52$$45, "__construct", NULL, 33, &_53$$45);
zephir_check_call_status();
- zephir_throw_exception_debug(&_52$$45, "phalcon/Mvc/Model/Query.zep", 1940);
+ zephir_throw_exception_debug(&_52$$45, "phalcon/Mvc/Model/Query.zep", 1934);
ZEPHIR_MM_RESTORE();
return;
}
@@ -3352,7 +3348,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZEPHIR_CONCAT_SV(&_55$$46, "At least one value must be bound in placeholder: ", &name);
ZEPHIR_CALL_METHOD(NULL, &_54$$46, "__construct", NULL, 33, &_55$$46);
zephir_check_call_status();
- zephir_throw_exception_debug(&_54$$46, "phalcon/Mvc/Model/Query.zep", 1946);
+ zephir_throw_exception_debug(&_54$$46, "phalcon/Mvc/Model/Query.zep", 1940);
ZEPHIR_MM_RESTORE();
return;
}
@@ -3373,7 +3369,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZEPHIR_CONCAT_SV(&_59$$47, "Unknown bind type: ", &bindType);
ZEPHIR_CALL_METHOD(NULL, &_58$$47, "__construct", NULL, 33, &_59$$47);
zephir_check_call_status();
- zephir_throw_exception_debug(&_58$$47, "phalcon/Mvc/Model/Query.zep", 1961);
+ zephir_throw_exception_debug(&_58$$47, "phalcon/Mvc/Model/Query.zep", 1955);
ZEPHIR_MM_RESTORE();
return;
} while(0);
@@ -3555,7 +3551,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
zephir_create_array(&_79$$66, 2, 0);
add_assoc_stringl_ex(&_79$$66, SL("type"), SL("literal"));
zephir_memory_observe(&_80$$66);
- zephir_array_fetch_string(&_80$$66, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2137);
+ zephir_array_fetch_string(&_80$$66, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2131);
zephir_array_update_string(&_79$$66, SL("value"), &_80$$66, PH_COPY | PH_SEPARATE);
ZEPHIR_CPY_WRT(&exprReturn, &_79$$66);
break;
@@ -3587,7 +3583,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZEPHIR_CONCAT_SV(&_85$$70, "Unknown expression type ", &exprType);
ZEPHIR_CALL_METHOD(NULL, &_84$$70, "__construct", NULL, 33, &_85$$70);
zephir_check_call_status();
- zephir_throw_exception_debug(&_84$$70, "phalcon/Mvc/Model/Query.zep", 2160);
+ zephir_throw_exception_debug(&_84$$70, "phalcon/Mvc/Model/Query.zep", 2154);
ZEPHIR_MM_RESTORE();
return;
} while(0);
@@ -3602,7 +3598,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
if (zephir_array_isset_long(&expr, 0)) {
ZEPHIR_INIT_VAR(&listItems);
array_init(&listItems);
- zephir_is_iterable(&expr, 0, "phalcon/Mvc/Model/Query.zep", 2183);
+ zephir_is_iterable(&expr, 0, "phalcon/Mvc/Model/Query.zep", 2177);
if (Z_TYPE_P(&expr) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&expr), _86$$72)
{
@@ -3610,7 +3606,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
ZVAL_COPY(&exprListItem, _86$$72);
ZEPHIR_CALL_METHOD(&_88$$73, this_ptr, "getexpression", NULL, 462, &exprListItem);
zephir_check_call_status();
- zephir_array_append(&listItems, &_88$$73, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2180);
+ zephir_array_append(&listItems, &_88$$73, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2174);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &expr, "rewind", NULL, 0);
@@ -3625,7 +3621,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_89$$74, this_ptr, "getexpression", NULL, 462, &exprListItem);
zephir_check_call_status();
- zephir_array_append(&listItems, &_89$$74, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2180);
+ zephir_array_append(&listItems, &_89$$74, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2174);
ZEPHIR_CALL_METHOD(NULL, &expr, "next", NULL, 0);
zephir_check_call_status();
}
@@ -3636,7 +3632,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression)
zephir_array_fast_append(return_value, &listItems);
RETURN_MM();
}
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Unknown expression", "phalcon/Mvc/Model/Query.zep", 2189);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Unknown expression", "phalcon/Mvc/Model/Query.zep", 2183);
return;
}
@@ -3682,7 +3678,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall)
if (zephir_array_isset_long(&arguments, 0)) {
ZEPHIR_INIT_VAR(&functionArgs);
array_init(&functionArgs);
- zephir_is_iterable(&arguments, 0, "phalcon/Mvc/Model/Query.zep", 2215);
+ zephir_is_iterable(&arguments, 0, "phalcon/Mvc/Model/Query.zep", 2209);
if (Z_TYPE_P(&arguments) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&arguments), _0$$6)
{
@@ -3690,7 +3686,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall)
ZVAL_COPY(&argument, _0$$6);
ZEPHIR_CALL_METHOD(&_2$$7, this_ptr, "getcallargument", &_3, 466, &argument);
zephir_check_call_status();
- zephir_array_append(&functionArgs, &_2$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2213);
+ zephir_array_append(&functionArgs, &_2$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2207);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &arguments, "rewind", NULL, 0);
@@ -3705,7 +3701,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall)
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_4$$8, this_ptr, "getcallargument", &_3, 466, &argument);
zephir_check_call_status();
- zephir_array_append(&functionArgs, &_4$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2213);
+ zephir_array_append(&functionArgs, &_4$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2207);
ZEPHIR_CALL_METHOD(NULL, &arguments, "next", NULL, 0);
zephir_check_call_status();
}
@@ -3723,7 +3719,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall)
zephir_create_array(return_value, 4, 0);
add_assoc_stringl_ex(return_value, SL("type"), SL("functionCall"));
zephir_memory_observe(&_7$$10);
- zephir_array_fetch_string(&_7$$10, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2225);
+ zephir_array_fetch_string(&_7$$10, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2219);
zephir_array_update_string(return_value, SL("name"), &_7$$10, PH_COPY | PH_SEPARATE);
zephir_array_update_string(return_value, SL("arguments"), &functionArgs, PH_COPY | PH_SEPARATE);
ZEPHIR_INIT_VAR(&_8$$10);
@@ -3734,7 +3730,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall)
zephir_create_array(return_value, 3, 0);
add_assoc_stringl_ex(return_value, SL("type"), SL("functionCall"));
zephir_memory_observe(&_9$$11);
- zephir_array_fetch_string(&_9$$11, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2232);
+ zephir_array_fetch_string(&_9$$11, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2226);
zephir_array_update_string(return_value, SL("name"), &_9$$11, PH_COPY | PH_SEPARATE);
zephir_array_update_string(return_value, SL("arguments"), &functionArgs, PH_COPY | PH_SEPARATE);
RETURN_MM();
@@ -3743,7 +3739,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall)
zephir_create_array(return_value, 2, 0);
add_assoc_stringl_ex(return_value, SL("type"), SL("functionCall"));
zephir_memory_observe(&_10);
- zephir_array_fetch_string(&_10, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2241);
+ zephir_array_fetch_string(&_10, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2235);
zephir_array_update_string(return_value, SL("name"), &_10, PH_COPY | PH_SEPARATE);
RETURN_MM();
}
@@ -3778,7 +3774,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getGroupClause)
if (zephir_array_isset_long(&group, 0)) {
ZEPHIR_INIT_VAR(&groupParts);
array_init(&groupParts);
- zephir_is_iterable(&group, 0, "phalcon/Mvc/Model/Query.zep", 2261);
+ zephir_is_iterable(&group, 0, "phalcon/Mvc/Model/Query.zep", 2255);
if (Z_TYPE_P(&group) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&group), _0$$3)
{
@@ -3786,7 +3782,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getGroupClause)
ZVAL_COPY(&groupItem, _0$$3);
ZEPHIR_CALL_METHOD(&_2$$4, this_ptr, "getexpression", &_3, 462, &groupItem);
zephir_check_call_status();
- zephir_array_append(&groupParts, &_2$$4, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2259);
+ zephir_array_append(&groupParts, &_2$$4, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2253);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &group, "rewind", NULL, 0);
@@ -3801,7 +3797,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getGroupClause)
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_4$$5, this_ptr, "getexpression", &_3, 462, &groupItem);
zephir_check_call_status();
- zephir_array_append(&groupParts, &_4$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2259);
+ zephir_array_append(&groupParts, &_4$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2253);
ZEPHIR_CALL_METHOD(NULL, &group, "next", NULL, 0);
zephir_check_call_status();
}
@@ -3887,10 +3883,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoin)
zephir_get_arrval(&join, join_param);
zephir_memory_observe(&qualified);
if (zephir_array_isset_string_fetch(&qualified, &join, SL("qualified"), 0)) {
- zephir_array_fetch_string(&_0$$3, &qualified, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2297);
+ zephir_array_fetch_string(&_0$$3, &qualified, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2291);
if (ZEPHIR_IS_LONG(&_0$$3, 355)) {
zephir_memory_observe(&modelName);
- zephir_array_fetch_string(&modelName, &qualified, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2298);
+ zephir_array_fetch_string(&modelName, &qualified, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2292);
ZEPHIR_CALL_METHOD(&model, manager, "load", NULL, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&source, &model, "getsource", NULL, 0);
@@ -3905,7 +3901,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoin)
RETURN_MM();
}
}
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 2313);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 2307);
return;
}
@@ -3934,7 +3930,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoinType)
zephir_get_arrval(&join, join_param);
zephir_memory_observe(&type);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&type, &join, SL("type"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 2324);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 2318);
return;
}
do {
@@ -3962,7 +3958,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoinType)
ZEPHIR_CONCAT_SVSV(&_2, "Unknown join type ", &type, ", when preparing: ", &_1);
ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 33, &_2);
zephir_check_call_status();
- zephir_throw_exception_debug(&_0, "phalcon/Mvc/Model/Query.zep", 2346);
+ zephir_throw_exception_debug(&_0, "phalcon/Mvc/Model/Query.zep", 2340);
ZEPHIR_MM_RESTORE();
return;
}
@@ -4130,7 +4126,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&manager, &_0);
zephir_memory_observe(&tables);
- zephir_array_fetch_string(&tables, &select, SL("tables"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2382);
+ zephir_array_fetch_string(&tables, &select, SL("tables"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2376);
if (!(zephir_array_isset_long(&tables, 0))) {
ZEPHIR_INIT_VAR(&selectTables);
zephir_create_array(&selectTables, 1, 0);
@@ -4139,7 +4135,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CPY_WRT(&selectTables, &tables);
}
zephir_memory_observe(&joins);
- zephir_array_fetch_string(&joins, &select, SL("joins"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2390);
+ zephir_array_fetch_string(&joins, &select, SL("joins"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2384);
if (!(zephir_array_isset_long(&joins, 0))) {
ZEPHIR_INIT_VAR(&selectJoins);
zephir_create_array(&selectJoins, 1, 0);
@@ -4147,7 +4143,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
} else {
ZEPHIR_CPY_WRT(&selectJoins, &joins);
}
- zephir_is_iterable(&selectJoins, 0, "phalcon/Mvc/Model/Query.zep", 2541);
+ zephir_is_iterable(&selectJoins, 0, "phalcon/Mvc/Model/Query.zep", 2535);
if (Z_TYPE_P(&selectJoins) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&selectJoins), _1)
{
@@ -4156,13 +4152,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CALL_METHOD(&joinData, this_ptr, "getjoin", &_3, 467, &manager, &joinItem);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&source);
- zephir_array_fetch_string(&source, &joinData, SL("source"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2404);
+ zephir_array_fetch_string(&source, &joinData, SL("source"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2398);
ZEPHIR_OBS_NVAR(&schema);
- zephir_array_fetch_string(&schema, &joinData, SL("schema"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2405);
+ zephir_array_fetch_string(&schema, &joinData, SL("schema"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2399);
ZEPHIR_OBS_NVAR(&model);
- zephir_array_fetch_string(&model, &joinData, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2406);
+ zephir_array_fetch_string(&model, &joinData, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2400);
ZEPHIR_OBS_NVAR(&realModelName);
- zephir_array_fetch_string(&realModelName, &joinData, SL("modelName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2407);
+ zephir_array_fetch_string(&realModelName, &joinData, SL("modelName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2401);
ZEPHIR_INIT_NVAR(&completeSource);
zephir_create_array(&completeSource, 2, 0);
zephir_array_fast_append(&completeSource, &source);
@@ -4172,7 +4168,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_OBS_NVAR(&aliasExpr);
if (zephir_array_isset_string_fetch(&aliasExpr, &joinItem, SL("alias"), 0)) {
ZEPHIR_OBS_NVAR(&alias);
- zephir_array_fetch_string(&alias, &aliasExpr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2419);
+ zephir_array_fetch_string(&alias, &aliasExpr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2413);
if (UNEXPECTED(zephir_array_isset(&joinModels, &alias))) {
ZEPHIR_INIT_NVAR(&_5$$9);
object_init_ex(&_5$$9, phalcon_mvc_model_exception_ce);
@@ -4181,11 +4177,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSV(&_7$$9, "Cannot use '", &alias, "' as join alias because it was already used, when preparing: ", &_6$$9);
ZEPHIR_CALL_METHOD(NULL, &_5$$9, "__construct", &_8, 33, &_7$$9);
zephir_check_call_status();
- zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/Model/Query.zep", 2427);
+ zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/Model/Query.zep", 2421);
ZEPHIR_MM_RESTORE();
return;
}
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2433);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2427);
zephir_array_update_zval(&joinTypes, &alias, &joinType, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliases, &alias, &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&joinModels, &alias, &realModelName, PH_COPY | PH_SEPARATE);
@@ -4204,7 +4200,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSV(&_11$$11, "Cannot use '", &realModelName, "' as join alias because it was already used, when preparing: ", &_10$$11);
ZEPHIR_CALL_METHOD(NULL, &_9$$11, "__construct", &_8, 33, &_11$$11);
zephir_check_call_status();
- zephir_throw_exception_debug(&_9$$11, "phalcon/Mvc/Model/Query.zep", 2486);
+ zephir_throw_exception_debug(&_9$$11, "phalcon/Mvc/Model/Query.zep", 2480);
ZEPHIR_MM_RESTORE();
return;
}
@@ -4234,13 +4230,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CALL_METHOD(&joinData, this_ptr, "getjoin", &_3, 467, &manager, &joinItem);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&source);
- zephir_array_fetch_string(&source, &joinData, SL("source"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2404);
+ zephir_array_fetch_string(&source, &joinData, SL("source"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2398);
ZEPHIR_OBS_NVAR(&schema);
- zephir_array_fetch_string(&schema, &joinData, SL("schema"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2405);
+ zephir_array_fetch_string(&schema, &joinData, SL("schema"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2399);
ZEPHIR_OBS_NVAR(&model);
- zephir_array_fetch_string(&model, &joinData, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2406);
+ zephir_array_fetch_string(&model, &joinData, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2400);
ZEPHIR_OBS_NVAR(&realModelName);
- zephir_array_fetch_string(&realModelName, &joinData, SL("modelName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2407);
+ zephir_array_fetch_string(&realModelName, &joinData, SL("modelName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2401);
ZEPHIR_INIT_NVAR(&_12$$12);
zephir_create_array(&_12$$12, 2, 0);
zephir_array_fast_append(&_12$$12, &source);
@@ -4251,7 +4247,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_OBS_NVAR(&aliasExpr);
if (zephir_array_isset_string_fetch(&aliasExpr, &joinItem, SL("alias"), 0)) {
ZEPHIR_OBS_NVAR(&alias);
- zephir_array_fetch_string(&alias, &aliasExpr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2419);
+ zephir_array_fetch_string(&alias, &aliasExpr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2413);
if (UNEXPECTED(zephir_array_isset(&joinModels, &alias))) {
ZEPHIR_INIT_NVAR(&_13$$14);
object_init_ex(&_13$$14, phalcon_mvc_model_exception_ce);
@@ -4260,11 +4256,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSV(&_15$$14, "Cannot use '", &alias, "' as join alias because it was already used, when preparing: ", &_14$$14);
ZEPHIR_CALL_METHOD(NULL, &_13$$14, "__construct", &_8, 33, &_15$$14);
zephir_check_call_status();
- zephir_throw_exception_debug(&_13$$14, "phalcon/Mvc/Model/Query.zep", 2427);
+ zephir_throw_exception_debug(&_13$$14, "phalcon/Mvc/Model/Query.zep", 2421);
ZEPHIR_MM_RESTORE();
return;
}
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2433);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2427);
zephir_array_update_zval(&joinTypes, &alias, &joinType, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliases, &alias, &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&joinModels, &alias, &realModelName, PH_COPY | PH_SEPARATE);
@@ -4283,7 +4279,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSV(&_18$$16, "Cannot use '", &realModelName, "' as join alias because it was already used, when preparing: ", &_17$$16);
ZEPHIR_CALL_METHOD(NULL, &_16$$16, "__construct", &_8, 33, &_18$$16);
zephir_check_call_status();
- zephir_throw_exception_debug(&_16$$16, "phalcon/Mvc/Model/Query.zep", 2486);
+ zephir_throw_exception_debug(&_16$$16, "phalcon/Mvc/Model/Query.zep", 2480);
ZEPHIR_MM_RESTORE();
return;
}
@@ -4309,7 +4305,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_update_property_zval(this_ptr, ZEND_STRL("sqlModelsAliases"), &sqlModelsAliases);
zephir_update_property_zval(this_ptr, ZEND_STRL("sqlAliasesModelsInstances"), &sqlAliasesModelsInstances);
zephir_update_property_zval(this_ptr, ZEND_STRL("modelsInstances"), &modelsInstances);
- zephir_is_iterable(&joinPrepared, 0, "phalcon/Mvc/Model/Query.zep", 2561);
+ zephir_is_iterable(&joinPrepared, 0, "phalcon/Mvc/Model/Query.zep", 2555);
if (Z_TYPE_P(&joinPrepared) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&joinPrepared), _21, _22, _19)
{
@@ -4356,7 +4352,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_read_property(&_0, this_ptr, ZEND_STRL("enableImplicitJoins"), PH_NOISY_CC | PH_READONLY);
if (!(zephir_is_true(&_0))) {
ZEPHIR_INIT_VAR(&_26$$21);
- zephir_is_iterable(&joinPrepared, 0, "phalcon/Mvc/Model/Query.zep", 2573);
+ zephir_is_iterable(&joinPrepared, 0, "phalcon/Mvc/Model/Query.zep", 2567);
if (Z_TYPE_P(&joinPrepared) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&joinPrepared), _29$$21, _30$$21, _27$$21)
{
@@ -4369,11 +4365,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&_26$$21);
ZVAL_COPY(&_26$$21, _27$$21);
ZEPHIR_OBS_NVAR(&joinType);
- zephir_array_fetch(&joinType, &joinTypes, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2563);
+ zephir_array_fetch(&joinType, &joinTypes, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2557);
ZEPHIR_OBS_NVAR(&joinSource);
- zephir_array_fetch(&joinSource, &joinSources, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2564);
+ zephir_array_fetch(&joinSource, &joinSources, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2558);
ZEPHIR_OBS_NVAR(&preCondition);
- zephir_array_fetch(&preCondition, &joinPreCondition, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2565);
+ zephir_array_fetch(&preCondition, &joinPreCondition, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2559);
ZEPHIR_INIT_NVAR(&_31$$22);
zephir_create_array(&_31$$22, 3, 0);
zephir_array_update_string(&_31$$22, SL("type"), &joinType, PH_COPY | PH_SEPARATE);
@@ -4382,7 +4378,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_create_array(&_32$$22, 1, 0);
zephir_array_fast_append(&_32$$22, &preCondition);
zephir_array_update_string(&_31$$22, SL("conditions"), &_32$$22, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_31$$22, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2570);
+ zephir_array_append(&sqlJoins, &_31$$22, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2564);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &joinPrepared, "rewind", NULL, 0);
@@ -4398,11 +4394,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CALL_METHOD(&_26$$21, &joinPrepared, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&joinType);
- zephir_array_fetch(&joinType, &joinTypes, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2563);
+ zephir_array_fetch(&joinType, &joinTypes, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2557);
ZEPHIR_OBS_NVAR(&joinSource);
- zephir_array_fetch(&joinSource, &joinSources, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2564);
+ zephir_array_fetch(&joinSource, &joinSources, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2558);
ZEPHIR_OBS_NVAR(&preCondition);
- zephir_array_fetch(&preCondition, &joinPreCondition, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2565);
+ zephir_array_fetch(&preCondition, &joinPreCondition, &joinAliasName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2559);
ZEPHIR_INIT_NVAR(&_33$$23);
zephir_create_array(&_33$$23, 3, 0);
zephir_array_update_string(&_33$$23, SL("type"), &joinType, PH_COPY | PH_SEPARATE);
@@ -4411,7 +4407,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_create_array(&_34$$23, 1, 0);
zephir_array_fast_append(&_34$$23, &preCondition);
zephir_array_update_string(&_33$$23, SL("conditions"), &_34$$23, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_33$$23, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2570);
+ zephir_array_append(&sqlJoins, &_33$$23, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2564);
ZEPHIR_CALL_METHOD(NULL, &joinPrepared, "next", NULL, 0);
zephir_check_call_status();
}
@@ -4422,15 +4418,15 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_INIT_NVAR(&fromModels);
array_init(&fromModels);
- zephir_is_iterable(&selectTables, 0, "phalcon/Mvc/Model/Query.zep", 2588);
+ zephir_is_iterable(&selectTables, 0, "phalcon/Mvc/Model/Query.zep", 2582);
if (Z_TYPE_P(&selectTables) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&selectTables), _35)
{
ZEPHIR_INIT_NVAR(&tableItem);
ZVAL_COPY(&tableItem, _35);
- zephir_array_fetch_string(&_37$$24, &tableItem, SL("qualifiedName"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2582);
+ zephir_array_fetch_string(&_37$$24, &tableItem, SL("qualifiedName"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2576);
ZEPHIR_OBS_NVAR(&_38$$24);
- zephir_array_fetch_string(&_38$$24, &_37$$24, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2582);
+ zephir_array_fetch_string(&_38$$24, &_37$$24, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2576);
zephir_array_update_zval(&fromModels, &_38$$24, &__$true, PH_COPY | PH_SEPARATE);
} ZEND_HASH_FOREACH_END();
} else {
@@ -4444,9 +4440,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_CALL_METHOD(&tableItem, &selectTables, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_fetch_string(&_39$$25, &tableItem, SL("qualifiedName"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2582);
+ zephir_array_fetch_string(&_39$$25, &tableItem, SL("qualifiedName"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2576);
ZEPHIR_OBS_NVAR(&_40$$25);
- zephir_array_fetch_string(&_40$$25, &_39$$25, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2582);
+ zephir_array_fetch_string(&_40$$25, &_39$$25, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2576);
zephir_array_update_zval(&fromModels, &_40$$25, &__$true, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, &selectTables, "next", NULL, 0);
zephir_check_call_status();
@@ -4454,7 +4450,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_INIT_NVAR(&tableItem);
ZEPHIR_INIT_VAR(&_41);
- zephir_is_iterable(&fromModels, 0, "phalcon/Mvc/Model/Query.zep", 2708);
+ zephir_is_iterable(&fromModels, 0, "phalcon/Mvc/Model/Query.zep", 2702);
if (Z_TYPE_P(&fromModels) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fromModels), _44, _45, _42)
{
@@ -4466,7 +4462,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_INIT_NVAR(&_41);
ZVAL_COPY(&_41, _42);
- zephir_is_iterable(&joinModels, 0, "phalcon/Mvc/Model/Query.zep", 2706);
+ zephir_is_iterable(&joinModels, 0, "phalcon/Mvc/Model/Query.zep", 2700);
if (Z_TYPE_P(&joinModels) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&joinModels), _48$$26, _49$$26, _46$$26)
{
@@ -4479,13 +4475,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&joinModel);
ZVAL_COPY(&joinModel, _46$$26);
ZEPHIR_OBS_NVAR(&joinSource);
- zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2593);
+ zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2587);
ZEPHIR_OBS_NVAR(&joinType);
- zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2598);
+ zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2592);
ZEPHIR_OBS_NVAR(&preCondition);
if (!(zephir_array_isset_fetch(&preCondition, &joinPreCondition, &joinAlias, 0))) {
ZEPHIR_OBS_NVAR(&modelNameAlias);
- zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2607);
+ zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2601);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_50, 0, &fromModelName, &modelNameAlias);
zephir_check_call_status();
if (ZEPHIR_IS_FALSE_IDENTICAL(&relation)) {
@@ -4500,17 +4496,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSVSV(&_54$$31, "There is more than one relation between models '", &fromModelName, "' and '", &joinModel, "', the join must be done using an alias, when preparing: ", &_53$$31);
ZEPHIR_CALL_METHOD(NULL, &_52$$31, "__construct", &_8, 33, &_54$$31);
zephir_check_call_status();
- zephir_throw_exception_debug(&_52$$31, "phalcon/Mvc/Model/Query.zep", 2633);
+ zephir_throw_exception_debug(&_52$$31, "phalcon/Mvc/Model/Query.zep", 2627);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_OBS_NVAR(&relation);
- zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2639);
+ zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2633);
}
}
if (Z_TYPE_P(&relation) == IS_OBJECT) {
ZEPHIR_OBS_NVAR(&modelAlias);
- zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2650);
+ zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2644);
ZEPHIR_CALL_METHOD(&_55$$32, &relation, "isthrough", NULL, 0);
zephir_check_call_status();
if (!(zephir_is_true(&_55$$32))) {
@@ -4521,13 +4517,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_check_call_status();
}
if (zephir_array_isset_long(&sqlJoin, 0)) {
- zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2680);
+ zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2674);
if (Z_TYPE_P(&sqlJoin) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&sqlJoin), _58$$35)
{
ZEPHIR_INIT_NVAR(&sqlJoinItem);
ZVAL_COPY(&sqlJoinItem, _58$$35);
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "rewind", NULL, 0);
@@ -4540,14 +4536,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_CALL_METHOD(&sqlJoinItem, &sqlJoin, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "next", NULL, 0);
zephir_check_call_status();
}
}
ZEPHIR_INIT_NVAR(&sqlJoinItem);
} else {
- zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2681);
+ zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2675);
}
} else {
ZEPHIR_INIT_NVAR(&_60$$39);
@@ -4557,7 +4553,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&_61$$39);
array_init(&_61$$39);
zephir_array_update_string(&_60$$39, SL("conditions"), &_61$$39, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_60$$39, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2692);
+ zephir_array_append(&sqlJoins, &_60$$39, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2686);
}
} else {
ZEPHIR_INIT_NVAR(&_62$$40);
@@ -4568,7 +4564,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_create_array(&_63$$40, 1, 0);
zephir_array_fast_append(&_63$$40, &preCondition);
zephir_array_update_string(&_62$$40, SL("conditions"), &_63$$40, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_62$$40, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2703);
+ zephir_array_append(&sqlJoins, &_62$$40, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2697);
}
} ZEND_HASH_FOREACH_END();
} else {
@@ -4585,13 +4581,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CALL_METHOD(&joinModel, &joinModels, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&joinSource);
- zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2593);
+ zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2587);
ZEPHIR_OBS_NVAR(&joinType);
- zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2598);
+ zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2592);
ZEPHIR_OBS_NVAR(&preCondition);
if (!(zephir_array_isset_fetch(&preCondition, &joinPreCondition, &joinAlias, 0))) {
ZEPHIR_OBS_NVAR(&modelNameAlias);
- zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2607);
+ zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2601);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_64, 0, &fromModelName, &modelNameAlias);
zephir_check_call_status();
if (ZEPHIR_IS_FALSE_IDENTICAL(&relation)) {
@@ -4606,17 +4602,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSVSV(&_68$$45, "There is more than one relation between models '", &fromModelName, "' and '", &joinModel, "', the join must be done using an alias, when preparing: ", &_67$$45);
ZEPHIR_CALL_METHOD(NULL, &_66$$45, "__construct", &_8, 33, &_68$$45);
zephir_check_call_status();
- zephir_throw_exception_debug(&_66$$45, "phalcon/Mvc/Model/Query.zep", 2633);
+ zephir_throw_exception_debug(&_66$$45, "phalcon/Mvc/Model/Query.zep", 2627);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_OBS_NVAR(&relation);
- zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2639);
+ zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2633);
}
}
if (Z_TYPE_P(&relation) == IS_OBJECT) {
ZEPHIR_OBS_NVAR(&modelAlias);
- zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2650);
+ zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2644);
ZEPHIR_CALL_METHOD(&_69$$46, &relation, "isthrough", NULL, 0);
zephir_check_call_status();
if (!(zephir_is_true(&_69$$46))) {
@@ -4627,13 +4623,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_check_call_status();
}
if (zephir_array_isset_long(&sqlJoin, 0)) {
- zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2680);
+ zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2674);
if (Z_TYPE_P(&sqlJoin) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&sqlJoin), _70$$49)
{
ZEPHIR_INIT_NVAR(&sqlJoinItem);
ZVAL_COPY(&sqlJoinItem, _70$$49);
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "rewind", NULL, 0);
@@ -4646,14 +4642,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_CALL_METHOD(&sqlJoinItem, &sqlJoin, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "next", NULL, 0);
zephir_check_call_status();
}
}
ZEPHIR_INIT_NVAR(&sqlJoinItem);
} else {
- zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2681);
+ zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2675);
}
} else {
ZEPHIR_INIT_NVAR(&_72$$53);
@@ -4663,7 +4659,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&_73$$53);
array_init(&_73$$53);
zephir_array_update_string(&_72$$53, SL("conditions"), &_73$$53, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_72$$53, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2692);
+ zephir_array_append(&sqlJoins, &_72$$53, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2686);
}
} else {
ZEPHIR_INIT_NVAR(&_74$$54);
@@ -4674,7 +4670,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_create_array(&_75$$54, 1, 0);
zephir_array_fast_append(&_75$$54, &preCondition);
zephir_array_update_string(&_74$$54, SL("conditions"), &_75$$54, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_74$$54, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2703);
+ zephir_array_append(&sqlJoins, &_74$$54, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2697);
}
ZEPHIR_CALL_METHOD(NULL, &joinModels, "next", NULL, 0);
zephir_check_call_status();
@@ -4696,7 +4692,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_41, &fromModels, "current", NULL, 0);
zephir_check_call_status();
- zephir_is_iterable(&joinModels, 0, "phalcon/Mvc/Model/Query.zep", 2706);
+ zephir_is_iterable(&joinModels, 0, "phalcon/Mvc/Model/Query.zep", 2700);
if (Z_TYPE_P(&joinModels) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&joinModels), _78$$55, _79$$55, _76$$55)
{
@@ -4709,13 +4705,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&joinModel);
ZVAL_COPY(&joinModel, _76$$55);
ZEPHIR_OBS_NVAR(&joinSource);
- zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2593);
+ zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2587);
ZEPHIR_OBS_NVAR(&joinType);
- zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2598);
+ zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2592);
ZEPHIR_OBS_NVAR(&preCondition);
if (!(zephir_array_isset_fetch(&preCondition, &joinPreCondition, &joinAlias, 0))) {
ZEPHIR_OBS_NVAR(&modelNameAlias);
- zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2607);
+ zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2601);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_80, 0, &fromModelName, &modelNameAlias);
zephir_check_call_status();
if (ZEPHIR_IS_FALSE_IDENTICAL(&relation)) {
@@ -4730,17 +4726,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSVSV(&_84$$60, "There is more than one relation between models '", &fromModelName, "' and '", &joinModel, "', the join must be done using an alias, when preparing: ", &_83$$60);
ZEPHIR_CALL_METHOD(NULL, &_82$$60, "__construct", &_8, 33, &_84$$60);
zephir_check_call_status();
- zephir_throw_exception_debug(&_82$$60, "phalcon/Mvc/Model/Query.zep", 2633);
+ zephir_throw_exception_debug(&_82$$60, "phalcon/Mvc/Model/Query.zep", 2627);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_OBS_NVAR(&relation);
- zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2639);
+ zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2633);
}
}
if (Z_TYPE_P(&relation) == IS_OBJECT) {
ZEPHIR_OBS_NVAR(&modelAlias);
- zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2650);
+ zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2644);
ZEPHIR_CALL_METHOD(&_85$$61, &relation, "isthrough", NULL, 0);
zephir_check_call_status();
if (!(zephir_is_true(&_85$$61))) {
@@ -4751,13 +4747,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_check_call_status();
}
if (zephir_array_isset_long(&sqlJoin, 0)) {
- zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2680);
+ zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2674);
if (Z_TYPE_P(&sqlJoin) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&sqlJoin), _86$$64)
{
ZEPHIR_INIT_NVAR(&sqlJoinItem);
ZVAL_COPY(&sqlJoinItem, _86$$64);
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "rewind", NULL, 0);
@@ -4770,14 +4766,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_CALL_METHOD(&sqlJoinItem, &sqlJoin, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "next", NULL, 0);
zephir_check_call_status();
}
}
ZEPHIR_INIT_NVAR(&sqlJoinItem);
} else {
- zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2681);
+ zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2675);
}
} else {
ZEPHIR_INIT_NVAR(&_88$$68);
@@ -4787,7 +4783,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&_89$$68);
array_init(&_89$$68);
zephir_array_update_string(&_88$$68, SL("conditions"), &_89$$68, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_88$$68, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2692);
+ zephir_array_append(&sqlJoins, &_88$$68, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2686);
}
} else {
ZEPHIR_INIT_NVAR(&_90$$69);
@@ -4798,7 +4794,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_create_array(&_91$$69, 1, 0);
zephir_array_fast_append(&_91$$69, &preCondition);
zephir_array_update_string(&_90$$69, SL("conditions"), &_91$$69, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_90$$69, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2703);
+ zephir_array_append(&sqlJoins, &_90$$69, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2697);
}
} ZEND_HASH_FOREACH_END();
} else {
@@ -4815,13 +4811,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CALL_METHOD(&joinModel, &joinModels, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&joinSource);
- zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2593);
+ zephir_array_fetch(&joinSource, &joinSources, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2587);
ZEPHIR_OBS_NVAR(&joinType);
- zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2598);
+ zephir_array_fetch(&joinType, &joinTypes, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2592);
ZEPHIR_OBS_NVAR(&preCondition);
if (!(zephir_array_isset_fetch(&preCondition, &joinPreCondition, &joinAlias, 0))) {
ZEPHIR_OBS_NVAR(&modelNameAlias);
- zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2607);
+ zephir_array_fetch(&modelNameAlias, &sqlAliasesModels, &joinAlias, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2601);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_92, 0, &fromModelName, &modelNameAlias);
zephir_check_call_status();
if (ZEPHIR_IS_FALSE_IDENTICAL(&relation)) {
@@ -4836,17 +4832,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_CONCAT_SVSVSV(&_96$$74, "There is more than one relation between models '", &fromModelName, "' and '", &joinModel, "', the join must be done using an alias, when preparing: ", &_95$$74);
ZEPHIR_CALL_METHOD(NULL, &_94$$74, "__construct", &_8, 33, &_96$$74);
zephir_check_call_status();
- zephir_throw_exception_debug(&_94$$74, "phalcon/Mvc/Model/Query.zep", 2633);
+ zephir_throw_exception_debug(&_94$$74, "phalcon/Mvc/Model/Query.zep", 2627);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_OBS_NVAR(&relation);
- zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2639);
+ zephir_array_fetch_long(&relation, &relations, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2633);
}
}
if (Z_TYPE_P(&relation) == IS_OBJECT) {
ZEPHIR_OBS_NVAR(&modelAlias);
- zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2650);
+ zephir_array_fetch(&modelAlias, &sqlModelsAliases, &fromModelName, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2644);
ZEPHIR_CALL_METHOD(&_97$$75, &relation, "isthrough", NULL, 0);
zephir_check_call_status();
if (!(zephir_is_true(&_97$$75))) {
@@ -4857,13 +4853,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_check_call_status();
}
if (zephir_array_isset_long(&sqlJoin, 0)) {
- zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2680);
+ zephir_is_iterable(&sqlJoin, 0, "phalcon/Mvc/Model/Query.zep", 2674);
if (Z_TYPE_P(&sqlJoin) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&sqlJoin), _98$$78)
{
ZEPHIR_INIT_NVAR(&sqlJoinItem);
ZVAL_COPY(&sqlJoinItem, _98$$78);
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "rewind", NULL, 0);
@@ -4876,14 +4872,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
}
ZEPHIR_CALL_METHOD(&sqlJoinItem, &sqlJoin, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2678);
+ zephir_array_append(&sqlJoins, &sqlJoinItem, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2672);
ZEPHIR_CALL_METHOD(NULL, &sqlJoin, "next", NULL, 0);
zephir_check_call_status();
}
}
ZEPHIR_INIT_NVAR(&sqlJoinItem);
} else {
- zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2681);
+ zephir_array_append(&sqlJoins, &sqlJoin, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2675);
}
} else {
ZEPHIR_INIT_NVAR(&_100$$82);
@@ -4893,7 +4889,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
ZEPHIR_INIT_NVAR(&_101$$82);
array_init(&_101$$82);
zephir_array_update_string(&_100$$82, SL("conditions"), &_101$$82, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_100$$82, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2692);
+ zephir_array_append(&sqlJoins, &_100$$82, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2686);
}
} else {
ZEPHIR_INIT_NVAR(&_102$$83);
@@ -4904,7 +4900,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins)
zephir_create_array(&_103$$83, 1, 0);
zephir_array_fast_append(&_103$$83, &preCondition);
zephir_array_update_string(&_102$$83, SL("conditions"), &_103$$83, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoins, &_102$$83, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2703);
+ zephir_array_append(&sqlJoins, &_102$$83, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2697);
}
ZEPHIR_CALL_METHOD(NULL, &joinModels, "next", NULL, 0);
zephir_check_call_status();
@@ -5028,7 +5024,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin)
ZEPHIR_CALL_METHOD(&referencedModelName, relation, "getreferencedmodel", NULL, 0);
zephir_check_call_status();
if (Z_TYPE_P(&fields) == IS_ARRAY) {
- zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 2825);
+ zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 2819);
if (Z_TYPE_P(&fields) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _3$$3, _4$$3, _1$$3)
{
@@ -5048,12 +5044,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin)
ZEPHIR_CONCAT_SVSVSV(&_7$$5, "The number of fields must be equal to the number of referenced fields in join ", &modelAlias, "-", &joinAlias, ", when preparing: ", &_6$$5);
ZEPHIR_CALL_METHOD(NULL, &_5$$5, "__construct", &_8, 33, &_7$$5);
zephir_check_call_status();
- zephir_throw_exception_debug(&_5$$5, "phalcon/Mvc/Model/Query.zep", 2792);
+ zephir_throw_exception_debug(&_5$$5, "phalcon/Mvc/Model/Query.zep", 2786);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_OBS_NVAR(&intermediateField);
- zephir_array_fetch(&intermediateField, &intermediateFields, &position, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2798);
+ zephir_array_fetch(&intermediateField, &intermediateFields, &position, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2792);
ZEPHIR_INIT_NVAR(&sqlEqualsJoinCondition);
zephir_create_array(&sqlEqualsJoinCondition, 4, 0);
add_assoc_stringl_ex(&sqlEqualsJoinCondition, SL("type"), SL("binary-op"));
@@ -5096,12 +5092,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin)
ZEPHIR_CONCAT_SVSVSV(&_15$$7, "The number of fields must be equal to the number of referenced fields in join ", &modelAlias, "-", &joinAlias, ", when preparing: ", &_14$$7);
ZEPHIR_CALL_METHOD(NULL, &_13$$7, "__construct", &_8, 33, &_15$$7);
zephir_check_call_status();
- zephir_throw_exception_debug(&_13$$7, "phalcon/Mvc/Model/Query.zep", 2792);
+ zephir_throw_exception_debug(&_13$$7, "phalcon/Mvc/Model/Query.zep", 2786);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_OBS_NVAR(&intermediateField);
- zephir_array_fetch(&intermediateField, &intermediateFields, &position, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2798);
+ zephir_array_fetch(&intermediateField, &intermediateFields, &position, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2792);
ZEPHIR_INIT_NVAR(&_16$$6);
zephir_create_array(&_16$$6, 4, 0);
add_assoc_stringl_ex(&_16$$6, SL("type"), SL("binary-op"));
@@ -5247,13 +5243,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getOrderClause)
}
ZEPHIR_INIT_VAR(&orderParts);
array_init(&orderParts);
- zephir_is_iterable(&orderColumns, 0, "phalcon/Mvc/Model/Query.zep", 2934);
+ zephir_is_iterable(&orderColumns, 0, "phalcon/Mvc/Model/Query.zep", 2928);
if (Z_TYPE_P(&orderColumns) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&orderColumns), _0)
{
ZEPHIR_INIT_NVAR(&orderItem);
ZVAL_COPY(&orderItem, _0);
- zephir_array_fetch_string(&_2$$5, &orderItem, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2916);
+ zephir_array_fetch_string(&_2$$5, &orderItem, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2910);
ZEPHIR_CALL_METHOD(&orderPartExpr, this_ptr, "getexpression", &_3, 462, &_2$$5);
zephir_check_call_status();
if (zephir_array_isset_string_fetch(&orderSort, &orderItem, SL("sort"), 1)) {
@@ -5279,7 +5275,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getOrderClause)
zephir_array_fast_append(&_7$$9, &orderPartExpr);
ZEPHIR_CPY_WRT(&orderPartSort, &_7$$9);
}
- zephir_array_append(&orderParts, &orderPartSort, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2931);
+ zephir_array_append(&orderParts, &orderPartSort, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2925);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &orderColumns, "rewind", NULL, 0);
@@ -5292,7 +5288,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getOrderClause)
}
ZEPHIR_CALL_METHOD(&orderItem, &orderColumns, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_fetch_string(&_8$$10, &orderItem, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2916);
+ zephir_array_fetch_string(&_8$$10, &orderItem, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2910);
ZEPHIR_CALL_METHOD(&orderPartExpr, this_ptr, "getexpression", &_3, 462, &_8$$10);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&orderSort);
@@ -5320,7 +5316,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getOrderClause)
zephir_array_fast_append(&_13$$14, &orderPartExpr);
ZEPHIR_CPY_WRT(&orderPartSort, &_13$$14);
}
- zephir_array_append(&orderParts, &orderPartSort, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2931);
+ zephir_array_append(&orderParts, &orderPartSort, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2925);
ZEPHIR_CALL_METHOD(NULL, &orderColumns, "next", NULL, 0);
zephir_check_call_status();
}
@@ -5402,13 +5398,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
zephir_fetch_params(1, 1, 0, &expr_param);
ZEPHIR_OBS_COPY_OR_DUP(&expr, expr_param);
zephir_memory_observe(&columnName);
- zephir_array_fetch_string(&columnName, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2948);
+ zephir_array_fetch_string(&columnName, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2942);
zephir_read_property(&_0, this_ptr, ZEND_STRL("nestingLevel"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&nestingLevel, &_0);
zephir_read_property(&_0, this_ptr, ZEND_STRL("sqlColumnAliases"), PH_NOISY_CC | PH_READONLY);
if (zephir_array_isset(&_0, &nestingLevel)) {
zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("sqlColumnAliases"), PH_NOISY_CC | PH_READONLY);
- zephir_array_fetch(&_2$$3, &_1$$3, &nestingLevel, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2956);
+ zephir_array_fetch(&_2$$3, &_1$$3, &nestingLevel, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2950);
ZEPHIR_CPY_WRT(&sqlColumnAliases, &_2$$3);
} else {
ZEPHIR_INIT_NVAR(&sqlColumnAliases);
@@ -5418,7 +5414,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
if (_3) {
_4 = !(zephir_array_isset_string(&expr, SL("domain")));
if (!(_4)) {
- zephir_array_fetch_string(&_5, &expr, SL("domain"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2961);
+ zephir_array_fetch_string(&_5, &expr, SL("domain"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2955);
_4 = ZEPHIR_IS_EMPTY(&_5);
}
_3 = _4;
@@ -5444,7 +5440,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_10$$7, "Unknown model or alias '", &columnDomain, "' (11), when preparing: ", &_9$$7);
ZEPHIR_CALL_METHOD(NULL, &_8$$7, "__construct", NULL, 33, &_10$$7);
zephir_check_call_status();
- zephir_throw_exception_debug(&_8$$7, "phalcon/Mvc/Model/Query.zep", 2982);
+ zephir_throw_exception_debug(&_8$$7, "phalcon/Mvc/Model/Query.zep", 2976);
ZEPHIR_MM_RESTORE();
return;
}
@@ -5460,7 +5456,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_14$$9, "There is no model related to model or alias '", &columnDomain, "', when executing: ", &_13$$9);
ZEPHIR_CALL_METHOD(NULL, &_12$$9, "__construct", NULL, 33, &_14$$9);
zephir_check_call_status();
- zephir_throw_exception_debug(&_12$$9, "phalcon/Mvc/Model/Query.zep", 3001);
+ zephir_throw_exception_debug(&_12$$9, "phalcon/Mvc/Model/Query.zep", 2995);
ZEPHIR_MM_RESTORE();
return;
}
@@ -5480,7 +5476,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSVSV(&_17$$12, "Column '", &columnName, "' doesn't belong to the model or alias '", &columnDomain, "', when executing: ", &_16$$12);
ZEPHIR_CALL_METHOD(NULL, &_15$$12, "__construct", NULL, 33, &_17$$12);
zephir_check_call_status();
- zephir_throw_exception_debug(&_15$$12, "phalcon/Mvc/Model/Query.zep", 3013);
+ zephir_throw_exception_debug(&_15$$12, "phalcon/Mvc/Model/Query.zep", 3007);
ZEPHIR_MM_RESTORE();
return;
}
@@ -5492,7 +5488,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_INIT_VAR(&hasModel);
ZVAL_BOOL(&hasModel, 0);
zephir_read_property(&_18$$14, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC | PH_READONLY);
- zephir_is_iterable(&_18$$14, 0, "phalcon/Mvc/Model/Query.zep", 3047);
+ zephir_is_iterable(&_18$$14, 0, "phalcon/Mvc/Model/Query.zep", 3041);
if (Z_TYPE_P(&_18$$14) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_18$$14), _19$$14)
{
@@ -5510,7 +5506,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_25$$17, "The column '", &columnName, "' is ambiguous, when preparing: ", &_24$$17);
ZEPHIR_CALL_METHOD(NULL, &_23$$17, "__construct", NULL, 33, &_25$$17);
zephir_check_call_status();
- zephir_throw_exception_debug(&_23$$17, "phalcon/Mvc/Model/Query.zep", 3036);
+ zephir_throw_exception_debug(&_23$$17, "phalcon/Mvc/Model/Query.zep", 3030);
ZEPHIR_MM_RESTORE();
return;
}
@@ -5540,7 +5536,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_30$$20, "The column '", &columnName, "' is ambiguous, when preparing: ", &_29$$20);
ZEPHIR_CALL_METHOD(NULL, &_28$$20, "__construct", NULL, 33, &_30$$20);
zephir_check_call_status();
- zephir_throw_exception_debug(&_28$$20, "phalcon/Mvc/Model/Query.zep", 3036);
+ zephir_throw_exception_debug(&_28$$20, "phalcon/Mvc/Model/Query.zep", 3030);
ZEPHIR_MM_RESTORE();
return;
}
@@ -5559,14 +5555,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_33$$21, "Column '", &columnName, "' doesn't belong to any of the selected models (1), when preparing: ", &_32$$21);
ZEPHIR_CALL_METHOD(NULL, &_31$$21, "__construct", NULL, 33, &_33$$21);
zephir_check_call_status();
- zephir_throw_exception_debug(&_31$$21, "phalcon/Mvc/Model/Query.zep", 3050);
+ zephir_throw_exception_debug(&_31$$21, "phalcon/Mvc/Model/Query.zep", 3044);
ZEPHIR_MM_RESTORE();
return;
}
zephir_read_property(&_34$$14, this_ptr, ZEND_STRL("models"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&models, &_34$$14);
if (UNEXPECTED(Z_TYPE_P(&models) != IS_ARRAY)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The models list was not loaded correctly", "phalcon/Mvc/Model/Query.zep", 3061);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The models list was not loaded correctly", "phalcon/Mvc/Model/Query.zep", 3055);
return;
}
ZEPHIR_INIT_VAR(&className);
@@ -5580,7 +5576,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_37$$23, "Can't obtain model's source from models list: '", &className, "', when preparing: ", &_36$$23);
ZEPHIR_CALL_METHOD(NULL, &_35$$23, "__construct", NULL, 33, &_37$$23);
zephir_check_call_status();
- zephir_throw_exception_debug(&_35$$23, "phalcon/Mvc/Model/Query.zep", 3072);
+ zephir_throw_exception_debug(&_35$$23, "phalcon/Mvc/Model/Query.zep", 3066);
ZEPHIR_MM_RESTORE();
return;
}
@@ -5601,7 +5597,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified)
ZEPHIR_CONCAT_SVSV(&_40$$27, "Column '", &columnName, "' doesn't belong to any of the selected models (3), when preparing: ", &_39$$27);
ZEPHIR_CALL_METHOD(NULL, &_38$$27, "__construct", NULL, 33, &_40$$27);
zephir_check_call_status();
- zephir_throw_exception_debug(&_38$$27, "phalcon/Mvc/Model/Query.zep", 3091);
+ zephir_throw_exception_debug(&_38$$27, "phalcon/Mvc/Model/Query.zep", 3085);
ZEPHIR_MM_RESTORE();
return;
}
@@ -5682,7 +5678,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getReadConnection)
ZEPHIR_CALL_METHOD(&connection, model, "selectreadconnection", NULL, 0, &intermediate, &bindParams, &bindTypes);
zephir_check_call_status();
if (UNEXPECTED(Z_TYPE_P(&connection) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "selectReadConnection did not return a connection", "phalcon/Mvc/Model/Query.zep", 3135);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "selectReadConnection did not return a connection", "phalcon/Mvc/Model/Query.zep", 3129);
return;
}
RETURN_CCTOR(&connection);
@@ -5748,10 +5744,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getRelatedRecords)
zephir_array_fast_append(&_0, &_1);
zephir_array_update_string(&selectIr, SL("columns"), &_0, PH_COPY | PH_SEPARATE);
zephir_memory_observe(&_4);
- zephir_array_fetch_string(&_4, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3165);
+ zephir_array_fetch_string(&_4, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3159);
zephir_array_update_string(&selectIr, SL("models"), &_4, PH_COPY | PH_SEPARATE);
ZEPHIR_OBS_NVAR(&_4);
- zephir_array_fetch_string(&_4, &intermediate, SL("tables"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3167);
+ zephir_array_fetch_string(&_4, &intermediate, SL("tables"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3161);
zephir_array_update_string(&selectIr, SL("tables"), &_4, PH_COPY | PH_SEPARATE);
zephir_memory_observe(&whereConditions);
if (zephir_array_isset_string_fetch(&whereConditions, &intermediate, SL("where"), 0)) {
@@ -5834,7 +5830,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
ZEPHIR_OBS_COPY_OR_DUP(&column, column_param);
zephir_memory_observe(&columnType);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&columnType, &column, SL("type"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3207);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3201);
return;
}
ZEPHIR_INIT_VAR(&sqlColumns);
@@ -5843,7 +5839,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
zephir_array_isset_string_fetch(&eager, &column, SL("eager"), 0);
if (ZEPHIR_IS_LONG(&columnType, 352)) {
zephir_read_property(&_0$$4, this_ptr, ZEND_STRL("models"), PH_NOISY_CC | PH_READONLY);
- zephir_is_iterable(&_0$$4, 0, "phalcon/Mvc/Model/Query.zep", 3237);
+ zephir_is_iterable(&_0$$4, 0, "phalcon/Mvc/Model/Query.zep", 3231);
if (Z_TYPE_P(&_0$$4) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_0$$4), _3$$4, _4$$4, _1$$4)
{
@@ -5865,10 +5861,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
zephir_array_update_string(&sqlColumn, SL("balias"), &_5$$5, PH_COPY | PH_SEPARATE);
if (Z_TYPE_P(&eager) != IS_NULL) {
zephir_array_update_string(&sqlColumn, SL("eager"), &eager, PH_COPY | PH_SEPARATE);
- zephir_array_fetch_string(&_7$$6, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3231);
+ zephir_array_fetch_string(&_7$$6, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3225);
zephir_array_update_string(&sqlColumn, SL("eagerType"), &_7$$6, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3234);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3228);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &_0$$4, "rewind", NULL, 0);
@@ -5894,10 +5890,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
ZEPHIR_CPY_WRT(&sqlColumn, &_8$$7);
if (Z_TYPE_P(&eager) != IS_NULL) {
zephir_array_update_string(&sqlColumn, SL("eager"), &eager, PH_COPY | PH_SEPARATE);
- zephir_array_fetch_string(&_10$$8, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3231);
+ zephir_array_fetch_string(&_10$$8, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3225);
zephir_array_update_string(&sqlColumn, SL("eagerType"), &_10$$8, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3234);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3228);
ZEPHIR_CALL_METHOD(NULL, &_0$$4, "next", NULL, 0);
zephir_check_call_status();
}
@@ -5907,14 +5903,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
RETURN_CTOR(&sqlColumns);
}
if (UNEXPECTED(!(zephir_array_isset_string(&column, SL("column"))))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3241);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3235);
return;
}
if (ZEPHIR_IS_LONG(&columnType, 353)) {
zephir_read_property(&_11$$10, this_ptr, ZEND_STRL("sqlAliases"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&sqlAliases, &_11$$10);
zephir_memory_observe(&columnDomain);
- zephir_array_fetch_string(&columnDomain, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3253);
+ zephir_array_fetch_string(&columnDomain, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3247);
ZEPHIR_OBS_NVAR(&source);
if (UNEXPECTED(!(zephir_array_isset_fetch(&source, &sqlAliases, &columnDomain, 0)))) {
ZEPHIR_INIT_VAR(&_12$$11);
@@ -5924,7 +5920,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
ZEPHIR_CONCAT_SVSV(&_14$$11, "Unknown model or alias '", &columnDomain, "' (2), when preparing: ", &_13$$11);
ZEPHIR_CALL_METHOD(NULL, &_12$$11, "__construct", NULL, 33, &_14$$11);
zephir_check_call_status();
- zephir_throw_exception_debug(&_12$$11, "phalcon/Mvc/Model/Query.zep", 3258);
+ zephir_throw_exception_debug(&_12$$11, "phalcon/Mvc/Model/Query.zep", 3252);
ZEPHIR_MM_RESTORE();
return;
}
@@ -5934,7 +5930,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
zephir_read_property(&_11$$10, this_ptr, ZEND_STRL("sqlAliasesModels"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&sqlAliasesModels, &_11$$10);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch(&modelName, &sqlAliasesModels, &columnDomain, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3272);
+ zephir_array_fetch(&modelName, &sqlAliasesModels, &columnDomain, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3266);
if (Z_TYPE_P(&preparedAlias) != IS_STRING) {
if (ZEPHIR_IS_EQUAL(&columnDomain, &modelName)) {
ZEPHIR_CALL_FUNCTION(&preparedAlias, "lcfirst", &_6, 76, &modelName);
@@ -5952,10 +5948,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
ZEPHIR_CPY_WRT(&sqlColumn, &_15$$10);
if (Z_TYPE_P(&eager) != IS_NULL) {
zephir_array_update_string(&sqlColumn, SL("eager"), &eager, PH_COPY | PH_SEPARATE);
- zephir_array_fetch_string(&_16$$15, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3299);
+ zephir_array_fetch_string(&_16$$15, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3293);
zephir_array_update_string(&sqlColumn, SL("eagerType"), &_16$$15, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3302);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3296);
RETURN_CTOR(&sqlColumns);
}
if (ZEPHIR_IS_LONG(&columnType, 354)) {
@@ -5964,7 +5960,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
add_assoc_stringl_ex(&_17$$16, SL("type"), SL("scalar"));
ZEPHIR_CPY_WRT(&sqlColumn, &_17$$16);
zephir_memory_observe(&columnData);
- zephir_array_fetch_string(&columnData, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3316);
+ zephir_array_fetch_string(&columnData, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3310);
ZEPHIR_CALL_METHOD(&sqlExprColumn, this_ptr, "getexpression", NULL, 462, &columnData);
zephir_check_call_status();
zephir_memory_observe(&balias);
@@ -5974,11 +5970,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
}
if (Z_TYPE_P(&eager) != IS_NULL) {
zephir_array_update_string(&sqlColumn, SL("eager"), &eager, PH_COPY | PH_SEPARATE);
- zephir_array_fetch_string(&_18$$18, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3329);
+ zephir_array_fetch_string(&_18$$18, &column, SL("eagerType"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3323);
zephir_array_update_string(&sqlColumn, SL("eagerType"), &_18$$18, PH_COPY | PH_SEPARATE);
}
zephir_array_update_string(&sqlColumn, SL("column"), &sqlExprColumn, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3333);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3327);
RETURN_CTOR(&sqlColumns);
}
ZEPHIR_INIT_VAR(&_19);
@@ -5987,7 +5983,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn)
ZEPHIR_CONCAT_SV(&_20, "Unknown type of column ", &columnType);
ZEPHIR_CALL_METHOD(NULL, &_19, "__construct", NULL, 33, &_20);
zephir_check_call_status();
- zephir_throw_exception_debug(&_19, "phalcon/Mvc/Model/Query.zep", 3338);
+ zephir_throw_exception_debug(&_19, "phalcon/Mvc/Model/Query.zep", 3332);
ZEPHIR_MM_RESTORE();
return;
}
@@ -6096,7 +6092,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin)
} else {
ZEPHIR_INIT_VAR(&sqlJoinPartialConditions);
array_init(&sqlJoinPartialConditions);
- zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 3428);
+ zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 3422);
if (Z_TYPE_P(&fields) == IS_ARRAY) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _7$$4, _8$$4, _5$$4)
{
@@ -6117,7 +6113,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin)
ZEPHIR_CONCAT_SVSVSV(&_11$$6, "The number of fields must be equal to the number of referenced fields in join ", &modelAlias, "-", &joinAlias, ", when preparing: ", &_10$$6);
ZEPHIR_CALL_METHOD(NULL, &_9$$6, "__construct", &_12, 33, &_11$$6);
zephir_check_call_status();
- zephir_throw_exception_debug(&_9$$6, "phalcon/Mvc/Model/Query.zep", 3400);
+ zephir_throw_exception_debug(&_9$$6, "phalcon/Mvc/Model/Query.zep", 3394);
ZEPHIR_MM_RESTORE();
return;
}
@@ -6141,7 +6137,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin)
ZEPHIR_CALL_METHOD(&_14$$5, this_ptr, "getqualified", NULL, 463, &_16$$5);
zephir_check_call_status();
zephir_array_update_string(&_13$$5, SL("right"), &_14$$5, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoinPartialConditions, &_13$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3425);
+ zephir_array_append(&sqlJoinPartialConditions, &_13$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3419);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &fields, "rewind", NULL, 0);
@@ -6165,7 +6161,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin)
ZEPHIR_CONCAT_SVSVSV(&_19$$8, "The number of fields must be equal to the number of referenced fields in join ", &modelAlias, "-", &joinAlias, ", when preparing: ", &_18$$8);
ZEPHIR_CALL_METHOD(NULL, &_17$$8, "__construct", &_12, 33, &_19$$8);
zephir_check_call_status();
- zephir_throw_exception_debug(&_17$$8, "phalcon/Mvc/Model/Query.zep", 3400);
+ zephir_throw_exception_debug(&_17$$8, "phalcon/Mvc/Model/Query.zep", 3394);
ZEPHIR_MM_RESTORE();
return;
}
@@ -6189,7 +6185,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin)
ZEPHIR_CALL_METHOD(&_21$$7, this_ptr, "getqualified", NULL, 463, &_23$$7);
zephir_check_call_status();
zephir_array_update_string(&_20$$7, SL("right"), &_21$$7, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlJoinPartialConditions, &_20$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3425);
+ zephir_array_append(&sqlJoinPartialConditions, &_20$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3419);
ZEPHIR_CALL_METHOD(NULL, &fields, "next", NULL, 0);
zephir_check_call_status();
}
@@ -6232,7 +6228,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getTable)
zephir_get_arrval(&qualifiedName, qualifiedName_param);
zephir_memory_observe(&modelName);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&modelName, &qualifiedName, SL("name"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3450);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3444);
return;
}
ZEPHIR_CALL_METHOD(&model, manager, "load", NULL, 0, &modelName);
@@ -6315,7 +6311,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getWriteConnection)
ZEPHIR_CALL_METHOD(&connection, model, "selectwriteconnection", NULL, 0, &intermediate, &bindParams, &bindTypes);
zephir_check_call_status();
if (UNEXPECTED(Z_TYPE_P(&connection) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "selectWriteConnection did not return a connection", "phalcon/Mvc/Model/Query.zep", 3488);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "selectWriteConnection did not return a connection", "phalcon/Mvc/Model/Query.zep", 3482);
return;
}
RETURN_CCTOR(&connection);
@@ -6376,12 +6372,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete)
ZEPHIR_CPY_WRT(&ast, &_0);
zephir_memory_observe(&delete);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&delete, &ast, SL("delete"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted DELETE AST", "phalcon/Mvc/Model/Query.zep", 3510);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted DELETE AST", "phalcon/Mvc/Model/Query.zep", 3504);
return;
}
zephir_memory_observe(&tables);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&tables, &delete, SL("tables"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted DELETE AST", "phalcon/Mvc/Model/Query.zep", 3514);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted DELETE AST", "phalcon/Mvc/Model/Query.zep", 3508);
return;
}
ZEPHIR_INIT_VAR(&models);
@@ -6405,16 +6401,16 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete)
}
zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&manager, &_0);
- zephir_is_iterable(&deleteTables, 0, "phalcon/Mvc/Model/Query.zep", 3574);
+ zephir_is_iterable(&deleteTables, 0, "phalcon/Mvc/Model/Query.zep", 3568);
if (Z_TYPE_P(&deleteTables) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&deleteTables), _1)
{
ZEPHIR_INIT_NVAR(&table);
ZVAL_COPY(&table, _1);
ZEPHIR_OBS_NVAR(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3538);
+ zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3532);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3539);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3533);
ZEPHIR_CALL_METHOD(&model, &manager, "load", &_3, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&source, &model, "getsource", NULL, 0);
@@ -6438,17 +6434,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete)
ZEPHIR_OBS_NVAR(&alias);
if (zephir_array_isset_string_fetch(&alias, &table, SL("alias"), 0)) {
zephir_array_update_zval(&sqlAliases, &alias, &alias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3556);
- zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3557);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3550);
+ zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3551);
zephir_array_update_zval(&sqlAliasesModelsInstances, &alias, &model, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&models, &alias, &modelName, PH_COPY | PH_SEPARATE);
} else {
zephir_array_update_zval(&sqlAliases, &modelName, &source, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliasesModelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3563);
+ zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3557);
zephir_array_update_zval(&models, &modelName, &source, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3567);
+ zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3561);
zephir_array_update_zval(&modelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
} ZEND_HASH_FOREACH_END();
} else {
@@ -6463,9 +6459,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete)
ZEPHIR_CALL_METHOD(&table, &deleteTables, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3538);
+ zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3532);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3539);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3533);
ZEPHIR_CALL_METHOD(&model, &manager, "load", &_6, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&source, &model, "getsource", NULL, 0);
@@ -6488,17 +6484,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete)
ZEPHIR_OBS_NVAR(&alias);
if (zephir_array_isset_string_fetch(&alias, &table, SL("alias"), 0)) {
zephir_array_update_zval(&sqlAliases, &alias, &alias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3556);
- zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3557);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3550);
+ zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3551);
zephir_array_update_zval(&sqlAliasesModelsInstances, &alias, &model, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&models, &alias, &modelName, PH_COPY | PH_SEPARATE);
} else {
zephir_array_update_zval(&sqlAliases, &modelName, &source, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliasesModelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3563);
+ zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3557);
zephir_array_update_zval(&models, &modelName, &source, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3567);
+ zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3561);
zephir_array_update_zval(&modelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, &deleteTables, "next", NULL, 0);
zephir_check_call_status();
@@ -6585,23 +6581,23 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
zephir_read_property(&_0, this_ptr, ZEND_STRL("ast"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&ast, &_0);
if (UNEXPECTED(!(zephir_array_isset_string(&ast, SL("qualifiedName"))))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3608);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3602);
return;
}
if (UNEXPECTED(!(zephir_array_isset_string(&ast, SL("values"))))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3612);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3606);
return;
}
zephir_memory_observe(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &ast, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3615);
+ zephir_array_fetch_string(&qualifiedName, &ast, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3609);
if (UNEXPECTED(!(zephir_array_isset_string(&qualifiedName, SL("name"))))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3619);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3613);
return;
}
zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&manager, &_0);
zephir_memory_observe(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3623);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3617);
ZEPHIR_CALL_METHOD(&model, &manager, "load", NULL, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&source, &model, "getsource", NULL, 0);
@@ -6618,8 +6614,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
notQuoting = 0;
ZEPHIR_INIT_VAR(&exprValues);
array_init(&exprValues);
- zephir_array_fetch_string(&_2, &ast, SL("values"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3636);
- zephir_is_iterable(&_2, 0, "phalcon/Mvc/Model/Query.zep", 3644);
+ zephir_array_fetch_string(&_2, &ast, SL("values"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3630);
+ zephir_is_iterable(&_2, 0, "phalcon/Mvc/Model/Query.zep", 3638);
if (Z_TYPE_P(&_2) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_2), _3)
{
@@ -6628,7 +6624,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_INIT_NVAR(&_5$$7);
zephir_create_array(&_5$$7, 2, 0);
ZEPHIR_OBS_NVAR(&_6$$7);
- zephir_array_fetch_string(&_6$$7, &exprValue, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3639);
+ zephir_array_fetch_string(&_6$$7, &exprValue, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3633);
zephir_array_update_string(&_5$$7, SL("type"), &_6$$7, PH_COPY | PH_SEPARATE);
if (notQuoting) {
ZVAL_BOOL(&_8$$7, 1);
@@ -6638,7 +6634,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_CALL_METHOD(&_7$$7, this_ptr, "getexpression", &_9, 462, &exprValue, &_8$$7);
zephir_check_call_status();
zephir_array_update_string(&_5$$7, SL("value"), &_7$$7, PH_COPY | PH_SEPARATE);
- zephir_array_append(&exprValues, &_5$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3641);
+ zephir_array_append(&exprValues, &_5$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3635);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &_2, "rewind", NULL, 0);
@@ -6654,7 +6650,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_INIT_NVAR(&_10$$8);
zephir_create_array(&_10$$8, 2, 0);
ZEPHIR_OBS_NVAR(&_11$$8);
- zephir_array_fetch_string(&_11$$8, &exprValue, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3639);
+ zephir_array_fetch_string(&_11$$8, &exprValue, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3633);
zephir_array_update_string(&_10$$8, SL("type"), &_11$$8, PH_COPY | PH_SEPARATE);
if (notQuoting) {
ZVAL_BOOL(&_13$$8, 1);
@@ -6664,7 +6660,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_CALL_METHOD(&_12$$8, this_ptr, "getexpression", &_9, 462, &exprValue, &_13$$8);
zephir_check_call_status();
zephir_array_update_string(&_10$$8, SL("value"), &_12$$8, PH_COPY | PH_SEPARATE);
- zephir_array_append(&exprValues, &_10$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3641);
+ zephir_array_append(&exprValues, &_10$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3635);
ZEPHIR_CALL_METHOD(NULL, &_2, "next", NULL, 0);
zephir_check_call_status();
}
@@ -6680,14 +6676,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
if (zephir_array_isset_string_fetch(&fields, &ast, SL("fields"), 0)) {
ZEPHIR_INIT_VAR(&sqlFields);
array_init(&sqlFields);
- zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 3668);
+ zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model/Query.zep", 3662);
if (Z_TYPE_P(&fields) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&fields), _14$$9)
{
ZEPHIR_INIT_NVAR(&field);
ZVAL_COPY(&field, _14$$9);
ZEPHIR_OBS_NVAR(&name);
- zephir_array_fetch_string(&name, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3655);
+ zephir_array_fetch_string(&name, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3649);
ZEPHIR_CALL_METHOD(&_16$$10, &metaData, "hasattribute", &_17, 0, &model, &name);
zephir_check_call_status();
if (UNEXPECTED(!zephir_is_true(&_16$$10))) {
@@ -6698,11 +6694,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_CONCAT_SVSVSV(&_20$$11, "The model '", &modelName, "' doesn't have the attribute '", &name, "', when preparing: ", &_19$$11);
ZEPHIR_CALL_METHOD(NULL, &_18$$11, "__construct", &_21, 33, &_20$$11);
zephir_check_call_status();
- zephir_throw_exception_debug(&_18$$11, "phalcon/Mvc/Model/Query.zep", 3661);
+ zephir_throw_exception_debug(&_18$$11, "phalcon/Mvc/Model/Query.zep", 3655);
ZEPHIR_MM_RESTORE();
return;
}
- zephir_array_append(&sqlFields, &name, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3665);
+ zephir_array_append(&sqlFields, &name, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3659);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &fields, "rewind", NULL, 0);
@@ -6716,7 +6712,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_CALL_METHOD(&field, &fields, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&name);
- zephir_array_fetch_string(&name, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3655);
+ zephir_array_fetch_string(&name, &field, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3649);
ZEPHIR_CALL_METHOD(&_22$$12, &metaData, "hasattribute", &_23, 0, &model, &name);
zephir_check_call_status();
if (UNEXPECTED(!zephir_is_true(&_22$$12))) {
@@ -6727,11 +6723,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert)
ZEPHIR_CONCAT_SVSVSV(&_26$$13, "The model '", &modelName, "' doesn't have the attribute '", &name, "', when preparing: ", &_25$$13);
ZEPHIR_CALL_METHOD(NULL, &_24$$13, "__construct", &_21, 33, &_26$$13);
zephir_check_call_status();
- zephir_throw_exception_debug(&_24$$13, "phalcon/Mvc/Model/Query.zep", 3661);
+ zephir_throw_exception_debug(&_24$$13, "phalcon/Mvc/Model/Query.zep", 3655);
ZEPHIR_MM_RESTORE();
return;
}
- zephir_array_append(&sqlFields, &name, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3665);
+ zephir_array_append(&sqlFields, &name, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3659);
ZEPHIR_CALL_METHOD(NULL, &fields, "next", NULL, 0);
zephir_check_call_status();
}
@@ -6931,12 +6927,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
}
zephir_memory_observe(&tables);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&tables, &select, SL("tables"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3704);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3698);
return;
}
zephir_memory_observe(&columns);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&columns, &select, SL("columns"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3708);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3702);
return;
}
RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("nestingLevel")));
@@ -6977,26 +6973,26 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_read_property(&_1, this_ptr, ZEND_STRL("metaData"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&metaData, &_1);
if (UNEXPECTED(Z_TYPE_P(&manager) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A models-manager is required to execute the query", "phalcon/Mvc/Model/Query.zep", 3775);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A models-manager is required to execute the query", "phalcon/Mvc/Model/Query.zep", 3769);
return;
}
if (UNEXPECTED(Z_TYPE_P(&metaData) != IS_OBJECT)) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A meta-data is required to execute the query", "phalcon/Mvc/Model/Query.zep", 3781);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A meta-data is required to execute the query", "phalcon/Mvc/Model/Query.zep", 3775);
return;
}
number = 0;
ZEPHIR_INIT_VAR(&automaticJoins);
array_init(&automaticJoins);
- zephir_is_iterable(&selectedModels, 0, "phalcon/Mvc/Model/Query.zep", 3911);
+ zephir_is_iterable(&selectedModels, 0, "phalcon/Mvc/Model/Query.zep", 3905);
if (Z_TYPE_P(&selectedModels) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&selectedModels), _2)
{
ZEPHIR_INIT_NVAR(&selectedModel);
ZVAL_COPY(&selectedModel, _2);
ZEPHIR_OBS_NVAR(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &selectedModel, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3789);
+ zephir_array_fetch_string(&qualifiedName, &selectedModel, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3783);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3790);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3784);
ZEPHIR_CALL_METHOD(&model, &manager, "load", &_4, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&schema, &model, "getschema", NULL, 0);
@@ -7021,7 +7017,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SVSV(&_7$$17, "Alias '", &alias, "' is used more than once, when preparing: ", &_6$$17);
ZEPHIR_CALL_METHOD(NULL, &_5$$17, "__construct", &_8, 33, &_7$$17);
zephir_check_call_status();
- zephir_throw_exception_debug(&_5$$17, "phalcon/Mvc/Model/Query.zep", 3815);
+ zephir_throw_exception_debug(&_5$$17, "phalcon/Mvc/Model/Query.zep", 3809);
ZEPHIR_MM_RESTORE();
return;
}
@@ -7030,7 +7026,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_array_update_zval(&sqlModelsAliases, &modelName, &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliasesModelsInstances, &alias, &model, PH_COPY | PH_SEPARATE);
if (Z_TYPE_P(&completeSource) == IS_ARRAY) {
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3827);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3821);
} else {
ZEPHIR_INIT_NVAR(&_9$$19);
zephir_create_array(&_9$$19, 3, 0);
@@ -7057,7 +7053,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
} else {
ZEPHIR_CPY_WRT(&withs, &with);
}
- zephir_is_iterable(&withs, 0, "phalcon/Mvc/Model/Query.zep", 3903);
+ zephir_is_iterable(&withs, 0, "phalcon/Mvc/Model/Query.zep", 3897);
if (Z_TYPE_P(&withs) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&withs), _10$$21)
{
@@ -7069,7 +7065,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_13$$24, "AA", &_12$$24);
ZEPHIR_CPY_WRT(&joinAlias, &_13$$24);
ZEPHIR_OBS_NVAR(&relationModel);
- zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3853);
+ zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3847);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_14, 0, &modelName, &relationModel);
zephir_check_call_status();
if (Z_TYPE_P(&relation) == IS_OBJECT) {
@@ -7092,7 +7088,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SVSVSV(&_19$$27, "Can't find a relationship between '", &modelName, "' and '", &relationModel, "' when preparing: ", &_18$$27);
ZEPHIR_CALL_METHOD(NULL, &_17$$27, "__construct", &_8, 33, &_19$$27);
zephir_check_call_status();
- zephir_throw_exception_debug(&_17$$27, "phalcon/Mvc/Model/Query.zep", 3873);
+ zephir_throw_exception_debug(&_17$$27, "phalcon/Mvc/Model/Query.zep", 3867);
ZEPHIR_MM_RESTORE();
return;
}
@@ -7112,7 +7108,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_array_update_string(&_21$$24, SL("eager"), &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_21$$24, SL("eagerType"), &eagerType, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_21$$24, SL("balias"), &bestAlias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&selectColumns, &_21$$24, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3887);
+ zephir_array_append(&selectColumns, &_21$$24, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3881);
ZEPHIR_INIT_NVAR(&_22$$24);
zephir_create_array(&_22$$24, 3, 0);
add_assoc_long_ex(&_22$$24, SL("type"), 360);
@@ -7126,7 +7122,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
add_assoc_long_ex(&_23$$24, SL("type"), 355);
zephir_array_update_string(&_23$$24, SL("name"), &joinAlias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_22$$24, SL("alias"), &_23$$24, PH_COPY | PH_SEPARATE);
- zephir_array_append(&automaticJoins, &_22$$24, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3899);
+ zephir_array_append(&automaticJoins, &_22$$24, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3893);
number++;
} ZEND_HASH_FOREACH_END();
} else {
@@ -7146,7 +7142,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_25$$28, "AA", &_24$$28);
ZEPHIR_CPY_WRT(&joinAlias, &_25$$28);
ZEPHIR_OBS_NVAR(&relationModel);
- zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3853);
+ zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3847);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_26, 0, &modelName, &relationModel);
zephir_check_call_status();
if (Z_TYPE_P(&relation) == IS_OBJECT) {
@@ -7169,7 +7165,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SVSVSV(&_31$$31, "Can't find a relationship between '", &modelName, "' and '", &relationModel, "' when preparing: ", &_30$$31);
ZEPHIR_CALL_METHOD(NULL, &_29$$31, "__construct", &_8, 33, &_31$$31);
zephir_check_call_status();
- zephir_throw_exception_debug(&_29$$31, "phalcon/Mvc/Model/Query.zep", 3873);
+ zephir_throw_exception_debug(&_29$$31, "phalcon/Mvc/Model/Query.zep", 3867);
ZEPHIR_MM_RESTORE();
return;
}
@@ -7189,7 +7185,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_array_update_string(&_33$$28, SL("eager"), &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_33$$28, SL("eagerType"), &eagerType, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_33$$28, SL("balias"), &bestAlias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&selectColumns, &_33$$28, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3887);
+ zephir_array_append(&selectColumns, &_33$$28, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3881);
ZEPHIR_INIT_NVAR(&_34$$28);
zephir_create_array(&_34$$28, 3, 0);
add_assoc_long_ex(&_34$$28, SL("type"), 360);
@@ -7203,7 +7199,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
add_assoc_long_ex(&_35$$28, SL("type"), 355);
zephir_array_update_string(&_35$$28, SL("name"), &joinAlias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_34$$28, SL("alias"), &_35$$28, PH_COPY | PH_SEPARATE);
- zephir_array_append(&automaticJoins, &_34$$28, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3899);
+ zephir_array_append(&automaticJoins, &_34$$28, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3893);
number++;
ZEPHIR_CALL_METHOD(NULL, &withs, "next", NULL, 0);
zephir_check_call_status();
@@ -7211,8 +7207,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
}
ZEPHIR_INIT_NVAR(&withItem);
}
- zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3905);
- zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3906);
+ zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3899);
+ zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3900);
zephir_array_update_zval(&modelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
} ZEND_HASH_FOREACH_END();
} else {
@@ -7227,9 +7223,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CALL_METHOD(&selectedModel, &selectedModels, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &selectedModel, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3789);
+ zephir_array_fetch_string(&qualifiedName, &selectedModel, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3783);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3790);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3784);
ZEPHIR_CALL_METHOD(&model, &manager, "load", &_36, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&schema, &model, "getschema", NULL, 0);
@@ -7255,7 +7251,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SVSV(&_40$$36, "Alias '", &alias, "' is used more than once, when preparing: ", &_39$$36);
ZEPHIR_CALL_METHOD(NULL, &_38$$36, "__construct", &_8, 33, &_40$$36);
zephir_check_call_status();
- zephir_throw_exception_debug(&_38$$36, "phalcon/Mvc/Model/Query.zep", 3815);
+ zephir_throw_exception_debug(&_38$$36, "phalcon/Mvc/Model/Query.zep", 3809);
ZEPHIR_MM_RESTORE();
return;
}
@@ -7264,7 +7260,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_array_update_zval(&sqlModelsAliases, &modelName, &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliasesModelsInstances, &alias, &model, PH_COPY | PH_SEPARATE);
if (Z_TYPE_P(&completeSource) == IS_ARRAY) {
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3827);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3821);
} else {
ZEPHIR_INIT_NVAR(&_41$$38);
zephir_create_array(&_41$$38, 3, 0);
@@ -7292,7 +7288,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
} else {
ZEPHIR_CPY_WRT(&withs, &with);
}
- zephir_is_iterable(&withs, 0, "phalcon/Mvc/Model/Query.zep", 3903);
+ zephir_is_iterable(&withs, 0, "phalcon/Mvc/Model/Query.zep", 3897);
if (Z_TYPE_P(&withs) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&withs), _43$$40)
{
@@ -7304,7 +7300,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_46$$43, "AA", &_45$$43);
ZEPHIR_CPY_WRT(&joinAlias, &_46$$43);
ZEPHIR_OBS_NVAR(&relationModel);
- zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3853);
+ zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3847);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_47, 0, &modelName, &relationModel);
zephir_check_call_status();
if (Z_TYPE_P(&relation) == IS_OBJECT) {
@@ -7327,7 +7323,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SVSVSV(&_52$$46, "Can't find a relationship between '", &modelName, "' and '", &relationModel, "' when preparing: ", &_51$$46);
ZEPHIR_CALL_METHOD(NULL, &_50$$46, "__construct", &_8, 33, &_52$$46);
zephir_check_call_status();
- zephir_throw_exception_debug(&_50$$46, "phalcon/Mvc/Model/Query.zep", 3873);
+ zephir_throw_exception_debug(&_50$$46, "phalcon/Mvc/Model/Query.zep", 3867);
ZEPHIR_MM_RESTORE();
return;
}
@@ -7347,7 +7343,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_array_update_string(&_54$$43, SL("eager"), &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_54$$43, SL("eagerType"), &eagerType, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_54$$43, SL("balias"), &bestAlias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&selectColumns, &_54$$43, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3887);
+ zephir_array_append(&selectColumns, &_54$$43, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3881);
ZEPHIR_INIT_NVAR(&_55$$43);
zephir_create_array(&_55$$43, 3, 0);
add_assoc_long_ex(&_55$$43, SL("type"), 360);
@@ -7361,7 +7357,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
add_assoc_long_ex(&_56$$43, SL("type"), 355);
zephir_array_update_string(&_56$$43, SL("name"), &joinAlias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_55$$43, SL("alias"), &_56$$43, PH_COPY | PH_SEPARATE);
- zephir_array_append(&automaticJoins, &_55$$43, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3899);
+ zephir_array_append(&automaticJoins, &_55$$43, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3893);
number++;
} ZEND_HASH_FOREACH_END();
} else {
@@ -7381,7 +7377,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_58$$47, "AA", &_57$$47);
ZEPHIR_CPY_WRT(&joinAlias, &_58$$47);
ZEPHIR_OBS_NVAR(&relationModel);
- zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3853);
+ zephir_array_fetch_string(&relationModel, &withItem, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3847);
ZEPHIR_CALL_METHOD(&relation, &manager, "getrelationbyalias", &_59, 0, &modelName, &relationModel);
zephir_check_call_status();
if (Z_TYPE_P(&relation) == IS_OBJECT) {
@@ -7404,7 +7400,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SVSVSV(&_64$$50, "Can't find a relationship between '", &modelName, "' and '", &relationModel, "' when preparing: ", &_63$$50);
ZEPHIR_CALL_METHOD(NULL, &_62$$50, "__construct", &_8, 33, &_64$$50);
zephir_check_call_status();
- zephir_throw_exception_debug(&_62$$50, "phalcon/Mvc/Model/Query.zep", 3873);
+ zephir_throw_exception_debug(&_62$$50, "phalcon/Mvc/Model/Query.zep", 3867);
ZEPHIR_MM_RESTORE();
return;
}
@@ -7424,7 +7420,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_array_update_string(&_66$$47, SL("eager"), &alias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_66$$47, SL("eagerType"), &eagerType, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_66$$47, SL("balias"), &bestAlias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&selectColumns, &_66$$47, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3887);
+ zephir_array_append(&selectColumns, &_66$$47, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3881);
ZEPHIR_INIT_NVAR(&_67$$47);
zephir_create_array(&_67$$47, 3, 0);
add_assoc_long_ex(&_67$$47, SL("type"), 360);
@@ -7438,7 +7434,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
add_assoc_long_ex(&_68$$47, SL("type"), 355);
zephir_array_update_string(&_68$$47, SL("name"), &joinAlias, PH_COPY | PH_SEPARATE);
zephir_array_update_string(&_67$$47, SL("alias"), &_68$$47, PH_COPY | PH_SEPARATE);
- zephir_array_append(&automaticJoins, &_67$$47, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3899);
+ zephir_array_append(&automaticJoins, &_67$$47, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3893);
number++;
ZEPHIR_CALL_METHOD(NULL, &withs, "next", NULL, 0);
zephir_check_call_status();
@@ -7446,8 +7442,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
}
ZEPHIR_INIT_NVAR(&withItem);
}
- zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3905);
- zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3906);
+ zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3899);
+ zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3900);
zephir_array_update_zval(&modelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, &selectedModels, "next", NULL, 0);
zephir_check_call_status();
@@ -7508,7 +7504,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_fast_array_merge(&_81$$55, &joins, &automaticJoins);
zephir_array_update_string(&select, SL("joins"), &_81$$55, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_append(&automaticJoins, &joins, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3942);
+ zephir_array_append(&automaticJoins, &joins, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3936);
zephir_array_update_string(&select, SL("joins"), &automaticJoins, PH_COPY | PH_SEPARATE);
}
}
@@ -7527,7 +7523,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
position = 0;
ZEPHIR_INIT_VAR(&sqlColumnAliases);
array_init(&sqlColumnAliases);
- zephir_is_iterable(&selectColumns, 0, "phalcon/Mvc/Model/Query.zep", 3993);
+ zephir_is_iterable(&selectColumns, 0, "phalcon/Mvc/Model/Query.zep", 3987);
if (Z_TYPE_P(&selectColumns) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&selectColumns), _82)
{
@@ -7535,7 +7531,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZVAL_COPY(&column, _82);
ZEPHIR_CALL_METHOD(&_84$$60, this_ptr, "getselectcolumn", &_85, 478, &column);
zephir_check_call_status();
- zephir_is_iterable(&_84$$60, 0, "phalcon/Mvc/Model/Query.zep", 3991);
+ zephir_is_iterable(&_84$$60, 0, "phalcon/Mvc/Model/Query.zep", 3985);
if (Z_TYPE_P(&_84$$60) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_84$$60), _86$$60)
{
@@ -7552,7 +7548,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
if (zephir_array_isset_string_fetch(&alias, &sqlColumn, SL("balias"), 0)) {
zephir_array_update_zval(&sqlColumns, &alias, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_fetch_string(&_88$$65, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3981);
+ zephir_array_fetch_string(&_88$$65, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3975);
if (ZEPHIR_IS_STRING(&_88$$65, "scalar")) {
ZEPHIR_INIT_NVAR(&_89$$66);
ZVAL_LONG(&_89$$66, position);
@@ -7560,7 +7556,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_90$$66, "_", &_89$$66);
zephir_array_update_zval(&sqlColumns, &_90$$66, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3984);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3978);
}
}
}
@@ -7588,7 +7584,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
if (zephir_array_isset_string_fetch(&alias, &sqlColumn, SL("balias"), 0)) {
zephir_array_update_zval(&sqlColumns, &alias, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_fetch_string(&_91$$72, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3981);
+ zephir_array_fetch_string(&_91$$72, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3975);
if (ZEPHIR_IS_STRING(&_91$$72, "scalar")) {
ZEPHIR_INIT_NVAR(&_92$$73);
ZVAL_LONG(&_92$$73, position);
@@ -7596,7 +7592,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_93$$73, "_", &_92$$73);
zephir_array_update_zval(&sqlColumns, &_93$$73, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3984);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3978);
}
}
}
@@ -7620,7 +7616,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_94$$75, this_ptr, "getselectcolumn", &_85, 478, &column);
zephir_check_call_status();
- zephir_is_iterable(&_94$$75, 0, "phalcon/Mvc/Model/Query.zep", 3991);
+ zephir_is_iterable(&_94$$75, 0, "phalcon/Mvc/Model/Query.zep", 3985);
if (Z_TYPE_P(&_94$$75) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_94$$75), _95$$75)
{
@@ -7637,7 +7633,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
if (zephir_array_isset_string_fetch(&alias, &sqlColumn, SL("balias"), 0)) {
zephir_array_update_zval(&sqlColumns, &alias, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_fetch_string(&_97$$80, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3981);
+ zephir_array_fetch_string(&_97$$80, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3975);
if (ZEPHIR_IS_STRING(&_97$$80, "scalar")) {
ZEPHIR_INIT_NVAR(&_98$$81);
ZVAL_LONG(&_98$$81, position);
@@ -7645,7 +7641,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_99$$81, "_", &_98$$81);
zephir_array_update_zval(&sqlColumns, &_99$$81, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3984);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3978);
}
}
}
@@ -7673,7 +7669,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
if (zephir_array_isset_string_fetch(&alias, &sqlColumn, SL("balias"), 0)) {
zephir_array_update_zval(&sqlColumns, &alias, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_fetch_string(&_100$$87, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3981);
+ zephir_array_fetch_string(&_100$$87, &sqlColumn, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 3975);
if (ZEPHIR_IS_STRING(&_100$$87, "scalar")) {
ZEPHIR_INIT_NVAR(&_101$$88);
ZVAL_LONG(&_101$$88, position);
@@ -7681,7 +7677,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect)
ZEPHIR_CONCAT_SV(&_102$$88, "_", &_101$$88);
zephir_array_update_zval(&sqlColumns, &_102$$88, &sqlColumn, PH_COPY | PH_SEPARATE);
} else {
- zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3984);
+ zephir_array_append(&sqlColumns, &sqlColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3978);
}
}
}
@@ -7830,17 +7826,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_CPY_WRT(&ast, &_0);
zephir_memory_observe(&update);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&update, &ast, SL("update"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4070);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4064);
return;
}
zephir_memory_observe(&tables);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&tables, &update, SL("tables"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4074);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4068);
return;
}
zephir_memory_observe(&values);
if (UNEXPECTED(!(zephir_array_isset_string_fetch(&values, &update, SL("values"), 0)))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4078);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4072);
return;
}
ZEPHIR_INIT_VAR(&models);
@@ -7864,16 +7860,16 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
}
zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY);
ZEPHIR_CPY_WRT(&manager, &_0);
- zephir_is_iterable(&updateTables, 0, "phalcon/Mvc/Model/Query.zep", 4144);
+ zephir_is_iterable(&updateTables, 0, "phalcon/Mvc/Model/Query.zep", 4138);
if (Z_TYPE_P(&updateTables) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&updateTables), _1)
{
ZEPHIR_INIT_NVAR(&table);
ZVAL_COPY(&table, _1);
ZEPHIR_OBS_NVAR(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4102);
+ zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4096);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4103);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4097);
ZEPHIR_CALL_METHOD(&model, &manager, "load", &_3, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&source, &model, "getsource", NULL, 0);
@@ -7897,17 +7893,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_OBS_NVAR(&alias);
if (zephir_array_isset_string_fetch(&alias, &table, SL("alias"), 0)) {
zephir_array_update_zval(&sqlAliases, &alias, &alias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4126);
- zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4127);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4120);
+ zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4121);
zephir_array_update_zval(&sqlAliasesModelsInstances, &alias, &model, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&models, &alias, &modelName, PH_COPY | PH_SEPARATE);
} else {
zephir_array_update_zval(&sqlAliases, &modelName, &source, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliasesModelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4133);
+ zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4127);
zephir_array_update_zval(&models, &modelName, &source, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4137);
+ zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4131);
zephir_array_update_zval(&modelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
} ZEND_HASH_FOREACH_END();
} else {
@@ -7922,9 +7918,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_CALL_METHOD(&table, &updateTables, "current", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_NVAR(&qualifiedName);
- zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4102);
+ zephir_array_fetch_string(&qualifiedName, &table, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4096);
ZEPHIR_OBS_NVAR(&modelName);
- zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4103);
+ zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4097);
ZEPHIR_CALL_METHOD(&model, &manager, "load", &_6, 0, &modelName);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&source, &model, "getsource", NULL, 0);
@@ -7947,17 +7943,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_OBS_NVAR(&alias);
if (zephir_array_isset_string_fetch(&alias, &table, SL("alias"), 0)) {
zephir_array_update_zval(&sqlAliases, &alias, &alias, PH_COPY | PH_SEPARATE);
- zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4126);
- zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4127);
+ zephir_array_append(&completeSource, &alias, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4120);
+ zephir_array_append(&sqlTables, &completeSource, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4121);
zephir_array_update_zval(&sqlAliasesModelsInstances, &alias, &model, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&models, &alias, &modelName, PH_COPY | PH_SEPARATE);
} else {
zephir_array_update_zval(&sqlAliases, &modelName, &source, PH_COPY | PH_SEPARATE);
zephir_array_update_zval(&sqlAliasesModelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4133);
+ zephir_array_append(&sqlTables, &source, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4127);
zephir_array_update_zval(&models, &modelName, &source, PH_COPY | PH_SEPARATE);
}
- zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4137);
+ zephir_array_append(&sqlModels, &modelName, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4131);
zephir_array_update_zval(&modelsInstances, &modelName, &model, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, &updateTables, "next", NULL, 0);
zephir_check_call_status();
@@ -7980,13 +7976,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_CPY_WRT(&updateValues, &values);
}
notQuoting = 0;
- zephir_is_iterable(&updateValues, 0, "phalcon/Mvc/Model/Query.zep", 4168);
+ zephir_is_iterable(&updateValues, 0, "phalcon/Mvc/Model/Query.zep", 4162);
if (Z_TYPE_P(&updateValues) == IS_ARRAY) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&updateValues), _9)
{
ZEPHIR_INIT_NVAR(&updateValue);
ZVAL_COPY(&updateValue, _9);
- zephir_array_fetch_string(&_12$$20, &updateValue, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 4160);
+ zephir_array_fetch_string(&_12$$20, &updateValue, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 4154);
if (notQuoting) {
ZVAL_BOOL(&_13$$20, 1);
} else {
@@ -7994,13 +7990,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
}
ZEPHIR_CALL_METHOD(&_11$$20, this_ptr, "getexpression", &_14, 462, &_12$$20, &_13$$20);
zephir_check_call_status();
- zephir_array_append(&sqlFields, &_11$$20, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4160);
+ zephir_array_append(&sqlFields, &_11$$20, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4154);
ZEPHIR_OBS_NVAR(&exprColumn);
- zephir_array_fetch_string(&exprColumn, &updateValue, SL("expr"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4161);
+ zephir_array_fetch_string(&exprColumn, &updateValue, SL("expr"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4155);
ZEPHIR_INIT_NVAR(&_15$$20);
zephir_create_array(&_15$$20, 2, 0);
ZEPHIR_OBS_NVAR(&_16$$20);
- zephir_array_fetch_string(&_16$$20, &exprColumn, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4163);
+ zephir_array_fetch_string(&_16$$20, &exprColumn, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4157);
zephir_array_update_string(&_15$$20, SL("type"), &_16$$20, PH_COPY | PH_SEPARATE);
if (notQuoting) {
ZVAL_BOOL(&_18$$20, 1);
@@ -8010,7 +8006,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_CALL_METHOD(&_17$$20, this_ptr, "getexpression", &_14, 462, &exprColumn, &_18$$20);
zephir_check_call_status();
zephir_array_update_string(&_15$$20, SL("value"), &_17$$20, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlValues, &_15$$20, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4165);
+ zephir_array_append(&sqlValues, &_15$$20, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4159);
} ZEND_HASH_FOREACH_END();
} else {
ZEPHIR_CALL_METHOD(NULL, &updateValues, "rewind", NULL, 0);
@@ -8023,7 +8019,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
}
ZEPHIR_CALL_METHOD(&updateValue, &updateValues, "current", NULL, 0);
zephir_check_call_status();
- zephir_array_fetch_string(&_20$$21, &updateValue, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 4160);
+ zephir_array_fetch_string(&_20$$21, &updateValue, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 4154);
if (notQuoting) {
ZVAL_BOOL(&_21$$21, 1);
} else {
@@ -8031,13 +8027,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
}
ZEPHIR_CALL_METHOD(&_19$$21, this_ptr, "getexpression", &_14, 462, &_20$$21, &_21$$21);
zephir_check_call_status();
- zephir_array_append(&sqlFields, &_19$$21, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4160);
+ zephir_array_append(&sqlFields, &_19$$21, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4154);
ZEPHIR_OBS_NVAR(&exprColumn);
- zephir_array_fetch_string(&exprColumn, &updateValue, SL("expr"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4161);
+ zephir_array_fetch_string(&exprColumn, &updateValue, SL("expr"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4155);
ZEPHIR_INIT_NVAR(&_22$$21);
zephir_create_array(&_22$$21, 2, 0);
ZEPHIR_OBS_NVAR(&_23$$21);
- zephir_array_fetch_string(&_23$$21, &exprColumn, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4163);
+ zephir_array_fetch_string(&_23$$21, &exprColumn, SL("type"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 4157);
zephir_array_update_string(&_22$$21, SL("type"), &_23$$21, PH_COPY | PH_SEPARATE);
if (notQuoting) {
ZVAL_BOOL(&_25$$21, 1);
@@ -8047,7 +8043,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate)
ZEPHIR_CALL_METHOD(&_24$$21, this_ptr, "getexpression", &_14, 462, &exprColumn, &_25$$21);
zephir_check_call_status();
zephir_array_update_string(&_22$$21, SL("value"), &_24$$21, PH_COPY | PH_SEPARATE);
- zephir_array_append(&sqlValues, &_22$$21, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4165);
+ zephir_array_append(&sqlValues, &_22$$21, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4159);
ZEPHIR_CALL_METHOD(NULL, &updateValues, "next", NULL, 0);
zephir_check_call_status();
}
diff --git a/ext/phalcon/support/version.zep.c b/ext/phalcon/support/version.zep.c
index ea0259e7903..4e20ce0e4d9 100644
--- a/ext/phalcon/support/version.zep.c
+++ b/ext/phalcon/support/version.zep.c
@@ -115,7 +115,7 @@ PHP_METHOD(Phalcon_Support_Version, getVersion)
ZVAL_LONG(&_0, 9);
zephir_array_fast_append(return_value, &_0);
ZEPHIR_INIT_NVAR(&_0);
- ZVAL_LONG(&_0, 1);
+ ZVAL_LONG(&_0, 2);
zephir_array_fast_append(return_value, &_0);
ZEPHIR_INIT_NVAR(&_0);
ZVAL_LONG(&_0, 4);
diff --git a/ext/phalcon/translate/adapter/csv.zep.c b/ext/phalcon/translate/adapter/csv.zep.c
index 3770e046659..5508c78555b 100644
--- a/ext/phalcon/translate/adapter/csv.zep.c
+++ b/ext/phalcon/translate/adapter/csv.zep.c
@@ -56,7 +56,8 @@ ZEPHIR_INIT_CLASS(Phalcon_Translate_Adapter_Csv)
* @param array $options = [
* 'content' => '',
* 'delimiter' => ';',
- * 'enclosure' => '"'
+ * 'enclosure' => '"',
+ * 'escape' => '\\'
* ]
*
* @throws Exception
@@ -66,12 +67,13 @@ PHP_METHOD(Phalcon_Translate_Adapter_Csv, __construct)
zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL;
zend_long ZEPHIR_LAST_CALL_STATUS;
zval options;
- zval *interpolator, interpolator_sub, *options_param = NULL, delimiter, enclosure, _0, _1;
+ zval *interpolator, interpolator_sub, *options_param = NULL, delimiter, enclosure, escape, _0, _1;
zval *this_ptr = getThis();
ZVAL_UNDEF(&interpolator_sub);
ZVAL_UNDEF(&delimiter);
ZVAL_UNDEF(&enclosure);
+ ZVAL_UNDEF(&escape);
ZVAL_UNDEF(&_0);
ZVAL_UNDEF(&_1);
ZVAL_UNDEF(&options);
@@ -86,26 +88,33 @@ PHP_METHOD(Phalcon_Translate_Adapter_Csv, __construct)
ZEPHIR_CALL_PARENT(NULL, phalcon_translate_adapter_csv_ce, getThis(), "__construct", NULL, 0, interpolator, &options);
zephir_check_call_status();
if (UNEXPECTED(!(zephir_array_isset_string(&options, SL("content"))))) {
- ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_translate_exception_ce, "Parameter 'content' is required", "phalcon/Translate/Adapter/Csv.zep", 48);
+ ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_translate_exception_ce, "Parameter 'content' is required", "phalcon/Translate/Adapter/Csv.zep", 49);
return;
}
if (zephir_array_isset_string(&options, SL("delimiter"))) {
zephir_memory_observe(&delimiter);
- zephir_array_fetch_string(&delimiter, &options, SL("delimiter"), PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 52);
+ zephir_array_fetch_string(&delimiter, &options, SL("delimiter"), PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 53);
} else {
ZEPHIR_INIT_NVAR(&delimiter);
ZVAL_STRING(&delimiter, ";");
}
if (zephir_array_isset_string(&options, SL("enclosure"))) {
zephir_memory_observe(&enclosure);
- zephir_array_fetch_string(&enclosure, &options, SL("enclosure"), PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 58);
+ zephir_array_fetch_string(&enclosure, &options, SL("enclosure"), PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 59);
} else {
ZEPHIR_INIT_NVAR(&enclosure);
ZVAL_STRING(&enclosure, "\"");
}
- zephir_array_fetch_string(&_0, &options, SL("content"), PH_NOISY | PH_READONLY, "phalcon/Translate/Adapter/Csv.zep", 63);
+ if (zephir_array_isset_string(&options, SL("escape"))) {
+ zephir_memory_observe(&escape);
+ zephir_array_fetch_string(&escape, &options, SL("escape"), PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 65);
+ } else {
+ ZEPHIR_INIT_NVAR(&escape);
+ ZVAL_STRING(&escape, "\\");
+ }
+ zephir_array_fetch_string(&_0, &options, SL("content"), PH_NOISY | PH_READONLY, "phalcon/Translate/Adapter/Csv.zep", 70);
ZVAL_LONG(&_1, 0);
- ZEPHIR_CALL_METHOD(NULL, this_ptr, "load", NULL, 0, &_0, &_1, &delimiter, &enclosure);
+ ZEPHIR_CALL_METHOD(NULL, this_ptr, "load", NULL, 0, &_0, &_1, &delimiter, &enclosure, &escape);
zephir_check_call_status();
ZEPHIR_MM_RESTORE();
}
@@ -243,6 +252,7 @@ PHP_METHOD(Phalcon_Translate_Adapter_Csv, query)
* @param int $length
* @param string $separator
* @param string $enclosure
+ * @param string $escape
*
* @throws Exception
*/
@@ -252,13 +262,14 @@ PHP_METHOD(Phalcon_Translate_Adapter_Csv, load)
zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL;
zephir_fcall_cache_entry *_4 = NULL;
zend_long length, ZEPHIR_LAST_CALL_STATUS;
- zval *file_param = NULL, *length_param = NULL, *delimiter_param = NULL, *enclosure_param = NULL, data, fileHandler, _0, _1$$3, _3$$4, _5$$4, _6$$4, _7$$4, _9$$4, _10$$4;
- zval file, delimiter, enclosure, _2$$3;
+ zval *file_param = NULL, *length_param = NULL, *delimiter_param = NULL, *enclosure_param = NULL, *escape_param = NULL, data, fileHandler, _0, _1$$3, _3$$4, _5$$4, _6$$4, _7$$4, _9$$4, _10$$4;
+ zval file, delimiter, enclosure, escape, _2$$3;
zval *this_ptr = getThis();
ZVAL_UNDEF(&file);
ZVAL_UNDEF(&delimiter);
ZVAL_UNDEF(&enclosure);
+ ZVAL_UNDEF(&escape);
ZVAL_UNDEF(&_2$$3);
ZVAL_UNDEF(&data);
ZVAL_UNDEF(&fileHandler);
@@ -270,18 +281,20 @@ PHP_METHOD(Phalcon_Translate_Adapter_Csv, load)
ZVAL_UNDEF(&_7$$4);
ZVAL_UNDEF(&_9$$4);
ZVAL_UNDEF(&_10$$4);
- ZEND_PARSE_PARAMETERS_START(4, 4)
+ ZEND_PARSE_PARAMETERS_START(5, 5)
Z_PARAM_STR(file)
Z_PARAM_LONG(length)
Z_PARAM_STR(delimiter)
Z_PARAM_STR(enclosure)
+ Z_PARAM_STR(escape)
ZEND_PARSE_PARAMETERS_END();
ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0);
zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__);
- zephir_fetch_params(1, 4, 0, &file_param, &length_param, &delimiter_param, &enclosure_param);
+ zephir_fetch_params(1, 5, 0, &file_param, &length_param, &delimiter_param, &enclosure_param, &escape_param);
zephir_get_strval(&file, file_param);
zephir_get_strval(&delimiter, delimiter_param);
zephir_get_strval(&enclosure, enclosure_param);
+ zephir_get_strval(&escape, escape_param);
ZEPHIR_INIT_VAR(&_0);
ZVAL_STRING(&_0, "rb");
ZEPHIR_CALL_METHOD(&fileHandler, this_ptr, "phpfopen", NULL, 0, &file, &_0);
@@ -293,18 +306,18 @@ PHP_METHOD(Phalcon_Translate_Adapter_Csv, load)
ZEPHIR_CONCAT_SVS(&_2$$3, "Error opening translation file '", &file, "'");
ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3);
zephir_check_call_status();
- zephir_throw_exception_debug(&_1$$3, "phalcon/Translate/Adapter/Csv.zep", 129);
+ zephir_throw_exception_debug(&_1$$3, "phalcon/Translate/Adapter/Csv.zep", 137);
ZEPHIR_MM_RESTORE();
return;
}
while (1) {
ZVAL_LONG(&_3$$4, length);
- ZEPHIR_CALL_FUNCTION(&data, "fgetcsv", &_4, 0, &fileHandler, &_3$$4, &delimiter, &enclosure);
+ ZEPHIR_CALL_FUNCTION(&data, "fgetcsv", &_4, 0, &fileHandler, &_3$$4, &delimiter, &enclosure, &escape);
zephir_check_call_status();
if (ZEPHIR_IS_FALSE_IDENTICAL(&data)) {
break;
}
- zephir_array_fetch_long(&_5$$4, &data, 0, PH_NOISY | PH_READONLY, "phalcon/Translate/Adapter/Csv.zep", 139);
+ zephir_array_fetch_long(&_5$$4, &data, 0, PH_NOISY | PH_READONLY, "phalcon/Translate/Adapter/Csv.zep", 147);
ZVAL_LONG(&_3$$4, 0);
ZVAL_LONG(&_6$$4, 1);
ZEPHIR_INIT_NVAR(&_7$$4);
@@ -316,9 +329,9 @@ PHP_METHOD(Phalcon_Translate_Adapter_Csv, load)
if (_8$$4) {
continue;
}
- zephir_array_fetch_long(&_9$$4, &data, 1, PH_NOISY | PH_READONLY, "phalcon/Translate/Adapter/Csv.zep", 143);
+ zephir_array_fetch_long(&_9$$4, &data, 1, PH_NOISY | PH_READONLY, "phalcon/Translate/Adapter/Csv.zep", 151);
ZEPHIR_OBS_NVAR(&_10$$4);
- zephir_array_fetch_long(&_10$$4, &data, 0, PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 143);
+ zephir_array_fetch_long(&_10$$4, &data, 0, PH_NOISY, "phalcon/Translate/Adapter/Csv.zep", 151);
zephir_update_property_array(this_ptr, SL("translate"), &_10$$4, &_9$$4);
}
zephir_fclose(&fileHandler);
diff --git a/ext/phalcon/translate/adapter/csv.zep.h b/ext/phalcon/translate/adapter/csv.zep.h
index 2cbc8ed6ebf..8f7e5b55d57 100644
--- a/ext/phalcon/translate/adapter/csv.zep.h
+++ b/ext/phalcon/translate/adapter/csv.zep.h
@@ -30,12 +30,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_translate_adapter_csv_qu
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, placeholders, IS_ARRAY, 0, "[]")
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_translate_adapter_csv_load, 0, 4, IS_VOID, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_translate_adapter_csv_load, 0, 5, IS_VOID, 0)
ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, delimiter, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, enclosure, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, escape, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_translate_adapter_csv_toarray, 0, 0, IS_ARRAY, 0)
diff --git a/ext/php_phalcon.h b/ext/php_phalcon.h
index 5c537110352..8c3a5546331 100644
--- a/ext/php_phalcon.h
+++ b/ext/php_phalcon.h
@@ -11,7 +11,7 @@
#include "kernel/globals.h"
#define PHP_PHALCON_NAME "phalcon"
-#define PHP_PHALCON_VERSION "5.9.1"
+#define PHP_PHALCON_VERSION "5.9.2"
#define PHP_PHALCON_EXTNAME "phalcon"
#define PHP_PHALCON_AUTHOR "Phalcon Team and contributors"
#define PHP_PHALCON_ZEPVERSION "0.18.0-$Id$"
diff --git a/package.xml b/package.xml
index c8e3e0212e7..b15d65995be 100644
--- a/package.xml
+++ b/package.xml
@@ -22,11 +22,11 @@
nikos@phalcon.io
yes
- 2025-03-31
+ 2025-04-03
- 5.9.1
- 5.9.1
+ 5.9.2
+ 5.9.2
stable
@@ -36,17 +36,10 @@
Full changelog can be found at: https://github.com/phalcon/cphalcon/blob/master/CHANGELOG-5.0.md
- ### Changed
-
- - Changed `Phalcon\Storage\Adapter\AbstractAdapter` and dropped `has()` check before receiving the value. [#16705](https://github.com/phalcon/cphalcon/issues/16705)
-
- ### Added
-
- - Added `Phalcon\Html\Helper\Breadcrumbs` component to replace the old `Phalcon\Html\Breadcrumbs` component. [#16727](https://github.com/phalcon/cphalcon/issues/16727)
-
### Fixed
- - Fixed `Phalcon\Mvc\Micro\LazyLoader::callMethod` to prevent `Unknown named parameter` error [#16724](https://github.com/phalcon/cphalcon/issues/16724)
+ - Fixed `Phalcon\Translate\Adapter\Csv` the `escape` argument is explicitly required in PHP 8.4 [#16733](https://github.com/phalcon/cphalcon/issues/16733)
+ - Fixed `Phalcon\Mvc\Model\Query` to use the cacheOptions lifetime over the "cache" service lifetime
diff --git a/phalcon/Mvc/Model/Query.zep b/phalcon/Mvc/Model/Query.zep
index f13a3ab2532..1585866edb2 100644
--- a/phalcon/Mvc/Model/Query.zep
+++ b/phalcon/Mvc/Model/Query.zep
@@ -283,13 +283,6 @@ class Query implements QueryInterface, InjectionAwareInterface
);
}
- /**
- * By default use use 3600 seconds (1 hour) as cache lifetime
- */
- if !fetch lifetime, cacheOptions["lifetime"] {
- let lifetime = 3600;
- }
-
if !fetch cacheService, cacheOptions["service"] {
let cacheService = "modelsCache";
}
@@ -309,7 +302,8 @@ class Query implements QueryInterface, InjectionAwareInterface
*/
let adapter = cache->getAdapter();
let cacheLifetime = adapter->getLifetime();
- if (lifetime !== cacheLifetime) {
+
+ if !fetch lifetime, cacheOptions["lifetime"] {
let lifetime = cacheLifetime;
}
diff --git a/phalcon/Support/Version.zep b/phalcon/Support/Version.zep
index 3c1328937a9..d0028b28a91 100644
--- a/phalcon/Support/Version.zep
+++ b/phalcon/Support/Version.zep
@@ -77,7 +77,7 @@ class Version
*/
protected function getVersion() -> array
{
- return [5, 9, 1, 4, 0];
+ return [5, 9, 2, 4, 0];
}
/**
diff --git a/phalcon/Translate/Adapter/Csv.zep b/phalcon/Translate/Adapter/Csv.zep
index 440a7df52b1..a45f043f92c 100644
--- a/phalcon/Translate/Adapter/Csv.zep
+++ b/phalcon/Translate/Adapter/Csv.zep
@@ -31,7 +31,8 @@ class Csv extends AbstractAdapter implements ArrayAccess
* @param array $options = [
* 'content' => '',
* 'delimiter' => ';',
- * 'enclosure' => '"'
+ * 'enclosure' => '"',
+ * 'escape' => '\\'
* ]
*
* @throws Exception
@@ -40,7 +41,7 @@ class Csv extends AbstractAdapter implements ArrayAccess
interpolator,
array options
) {
- var delimiter, enclosure;
+ var delimiter, enclosure, escape;
parent::__construct(interpolator, options);
@@ -60,7 +61,13 @@ class Csv extends AbstractAdapter implements ArrayAccess
let enclosure = "\"";
}
- this->load(options["content"], 0, delimiter, enclosure);
+ if isset options["escape"] {
+ let escape = options["escape"];
+ } else {
+ let escape = "\\";
+ }
+
+ this->load(options["content"], 0, delimiter, enclosure, escape);
}
/**
@@ -114,10 +121,11 @@ class Csv extends AbstractAdapter implements ArrayAccess
* @param int $length
* @param string $separator
* @param string $enclosure
+ * @param string $escape
*
* @throws Exception
*/
- private function load(string file, int length, string delimiter, string enclosure) -> void
+ private function load(string file, int length, string delimiter, string enclosure, string escape) -> void
{
var data, fileHandler;
@@ -130,7 +138,7 @@ class Csv extends AbstractAdapter implements ArrayAccess
}
loop {
- let data = fgetcsv(fileHandler, length, delimiter, enclosure);
+ let data = fgetcsv(fileHandler, length, delimiter, enclosure, escape);
if data === false {
break;
diff --git a/tests/database/Mvc/Model/FindCest.php b/tests/database/Mvc/Model/FindCest.php
index 10dc6cf541a..2dd84ecd7d9 100644
--- a/tests/database/Mvc/Model/FindCest.php
+++ b/tests/database/Mvc/Model/FindCest.php
@@ -538,4 +538,76 @@ function () {
$expected = 'Use of "static" in callables in deprecated';
$I->assertStringNotContainsString($expected, $actual);
}
+
+ public function testMvcModelFindWithCacheOptionsLifetimePriorityOverCacheService(DatabaseTester $I): void
+ {
+ $I->wantToTest('Mvc\Model - find() - cache options lifetime priority over adapter lifetime');
+
+ /** @var PDO $connection */
+ $connection = $I->getConnection();
+
+ $migration = new ObjectsMigration($connection);
+ $migration->insert(1, 'random data', 1);
+
+ $options = [
+ 'defaultSerializer' => 'Json',
+ 'lifetime' => 2,
+ 'prefix' => 'data-',
+ ];
+
+ /**
+ * Models Cache setup. Adapter's lifetime is 2 seconds
+ */
+ $serializerFactory = new SerializerFactory();
+ $adapterFactory = new AdapterFactory($serializerFactory);
+ $adapter = $adapterFactory->newInstance('apcu', $options);
+ $cache = new Cache($adapter);
+
+ $this->container->setShared('modelsCache', $cache);
+
+ /**
+ * Find records with lifetime 5 sec
+ */
+ $data = Objects::find(
+ [
+ 'cache' => [
+ 'key' => 'my-cache',
+ 'lifetime' => 5,
+ ],
+ ]
+ );
+
+ $I->assertEquals(1, count($data));
+
+ $record = $data[0];
+ $I->assertEquals(1, $record->obj_id);
+ $I->assertEquals('random data', $record->obj_name);
+
+ /**
+ * Get the models cache
+ */
+ $modelsCache = $this->container->get('modelsCache');
+
+ $exists = $modelsCache->has('my-cache');
+ $I->assertTrue($exists);
+
+ /**
+ * Wait for 3 seconds for the cache to check
+ * that we still have our cache and it wasn't taken
+ * from adapter's lifetime
+ */
+ sleep(3);
+
+ $data = $modelsCache->get('my-cache');
+ $I->assertNotNull($data);
+
+ /**
+ * Wait extra 3 seconds for the cache to check
+ * that our cache is expired
+ */
+ sleep(3);
+
+ $data = $modelsCache->get('my-cache');
+ $I->assertNull($data);
+ }
}