diff --git a/CHANGELOG-4.0.md b/CHANGELOG-4.0.md index 26b7bfc748c..6cb30888431 100644 --- a/CHANGELOG-4.0.md +++ b/CHANGELOG-4.0.md @@ -7,6 +7,7 @@ - Changed the default ACL access level from boolean `FALSE` to `Enum::DENY` [#14974](https://github.com/phalcon/cphalcon/pull/14974) - Changed the way `Phalcon\Http\Response::__construct` checks `content` data type. Now a `TypeError` will be thrown if incompatible data type was passed [#14983](https://github.com/phalcon/cphalcon/issues/14983) - Changed return type hints of the following `Phalcon\Flash\FlashInterface`'s methods: `error`, `message`, `notice`, `success` and `warning` [#14994](https://github.com/phalcon/cphalcon/issues/14994) +- Changed return type hints for `Phalcon\Mvc\ModelInterface::sum` [#15000](https://github.com/phalcon/cphalcon/issues/15000) ## Fixed - Fixed `Phalcon\Mvc\Model\Query\Builder::getPhql` to add single quote between string value on a simple condition [#14874](https://github.com/phalcon/cphalcon/issues/14874) @@ -41,6 +42,7 @@ - Fixed return type hint for `Phalcon\Di::getInternalEventsManager` [#14992](https://github.com/phalcon/cphalcon/issues/14992) - Fixed return type hints of the following `Phalcon\Flash\AbstractFlash`'s methods: `error`, `notice`, `success` and `warning` [#14994](https://github.com/phalcon/cphalcon/issues/14994) - Fixed return type hint for `Phalcon\Translate\InterpolatorFactory::newInstance` [#14996](https://github.com/phalcon/cphalcon/issues/14996) +- Fixed return type hint for `Phalcon\Mvc\Model::sum` [#15000](https://github.com/phalcon/cphalcon/issues/15000) [#14987](https://github.com/phalcon/cphalcon/issues/14987) diff --git a/ext/phalcon/mvc/model.zep.c b/ext/phalcon/mvc/model.zep.c index a358d896afd..c91d3840fe6 100644 --- a/ext/phalcon/mvc/model.zep.c +++ b/ext/phalcon/mvc/model.zep.c @@ -25,12 +25,12 @@ /** - * This file is part of the Phalcon. + * This file is part of the Phalcon Framework. * - * (c) Phalcon Team + * (c) Phalcon Team * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. + * For the full copyright and license information, please view the + * LICENSE.txt file that was distributed with this source code. */ /** * Phalcon\Mvc\Model @@ -203,7 +203,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __construct) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 6, &_2$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model.zep", 154); + zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model.zep", 155); ZEPHIR_MM_RESTORE(); return; } @@ -215,7 +215,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __construct) { zephir_check_call_status(); ZEPHIR_CPY_WRT(modelsManager, &_5$$5); if (UNEXPECTED(Z_TYPE_P(modelsManager) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The injected service 'modelsManager' is not valid", "phalcon/Mvc/Model.zep", 168); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The injected service 'modelsManager' is not valid", "phalcon/Mvc/Model.zep", 169); return; } } @@ -290,7 +290,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __call) { ZEPHIR_CONCAT_SVSVS(&_3, "The method '", &method, "' doesn't exist on model '", &modelName, "'"); ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 6, &_3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2, "phalcon/Mvc/Model.zep", 237); + zephir_throw_exception_debug(&_2, "phalcon/Mvc/Model.zep", 238); ZEPHIR_MM_RESTORE(); return; @@ -339,7 +339,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __callStatic) { ZEPHIR_CONCAT_SVSVS(&_2, "The method '", &method, "' doesn't exist on model '", &modelName, "'"); ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 6, &_2); zephir_check_call_status(); - zephir_throw_exception_debug(&_1, "phalcon/Mvc/Model.zep", 263); + zephir_throw_exception_debug(&_1, "phalcon/Mvc/Model.zep", 264); ZEPHIR_MM_RESTORE(); return; @@ -401,7 +401,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __get) { zephir_read_property(&_1$$3, this_ptr, SL("dirtyRelated"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset(&_1$$3, &lowerProperty)) { zephir_read_property(&_2$$4, this_ptr, SL("dirtyRelated"), PH_NOISY_CC | PH_READONLY); - zephir_array_fetch(&_3$$4, &_2$$4, &lowerProperty, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 295); + zephir_array_fetch(&_3$$4, &_2$$4, &lowerProperty, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 296); RETURN_CTOR(&_3$$4); } ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getrelated", NULL, 0, &lowerProperty); @@ -598,7 +598,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) { if (ZEPHIR_IS_LONG(&_5$$7, 2) || ZEPHIR_IS_LONG(&_5$$7, 4)) { ZEPHIR_INIT_VAR(&related); array_init(&related); - zephir_is_iterable(value, 0, "phalcon/Mvc/Model.zep", 441); + zephir_is_iterable(value, 0, "phalcon/Mvc/Model.zep", 442); if (Z_TYPE_P(value) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(value), _9$$10) { @@ -606,7 +606,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) { ZVAL_COPY(&item, _9$$10); if (Z_TYPE_P(&item) == IS_OBJECT) { if (zephir_instance_of_ev(&item, phalcon_mvc_modelinterface_ce)) { - zephir_array_append(&related, &item, PH_SEPARATE, "phalcon/Mvc/Model.zep", 436); + zephir_array_append(&related, &item, PH_SEPARATE, "phalcon/Mvc/Model.zep", 437); } } } ZEND_HASH_FOREACH_END(); @@ -623,7 +623,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) { zephir_check_call_status(); if (Z_TYPE_P(&item) == IS_OBJECT) { if (zephir_instance_of_ev(&item, phalcon_mvc_modelinterface_ce)) { - zephir_array_append(&related, &item, PH_SEPARATE, "phalcon/Mvc/Model.zep", 436); + zephir_array_append(&related, &item, PH_SEPARATE, "phalcon/Mvc/Model.zep", 437); } } ZEPHIR_CALL_METHOD(NULL, value, "next", NULL, 0); @@ -667,7 +667,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) { ZEPHIR_CONCAT_SVS(&_17$$20, "Cannot access property '", &property, "' (not public)."); ZEPHIR_CALL_METHOD(NULL, &_16$$20, "__construct", NULL, 6, &_17$$20); zephir_check_call_status(); - zephir_throw_exception_debug(&_16$$20, "phalcon/Mvc/Model.zep", 470); + zephir_throw_exception_debug(&_16$$20, "phalcon/Mvc/Model.zep", 471); ZEPHIR_MM_RESTORE(); return; } @@ -877,7 +877,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) { if (Z_TYPE_P(dataColumnMap) == IS_ARRAY) { ZEPHIR_INIT_VAR(&dataMapped); array_init(&dataMapped); - zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 613); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 614); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2$$3, _3$$3, _0$$3) { @@ -934,7 +934,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) { } ZEPHIR_CALL_METHOD(&_4, &metaData, "getattributes", NULL, 0, this_ptr); zephir_check_call_status(); - zephir_is_iterable(&_4, 0, "phalcon/Mvc/Model.zep", 670); + zephir_is_iterable(&_4, 0, "phalcon/Mvc/Model.zep", 671); if (Z_TYPE_P(&_4) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_4), _5) { @@ -959,7 +959,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) { ZEPHIR_CONCAT_SVS(&_11$$16, "Column '", &attribute, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_10$$16, "__construct", &_12, 6, &_11$$16); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$16, "phalcon/Mvc/Model.zep", 644); + zephir_throw_exception_debug(&_10$$16, "phalcon/Mvc/Model.zep", 645); ZEPHIR_MM_RESTORE(); return; } @@ -1016,7 +1016,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) { ZEPHIR_CONCAT_SVS(&_19$$26, "Column '", &attribute, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_18$$26, "__construct", &_12, 6, &_19$$26); zephir_check_call_status(); - zephir_throw_exception_debug(&_18$$26, "phalcon/Mvc/Model.zep", 644); + zephir_throw_exception_debug(&_18$$26, "phalcon/Mvc/Model.zep", 645); ZEPHIR_MM_RESTORE(); return; } @@ -1161,7 +1161,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResult) { ZVAL_LONG(&_0, dirtyState); ZEPHIR_CALL_METHOD(NULL, &instance, "setdirtystate", NULL, 0, &_0); zephir_check_call_status(); - zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 748); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 749); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _3, _4, _1) { @@ -1174,7 +1174,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResult) { ZEPHIR_INIT_NVAR(&value); ZVAL_COPY(&value, _1); if (UNEXPECTED(Z_TYPE_P(&key) != IS_STRING)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid key in array data provided to dumpResult()", "phalcon/Mvc/Model.zep", 738); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid key in array data provided to dumpResult()", "phalcon/Mvc/Model.zep", 739); return; } zephir_update_property_zval_zval(&instance, &key, &value); @@ -1193,7 +1193,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResult) { ZEPHIR_CALL_METHOD(&value, &data, "current", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&key) != IS_STRING)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid key in array data provided to dumpResult()", "phalcon/Mvc/Model.zep", 738); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid key in array data provided to dumpResult()", "phalcon/Mvc/Model.zep", 739); return; } zephir_update_property_zval_zval(&instance, &key, &value); @@ -1291,7 +1291,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { ZVAL_LONG(&_0, dirtyState); ZEPHIR_CALL_METHOD(NULL, &instance, "setdirtystate", NULL, 0, &_0); zephir_check_call_status(); - zephir_is_iterable(&data, 1, "phalcon/Mvc/Model.zep", 876); + zephir_is_iterable(&data, 1, "phalcon/Mvc/Model.zep", 877); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _3, _4, _1) { @@ -1328,7 +1328,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { ZEPHIR_CONCAT_SVS(&_8$$9, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_7$$9, "__construct", &_9, 6, &_8$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$9, "phalcon/Mvc/Model.zep", 802); + zephir_throw_exception_debug(&_7$$9, "phalcon/Mvc/Model.zep", 803); ZEPHIR_MM_RESTORE(); return; } @@ -1342,7 +1342,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { ZEPHIR_CONCAT_SVS(&_11$$11, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_10$$11, "__construct", &_9, 6, &_11$$11); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$11, "phalcon/Mvc/Model.zep", 811); + zephir_throw_exception_debug(&_10$$11, "phalcon/Mvc/Model.zep", 812); ZEPHIR_MM_RESTORE(); return; } @@ -1358,7 +1358,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { _12$$3 = Z_TYPE_P(&value) != IS_NULL; } if (_12$$3) { - zephir_array_fetch_long(&_13$$13, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 825); + zephir_array_fetch_long(&_13$$13, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 826); do { if (ZEPHIR_IS_LONG(&_13$$13, 14) || ZEPHIR_IS_LONG(&_13$$13, 0) || ZEPHIR_IS_LONG(&_13$$13, 21) || ZEPHIR_IS_LONG(&_13$$13, 22) || ZEPHIR_IS_LONG(&_13$$13, 26)) { ZVAL_LONG(&_14$$14, 10); @@ -1381,7 +1381,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { } while(0); } else { - zephir_array_fetch_long(&_16$$18, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 849); + zephir_array_fetch_long(&_16$$18, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 850); do { if (ZEPHIR_IS_LONG(&_16$$18, 14) || ZEPHIR_IS_LONG(&_16$$18, 8) || ZEPHIR_IS_LONG(&_16$$18, 3) || ZEPHIR_IS_LONG(&_16$$18, 9) || ZEPHIR_IS_LONG(&_16$$18, 7) || ZEPHIR_IS_LONG(&_16$$18, 0) || ZEPHIR_IS_LONG(&_16$$18, 21) || ZEPHIR_IS_LONG(&_16$$18, 22) || ZEPHIR_IS_LONG(&_16$$18, 26)) { ZEPHIR_INIT_NVAR(&castValue); @@ -1394,7 +1394,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { } ZEPHIR_OBS_NVAR(&attributeName); - zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 868); + zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 869); zephir_update_property_zval_zval(&instance, &attributeName, &castValue); zephir_array_update_zval(&data, &key, &castValue, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -1436,7 +1436,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { ZEPHIR_CONCAT_SVS(&_19$$27, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_18$$27, "__construct", &_9, 6, &_19$$27); zephir_check_call_status(); - zephir_throw_exception_debug(&_18$$27, "phalcon/Mvc/Model.zep", 802); + zephir_throw_exception_debug(&_18$$27, "phalcon/Mvc/Model.zep", 803); ZEPHIR_MM_RESTORE(); return; } @@ -1450,7 +1450,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { ZEPHIR_CONCAT_SVS(&_21$$29, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_20$$29, "__construct", &_9, 6, &_21$$29); zephir_check_call_status(); - zephir_throw_exception_debug(&_20$$29, "phalcon/Mvc/Model.zep", 811); + zephir_throw_exception_debug(&_20$$29, "phalcon/Mvc/Model.zep", 812); ZEPHIR_MM_RESTORE(); return; } @@ -1466,7 +1466,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { _22$$21 = Z_TYPE_P(&value) != IS_NULL; } if (_22$$21) { - zephir_array_fetch_long(&_23$$31, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 825); + zephir_array_fetch_long(&_23$$31, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 826); do { if (ZEPHIR_IS_LONG(&_23$$31, 14) || ZEPHIR_IS_LONG(&_23$$31, 0) || ZEPHIR_IS_LONG(&_23$$31, 21) || ZEPHIR_IS_LONG(&_23$$31, 22) || ZEPHIR_IS_LONG(&_23$$31, 26)) { ZVAL_LONG(&_24$$32, 10); @@ -1489,7 +1489,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { } while(0); } else { - zephir_array_fetch_long(&_25$$36, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 849); + zephir_array_fetch_long(&_25$$36, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 850); do { if (ZEPHIR_IS_LONG(&_25$$36, 14) || ZEPHIR_IS_LONG(&_25$$36, 8) || ZEPHIR_IS_LONG(&_25$$36, 3) || ZEPHIR_IS_LONG(&_25$$36, 9) || ZEPHIR_IS_LONG(&_25$$36, 7) || ZEPHIR_IS_LONG(&_25$$36, 0) || ZEPHIR_IS_LONG(&_25$$36, 21) || ZEPHIR_IS_LONG(&_25$$36, 22) || ZEPHIR_IS_LONG(&_25$$36, 26)) { ZEPHIR_INIT_NVAR(&castValue); @@ -1502,7 +1502,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { } ZEPHIR_OBS_NVAR(&attributeName); - zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 868); + zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 869); zephir_update_property_zval_zval(&instance, &attributeName, &castValue); zephir_array_update_zval(&data, &key, &castValue, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &data, "next", NULL, 0); @@ -1574,7 +1574,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) { } ZEPHIR_INIT_VAR(&hydrateArray); array_init(&hydrateArray); - zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 957); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 958); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2, _3, _0) { @@ -1608,7 +1608,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) { ZEPHIR_CONCAT_SVS(&_8$$10, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_7$$10, "__construct", &_9, 6, &_8$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$10, "phalcon/Mvc/Model.zep", 936); + zephir_throw_exception_debug(&_7$$10, "phalcon/Mvc/Model.zep", 937); ZEPHIR_MM_RESTORE(); return; } @@ -1616,7 +1616,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) { } if (Z_TYPE_P(&attribute) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&attributeName); - zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 946); + zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 947); } else { ZEPHIR_CPY_WRT(&attributeName, &attribute); } @@ -1660,7 +1660,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) { ZEPHIR_CONCAT_SVS(&_13$$19, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_12$$19, "__construct", &_9, 6, &_13$$19); zephir_check_call_status(); - zephir_throw_exception_debug(&_12$$19, "phalcon/Mvc/Model.zep", 936); + zephir_throw_exception_debug(&_12$$19, "phalcon/Mvc/Model.zep", 937); ZEPHIR_MM_RESTORE(); return; } @@ -1668,7 +1668,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) { } if (Z_TYPE_P(&attribute) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&attributeName); - zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 946); + zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 947); } else { ZEPHIR_CPY_WRT(&attributeName, &attribute); } @@ -1926,10 +1926,10 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZVAL_NULL(&columnMap); } if (UNEXPECTED(!(zephir_fast_count_int(&primaryKeys)))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A primary key must be defined in the model in order to perform the operation", "phalcon/Mvc/Model.zep", 1111); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A primary key must be defined in the model in order to perform the operation", "phalcon/Mvc/Model.zep", 1112); return; } - zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 1159); + zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 1160); if (Z_TYPE_P(&primaryKeys) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&primaryKeys), _3) { @@ -1943,7 +1943,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CONCAT_SVS(&_6$$9, "Column '", &primaryKey, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_5$$9, "__construct", &_7, 6, &_6$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/Model.zep", 1125); + zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/Model.zep", 1126); ZEPHIR_MM_RESTORE(); return; } @@ -1956,7 +1956,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CONCAT_SVS(&_9$$11, "Column '", &primaryKey, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_8$$11, "__construct", &_7, 6, &_9$$11); zephir_check_call_status(); - zephir_throw_exception_debug(&_8$$11, "phalcon/Mvc/Model.zep", 1135); + zephir_throw_exception_debug(&_8$$11, "phalcon/Mvc/Model.zep", 1136); ZEPHIR_MM_RESTORE(); return; } @@ -1971,17 +1971,17 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CONCAT_SVS(&_11$$13, "Cannot delete the record because the primary key attribute: '", &attributeField, "' wasn't set"); ZEPHIR_CALL_METHOD(NULL, &_10$$13, "__construct", &_7, 6, &_11$$13); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$13, "phalcon/Mvc/Model.zep", 1148); + zephir_throw_exception_debug(&_10$$13, "phalcon/Mvc/Model.zep", 1149); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1154); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1155); ZEPHIR_CALL_METHOD(&_12$$8, &writeConnection, "escapeidentifier", &_13, 0, &primaryKey); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_14$$8); ZEPHIR_CONCAT_VS(&_14$$8, &_12$$8, " = ?"); - zephir_array_append(&conditions, &_14$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1155); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1156); + zephir_array_append(&conditions, &_14$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1156); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1157); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "rewind", NULL, 0); @@ -2002,7 +2002,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CONCAT_SVS(&_16$$15, "Column '", &primaryKey, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_15$$15, "__construct", &_7, 6, &_16$$15); zephir_check_call_status(); - zephir_throw_exception_debug(&_15$$15, "phalcon/Mvc/Model.zep", 1125); + zephir_throw_exception_debug(&_15$$15, "phalcon/Mvc/Model.zep", 1126); ZEPHIR_MM_RESTORE(); return; } @@ -2015,7 +2015,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CONCAT_SVS(&_18$$17, "Column '", &primaryKey, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_17$$17, "__construct", &_7, 6, &_18$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_17$$17, "phalcon/Mvc/Model.zep", 1135); + zephir_throw_exception_debug(&_17$$17, "phalcon/Mvc/Model.zep", 1136); ZEPHIR_MM_RESTORE(); return; } @@ -2030,17 +2030,17 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CONCAT_SVS(&_20$$19, "Cannot delete the record because the primary key attribute: '", &attributeField, "' wasn't set"); ZEPHIR_CALL_METHOD(NULL, &_19$$19, "__construct", &_7, 6, &_20$$19); zephir_check_call_status(); - zephir_throw_exception_debug(&_19$$19, "phalcon/Mvc/Model.zep", 1148); + zephir_throw_exception_debug(&_19$$19, "phalcon/Mvc/Model.zep", 1149); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1154); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1155); ZEPHIR_CALL_METHOD(&_21$$14, &writeConnection, "escapeidentifier", &_22, 0, &primaryKey); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_23$$14); ZEPHIR_CONCAT_VS(&_23$$14, &_21$$14, " = ?"); - zephir_array_append(&conditions, &_23$$14, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1155); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1156); + zephir_array_append(&conditions, &_23$$14, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1156); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1157); ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "next", NULL, 0); zephir_check_call_status(); } @@ -2332,7 +2332,7 @@ PHP_METHOD(Phalcon_Mvc_Model, find) { ZEPHIR_INIT_VAR(¶ms); array_init(¶ms); if (Z_TYPE_P(parameters) != IS_NULL) { - zephir_array_append(¶ms, parameters, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1420); + zephir_array_append(¶ms, parameters, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1421); } } else { ZEPHIR_CPY_WRT(¶ms, parameters); @@ -2476,7 +2476,7 @@ PHP_METHOD(Phalcon_Mvc_Model, findFirst) { zephir_array_fast_append(&_1$$5, parameters); ZEPHIR_CPY_WRT(¶ms, &_1$$5); } else { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Parameters passed must be of type array, string, numeric or null", "phalcon/Mvc/Model.zep", 1542); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Parameters passed must be of type array, string, numeric or null", "phalcon/Mvc/Model.zep", 1543); return; } ZVAL_LONG(&_3, 1); @@ -2619,7 +2619,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) { zephir_read_property(&_0, this_ptr, SL("snapshot"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&snapshot, &_0); if (UNEXPECTED(Z_TYPE_P(&snapshot) != IS_ARRAY)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The 'keepSnapshots' option must be enabled to track changes", "phalcon/Mvc/Model.zep", 1628); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The 'keepSnapshots' option must be enabled to track changes", "phalcon/Mvc/Model.zep", 1629); return; } ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); @@ -2635,7 +2635,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) { ZEPHIR_INIT_VAR(&changed); array_init(&changed); ZEPHIR_INIT_VAR(&_1); - zephir_is_iterable(&allAttributes, 0, "phalcon/Mvc/Model.zep", 1686); + zephir_is_iterable(&allAttributes, 0, "phalcon/Mvc/Model.zep", 1687); if (Z_TYPE_P(&allAttributes) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&allAttributes), _4, _5, _2) { @@ -2648,17 +2648,17 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) { ZEPHIR_INIT_NVAR(&_1); ZVAL_COPY(&_1, _2); if (!(zephir_array_isset(&snapshot, &name))) { - zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1661); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1662); continue; } ZEPHIR_OBS_NVAR(&value); if (!(zephir_fetch_property_zval(&value, this_ptr, &name, PH_SILENT_CC))) { - zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1671); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1672); continue; } - zephir_array_fetch(&_6$$6, &snapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1679); + zephir_array_fetch(&_6$$6, &snapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1680); if (!ZEPHIR_IS_IDENTICAL(&value, &_6$$6)) { - zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1680); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1681); continue; } } ZEND_HASH_FOREACH_END(); @@ -2676,17 +2676,17 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) { ZEPHIR_CALL_METHOD(&_1, &allAttributes, "current", NULL, 0); zephir_check_call_status(); if (!(zephir_array_isset(&snapshot, &name))) { - zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1661); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1662); continue; } ZEPHIR_OBS_NVAR(&value); if (!(zephir_fetch_property_zval(&value, this_ptr, &name, PH_SILENT_CC))) { - zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1671); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1672); continue; } - zephir_array_fetch(&_7$$10, &snapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1679); + zephir_array_fetch(&_7$$10, &snapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1680); if (!ZEPHIR_IS_IDENTICAL(&value, &_7$$10)) { - zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1680); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1681); continue; } ZEPHIR_CALL_METHOD(NULL, &allAttributes, "next", NULL, 0); @@ -2791,7 +2791,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getMessages) { ZEPHIR_INIT_VAR(&filtered); array_init(&filtered); zephir_read_property(&_1$$3, this_ptr, SL("errorMessages"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_1$$3, 0, "phalcon/Mvc/Model.zep", 1743); + zephir_is_iterable(&_1$$3, 0, "phalcon/Mvc/Model.zep", 1744); if (Z_TYPE_P(&_1$$3) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_1$$3), _2$$3) { @@ -2800,7 +2800,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getMessages) { ZEPHIR_CALL_METHOD(&_4$$4, &message, "getfield", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_EQUAL(&_4$$4, filter)) { - zephir_array_append(&filtered, &message, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1739); + zephir_array_append(&filtered, &message, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1740); } } ZEND_HASH_FOREACH_END(); } else { @@ -2817,7 +2817,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getMessages) { ZEPHIR_CALL_METHOD(&_5$$6, &message, "getfield", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_EQUAL(&_5$$6, filter)) { - zephir_array_append(&filtered, &message, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1739); + zephir_array_append(&filtered, &message, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1740); } ZEPHIR_CALL_METHOD(NULL, &_1$$3, "next", NULL, 0); zephir_check_call_status(); @@ -2871,7 +2871,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getModelsMetaData) { zephir_check_call_status(); ZEPHIR_CPY_WRT(&metaData, &_1$$3); if (UNEXPECTED(Z_TYPE_P(&metaData) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The injected service 'modelsMetadata' is not valid", "phalcon/Mvc/Model.zep", 1777); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The injected service 'modelsMetadata' is not valid", "phalcon/Mvc/Model.zep", 1778); return; } zephir_update_property_zval(this_ptr, SL("modelsMetaData"), &metaData); @@ -3013,7 +3013,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getRelated) { ZEPHIR_CONCAT_SVSVS(&_3$$3, "There is no defined relations for the model '", &className, "' using alias '", &alias, "'"); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 6, &_3$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "phalcon/Mvc/Model.zep", 1856); + zephir_throw_exception_debug(&_2$$3, "phalcon/Mvc/Model.zep", 1857); ZEPHIR_MM_RESTORE(); return; } @@ -3029,7 +3029,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getRelated) { if (_5$$4) { zephir_read_property(&_7$$5, this_ptr, SL("related"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_VAR(&result); - zephir_array_fetch(&result, &_7$$5, &lowerAlias, PH_NOISY, "phalcon/Mvc/Model.zep", 1868); + zephir_array_fetch(&result, &_7$$5, &lowerAlias, PH_NOISY, "phalcon/Mvc/Model.zep", 1869); } else { ZEPHIR_CALL_METHOD(&result, &manager, "getrelationrecords", NULL, 0, &relation, this_ptr, arguments); zephir_check_call_status(); @@ -3185,21 +3185,21 @@ PHP_METHOD(Phalcon_Mvc_Model, getUpdatedFields) { zephir_read_property(&_0, this_ptr, SL("oldSnapshot"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&oldSnapshot, &_0); if (UNEXPECTED(!(ZEPHIR_GLOBAL(orm).update_snapshot_on_save))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The 'updateSnapshotOnSave' option must be enabled for this method to work properly", "phalcon/Mvc/Model.zep", 1967); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The 'updateSnapshotOnSave' option must be enabled for this method to work properly", "phalcon/Mvc/Model.zep", 1968); return; } if (UNEXPECTED(Z_TYPE_P(&snapshot) != IS_ARRAY)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The 'keepSnapshots' option must be enabled to track changes", "phalcon/Mvc/Model.zep", 1973); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The 'keepSnapshots' option must be enabled to track changes", "phalcon/Mvc/Model.zep", 1974); return; } zephir_read_property(&_0, this_ptr, SL("dirtyState"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!ZEPHIR_IS_LONG(&_0, 0))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Change checking cannot be performed because the object has not been persisted or is deleted", "phalcon/Mvc/Model.zep", 1982); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Change checking cannot be performed because the object has not been persisted or is deleted", "phalcon/Mvc/Model.zep", 1983); return; } ZEPHIR_INIT_VAR(&updated); array_init(&updated); - zephir_is_iterable(&snapshot, 0, "phalcon/Mvc/Model.zep", 1997); + zephir_is_iterable(&snapshot, 0, "phalcon/Mvc/Model.zep", 1998); if (Z_TYPE_P(&snapshot) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&snapshot), _3, _4, _1) { @@ -3213,11 +3213,11 @@ PHP_METHOD(Phalcon_Mvc_Model, getUpdatedFields) { ZVAL_COPY(&value, _1); _5$$6 = !(zephir_array_isset(&oldSnapshot, &name)); if (!(_5$$6)) { - zephir_array_fetch(&_6$$6, &oldSnapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1992); + zephir_array_fetch(&_6$$6, &oldSnapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1993); _5$$6 = !ZEPHIR_IS_IDENTICAL(&value, &_6$$6); } if (_5$$6) { - zephir_array_append(&updated, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1993); + zephir_array_append(&updated, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1994); } } ZEND_HASH_FOREACH_END(); } else { @@ -3235,11 +3235,11 @@ PHP_METHOD(Phalcon_Mvc_Model, getUpdatedFields) { zephir_check_call_status(); _7$$8 = !(zephir_array_isset(&oldSnapshot, &name)); if (!(_7$$8)) { - zephir_array_fetch(&_8$$8, &oldSnapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1992); + zephir_array_fetch(&_8$$8, &oldSnapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1993); _7$$8 = !ZEPHIR_IS_IDENTICAL(&value, &_8$$8); } if (_7$$8) { - zephir_array_append(&updated, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1993); + zephir_array_append(&updated, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1994); } ZEPHIR_CALL_METHOD(NULL, &snapshot, "next", NULL, 0); zephir_check_call_status(); @@ -3719,7 +3719,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) { zephir_read_property(&_0, this_ptr, SL("dirtyState"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!ZEPHIR_IS_LONG(&_0, 0))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record cannot be refreshed because it does not exist or is deleted", "phalcon/Mvc/Model.zep", 2252); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record cannot be refreshed because it does not exist or is deleted", "phalcon/Mvc/Model.zep", 2253); return; } ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); @@ -3746,7 +3746,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) { ZEPHIR_CALL_METHOD(&_2$$6, this_ptr, "_exists", NULL, 0, &metaData, &readConnection); zephir_check_call_status(); if (UNEXPECTED(!zephir_is_true(&_2$$6))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record cannot be refreshed because it does not exist or is deleted", "phalcon/Mvc/Model.zep", 2277); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record cannot be refreshed because it does not exist or is deleted", "phalcon/Mvc/Model.zep", 2278); return; } zephir_read_property(&_3$$6, this_ptr, SL("uniqueKey"), PH_NOISY_CC | PH_READONLY); @@ -3755,14 +3755,14 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) { zephir_read_property(&_1, this_ptr, SL("uniqueParams"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&uniqueParams, &_1); if (UNEXPECTED(Z_TYPE_P(&uniqueParams) != IS_ARRAY)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record cannot be refreshed because it does not exist or is deleted", "phalcon/Mvc/Model.zep", 2288); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record cannot be refreshed because it does not exist or is deleted", "phalcon/Mvc/Model.zep", 2289); return; } ZEPHIR_INIT_VAR(&fields); array_init(&fields); ZEPHIR_CALL_METHOD(&_4, &metaData, "getattributes", NULL, 0, this_ptr); zephir_check_call_status(); - zephir_is_iterable(&_4, 0, "phalcon/Mvc/Model.zep", 2303); + zephir_is_iterable(&_4, 0, "phalcon/Mvc/Model.zep", 2304); if (Z_TYPE_P(&_4) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_4), _5) { @@ -3771,7 +3771,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) { ZEPHIR_INIT_NVAR(&_7$$9); zephir_create_array(&_7$$9, 1, 0); zephir_array_fast_append(&_7$$9, &attribute); - zephir_array_append(&fields, &_7$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2297); + zephir_array_append(&fields, &_7$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2298); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_4, "rewind", NULL, 0); @@ -3787,7 +3787,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) { ZEPHIR_INIT_NVAR(&_8$$10); zephir_create_array(&_8$$10, 1, 0); zephir_array_fast_append(&_8$$10, &attribute); - zephir_array_append(&fields, &_8$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2297); + zephir_array_append(&fields, &_8$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2298); ZEPHIR_CALL_METHOD(NULL, &_4, "next", NULL, 0); zephir_check_call_status(); } @@ -3951,7 +3951,7 @@ PHP_METHOD(Phalcon_Mvc_Model, save) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_7$$11, "__construct", NULL, 442, this_ptr, &_8$$11); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$11, "phalcon/Mvc/Model.zep", 2452); + zephir_throw_exception_debug(&_7$$11, "phalcon/Mvc/Model.zep", 2453); ZEPHIR_MM_RESTORE(); return; } @@ -4101,7 +4101,7 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 6, &_2$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model.zep", 2573); + zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model.zep", 2574); ZEPHIR_MM_RESTORE(); return; } @@ -4112,7 +4112,7 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) { zephir_check_call_status(); ZEPHIR_CPY_WRT(&manager, &_5$$3); if (UNEXPECTED(Z_TYPE_P(&manager) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The injected service 'modelsManager' is not valid", "phalcon/Mvc/Model.zep", 2589); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The injected service 'modelsManager' is not valid", "phalcon/Mvc/Model.zep", 2590); return; } zephir_update_property_zval(this_ptr, SL("modelsManager"), &manager); @@ -4123,13 +4123,13 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) { if (zephir_is_true(&_5$$3)) { if (zephir_array_isset_string_fetch(&snapshot, &attributes, SL("snapshot"), 1)) { zephir_update_property_zval(this_ptr, SL("snapshot"), &snapshot); - zephir_array_fetch_string(&_7$$7, &attributes, SL("_attributes"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 2605); + zephir_array_fetch_string(&_7$$7, &attributes, SL("_attributes"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 2606); ZEPHIR_CPY_WRT(&attributes, &_7$$7); } else { zephir_update_property_zval(this_ptr, SL("snapshot"), &attributes); } } - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 2617); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 2618); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&attributes), _10$$3, _11$$3, _8$$3) { @@ -4337,7 +4337,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) { if (Z_TYPE_P(columnMap) == IS_ARRAY) { ZEPHIR_INIT_VAR(&snapshot); array_init(&snapshot); - zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 2714); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 2715); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2$$3, _3$$3, _0$$3) { @@ -4361,7 +4361,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) { ZEPHIR_CONCAT_SVS(&_5$$7, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", &_6, 6, &_5$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_4$$7, "phalcon/Mvc/Model.zep", 2694); + zephir_throw_exception_debug(&_4$$7, "phalcon/Mvc/Model.zep", 2695); ZEPHIR_MM_RESTORE(); return; } @@ -4377,7 +4377,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) { ZEPHIR_CONCAT_SVS(&_8$$10, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_7$$10, "__construct", &_6, 6, &_8$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$10, "phalcon/Mvc/Model.zep", 2705); + zephir_throw_exception_debug(&_7$$10, "phalcon/Mvc/Model.zep", 2706); ZEPHIR_MM_RESTORE(); return; } @@ -4411,7 +4411,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) { ZEPHIR_CONCAT_SVS(&_10$$14, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_9$$14, "__construct", &_6, 6, &_10$$14); zephir_check_call_status(); - zephir_throw_exception_debug(&_9$$14, "phalcon/Mvc/Model.zep", 2694); + zephir_throw_exception_debug(&_9$$14, "phalcon/Mvc/Model.zep", 2695); ZEPHIR_MM_RESTORE(); return; } @@ -4427,7 +4427,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) { ZEPHIR_CONCAT_SVS(&_12$$17, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_11$$17, "__construct", &_6, 6, &_12$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_11$$17, "phalcon/Mvc/Model.zep", 2705); + zephir_throw_exception_debug(&_11$$17, "phalcon/Mvc/Model.zep", 2706); ZEPHIR_MM_RESTORE(); return; } @@ -4500,7 +4500,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) { if (Z_TYPE_P(columnMap) == IS_ARRAY) { ZEPHIR_INIT_VAR(&snapshot); array_init(&snapshot); - zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 2779); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 2780); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2$$3, _3$$3, _0$$3) { @@ -4533,7 +4533,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) { ZEPHIR_CONCAT_SVS(&_8$$8, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_7$$8, "__construct", &_9, 6, &_8$$8); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$8, "phalcon/Mvc/Model.zep", 2759); + zephir_throw_exception_debug(&_7$$8, "phalcon/Mvc/Model.zep", 2760); ZEPHIR_MM_RESTORE(); return; } @@ -4549,7 +4549,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) { ZEPHIR_CONCAT_SVS(&_11$$11, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_10$$11, "__construct", &_9, 6, &_11$$11); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$11, "phalcon/Mvc/Model.zep", 2770); + zephir_throw_exception_debug(&_10$$11, "phalcon/Mvc/Model.zep", 2771); ZEPHIR_MM_RESTORE(); return; } @@ -4592,7 +4592,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) { ZEPHIR_CONCAT_SVS(&_15$$16, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_14$$16, "__construct", &_9, 6, &_15$$16); zephir_check_call_status(); - zephir_throw_exception_debug(&_14$$16, "phalcon/Mvc/Model.zep", 2759); + zephir_throw_exception_debug(&_14$$16, "phalcon/Mvc/Model.zep", 2760); ZEPHIR_MM_RESTORE(); return; } @@ -4608,7 +4608,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) { ZEPHIR_CONCAT_SVS(&_17$$19, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_16$$19, "__construct", &_9, 6, &_17$$19); zephir_check_call_status(); - zephir_throw_exception_debug(&_16$$19, "phalcon/Mvc/Model.zep", 2770); + zephir_throw_exception_debug(&_16$$19, "phalcon/Mvc/Model.zep", 2771); ZEPHIR_MM_RESTORE(); return; } @@ -4869,7 +4869,7 @@ PHP_METHOD(Phalcon_Mvc_Model, skipOperation) { * ``` * * @param array parameters - * @return double + * @return double | ResultsetInterface */ PHP_METHOD(Phalcon_Mvc_Model, sum) { @@ -4957,7 +4957,7 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, &metaData, "getattributes", NULL, 0, this_ptr); zephir_check_call_status(); - zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model.zep", 3051); + zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model.zep", 3052); if (Z_TYPE_P(&_0) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_0), _1) { @@ -4982,7 +4982,7 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) { ZEPHIR_CONCAT_SVS(&_7$$7, "Column '", &attribute, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_6$$7, "__construct", &_8, 6, &_7$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$7, "phalcon/Mvc/Model.zep", 3029); + zephir_throw_exception_debug(&_6$$7, "phalcon/Mvc/Model.zep", 3030); ZEPHIR_MM_RESTORE(); return; } @@ -5033,7 +5033,7 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) { ZEPHIR_CONCAT_SVS(&_12$$17, "Column '", &attribute, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_11$$17, "__construct", &_8, 6, &_12$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_11$$17, "phalcon/Mvc/Model.zep", 3029); + zephir_throw_exception_debug(&_11$$17, "phalcon/Mvc/Model.zep", 3030); ZEPHIR_MM_RESTORE(); return; } @@ -5235,7 +5235,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { ZEPHIR_CALL_METHOD(&belongsTo, &manager, "getbelongsto", NULL, 0, this_ptr); zephir_check_call_status(); error = 0; - zephir_is_iterable(&belongsTo, 0, "phalcon/Mvc/Model.zep", 3262); + zephir_is_iterable(&belongsTo, 0, "phalcon/Mvc/Model.zep", 3263); if (Z_TYPE_P(&belongsTo) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&belongsTo), _1) { @@ -5250,7 +5250,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { action = 1; if (zephir_array_isset_string(&foreignKey, SL("action"))) { ZEPHIR_OBS_NVAR(&_3$$5); - zephir_array_fetch_string(&_3$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3153); + zephir_array_fetch_string(&_3$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3154); action = zephir_get_intval(&_3$$5); } if (action != 1) { @@ -5270,7 +5270,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { ZEPHIR_CALL_METHOD(&referencedFields, &relation, "getreferencedfields", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&fields) == IS_ARRAY) { - zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3196); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3197); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _8$$7, _9$$7, _6$$7) { @@ -5284,11 +5284,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { ZVAL_COPY(&field, _6$$7); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_10$$8, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3188); + zephir_array_fetch(&_10$$8, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3189); ZEPHIR_INIT_NVAR(&_11$$8); ZEPHIR_CONCAT_SVSV(&_11$$8, "[", &_10$$8, "] = ?", &position); - zephir_array_append(&conditions, &_11$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3188); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3189); + zephir_array_append(&conditions, &_11$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3189); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3190); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -5308,11 +5308,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { zephir_check_call_status(); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_12$$10, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3188); + zephir_array_fetch(&_12$$10, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3189); ZEPHIR_INIT_NVAR(&_13$$10); ZEPHIR_CONCAT_SVSV(&_13$$10, "[", &_12$$10, "] = ?", &position); - zephir_array_append(&conditions, &_13$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3188); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3189); + zephir_array_append(&conditions, &_13$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3189); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3190); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -5328,15 +5328,15 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_NVAR(&_14$$12); ZEPHIR_CONCAT_SVS(&_14$$12, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_14$$12, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3200); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3201); + zephir_array_append(&conditions, &_14$$12, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3201); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3202); if (Z_TYPE_P(&value) == IS_NULL) { validateWithNulls = 1; } } ZEPHIR_OBS_NVAR(&extraConditions); if (zephir_array_isset_string_fetch(&extraConditions, &foreignKey, SL("conditions"), 0)) { - zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3212); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3213); } if (validateWithNulls) { ZEPHIR_OBS_NVAR(&allowNulls); @@ -5402,7 +5402,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { action = 1; if (zephir_array_isset_string(&foreignKey, SL("action"))) { ZEPHIR_OBS_NVAR(&_24$$24); - zephir_array_fetch_string(&_24$$24, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3153); + zephir_array_fetch_string(&_24$$24, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3154); action = zephir_get_intval(&_24$$24); } if (action != 1) { @@ -5422,7 +5422,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { ZEPHIR_CALL_METHOD(&referencedFields, &relation, "getreferencedfields", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&fields) == IS_ARRAY) { - zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3196); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3197); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _29$$26, _30$$26, _27$$26) { @@ -5436,11 +5436,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { ZVAL_COPY(&field, _27$$26); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_31$$27, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3188); + zephir_array_fetch(&_31$$27, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3189); ZEPHIR_INIT_NVAR(&_32$$27); ZEPHIR_CONCAT_SVSV(&_32$$27, "[", &_31$$27, "] = ?", &position); - zephir_array_append(&conditions, &_32$$27, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3188); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3189); + zephir_array_append(&conditions, &_32$$27, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3189); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3190); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -5460,11 +5460,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { zephir_check_call_status(); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_33$$29, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3188); + zephir_array_fetch(&_33$$29, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3189); ZEPHIR_INIT_NVAR(&_34$$29); ZEPHIR_CONCAT_SVSV(&_34$$29, "[", &_33$$29, "] = ?", &position); - zephir_array_append(&conditions, &_34$$29, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3188); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3189); + zephir_array_append(&conditions, &_34$$29, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3189); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3190); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -5480,15 +5480,15 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_NVAR(&_35$$31); ZEPHIR_CONCAT_SVS(&_35$$31, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_35$$31, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3200); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3201); + zephir_array_append(&conditions, &_35$$31, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3201); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3202); if (Z_TYPE_P(&value) == IS_NULL) { validateWithNulls = 1; } } ZEPHIR_OBS_NVAR(&extraConditions); if (zephir_array_isset_string_fetch(&extraConditions, &foreignKey, SL("conditions"), 0)) { - zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3212); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3213); } if (validateWithNulls) { ZEPHIR_OBS_NVAR(&allowNulls); @@ -5614,7 +5614,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { ZEPHIR_CPY_WRT(&manager, &_0); ZEPHIR_CALL_METHOD(&relations, &manager, "gethasoneandhasmany", NULL, 0, this_ptr); zephir_check_call_status(); - zephir_is_iterable(&relations, 0, "phalcon/Mvc/Model.zep", 3382); + zephir_is_iterable(&relations, 0, "phalcon/Mvc/Model.zep", 3383); if (Z_TYPE_P(&relations) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relations), _1) { @@ -5632,7 +5632,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { } if (_3$$3) { ZEPHIR_OBS_NVAR(&_4$$5); - zephir_array_fetch_string(&_4$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3314); + zephir_array_fetch_string(&_4$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3315); action = zephir_get_intval(&_4$$5); } if (action != 2) { @@ -5651,7 +5651,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { ZEPHIR_INIT_NVAR(&bindParams); array_init(&bindParams); if (Z_TYPE_P(&fields) == IS_ARRAY) { - zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3347); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3348); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _9$$7, _10$$7, _7$$7) { @@ -5665,11 +5665,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { ZVAL_COPY(&field, _7$$7); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_11$$8, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3344); + zephir_array_fetch(&_11$$8, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3345); ZEPHIR_INIT_NVAR(&_12$$8); ZEPHIR_CONCAT_SVSV(&_12$$8, "[", &_11$$8, "] = ?", &position); - zephir_array_append(&conditions, &_12$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3344); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3345); + zephir_array_append(&conditions, &_12$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3345); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3346); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &fields, "rewind", NULL, 0); @@ -5686,11 +5686,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { zephir_check_call_status(); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_13$$9, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3344); + zephir_array_fetch(&_13$$9, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3345); ZEPHIR_INIT_NVAR(&_14$$9); ZEPHIR_CONCAT_SVSV(&_14$$9, "[", &_13$$9, "] = ?", &position); - zephir_array_append(&conditions, &_14$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3344); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3345); + zephir_array_append(&conditions, &_14$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3345); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3346); ZEPHIR_CALL_METHOD(NULL, &fields, "next", NULL, 0); zephir_check_call_status(); } @@ -5702,12 +5702,12 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_NVAR(&_15$$10); ZEPHIR_CONCAT_SVS(&_15$$10, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_15$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3350); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3351); + zephir_array_append(&conditions, &_15$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3351); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3352); } ZEPHIR_OBS_NVAR(&extraConditions); if (zephir_array_isset_string_fetch(&extraConditions, &foreignKey, SL("conditions"), 0)) { - zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3358); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3359); } ZEPHIR_INIT_NVAR(&_16$$3); zephir_create_array(&_16$$3, 2, 0); @@ -5746,7 +5746,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { } if (_19$$13) { ZEPHIR_OBS_NVAR(&_20$$15); - zephir_array_fetch_string(&_20$$15, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3314); + zephir_array_fetch_string(&_20$$15, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3315); action = zephir_get_intval(&_20$$15); } if (action != 2) { @@ -5765,7 +5765,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { ZEPHIR_INIT_NVAR(&bindParams); array_init(&bindParams); if (Z_TYPE_P(&fields) == IS_ARRAY) { - zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3347); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3348); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _25$$17, _26$$17, _23$$17) { @@ -5779,11 +5779,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { ZVAL_COPY(&field, _23$$17); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_27$$18, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3344); + zephir_array_fetch(&_27$$18, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3345); ZEPHIR_INIT_NVAR(&_28$$18); ZEPHIR_CONCAT_SVSV(&_28$$18, "[", &_27$$18, "] = ?", &position); - zephir_array_append(&conditions, &_28$$18, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3344); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3345); + zephir_array_append(&conditions, &_28$$18, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3345); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3346); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &fields, "rewind", NULL, 0); @@ -5800,11 +5800,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { zephir_check_call_status(); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_29$$19, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3344); + zephir_array_fetch(&_29$$19, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3345); ZEPHIR_INIT_NVAR(&_30$$19); ZEPHIR_CONCAT_SVSV(&_30$$19, "[", &_29$$19, "] = ?", &position); - zephir_array_append(&conditions, &_30$$19, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3344); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3345); + zephir_array_append(&conditions, &_30$$19, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3345); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3346); ZEPHIR_CALL_METHOD(NULL, &fields, "next", NULL, 0); zephir_check_call_status(); } @@ -5816,12 +5816,12 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_NVAR(&_31$$20); ZEPHIR_CONCAT_SVS(&_31$$20, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_31$$20, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3350); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3351); + zephir_array_append(&conditions, &_31$$20, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3351); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3352); } ZEPHIR_OBS_NVAR(&extraConditions); if (zephir_array_isset_string_fetch(&extraConditions, &foreignKey, SL("conditions"), 0)) { - zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3358); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3359); } ZEPHIR_INIT_NVAR(&_32$$13); zephir_create_array(&_32$$13, 2, 0); @@ -5911,7 +5911,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { ZEPHIR_CALL_METHOD(&relations, &manager, "gethasoneandhasmany", NULL, 0, this_ptr); zephir_check_call_status(); error = 0; - zephir_is_iterable(&relations, 0, "phalcon/Mvc/Model.zep", 3509); + zephir_is_iterable(&relations, 0, "phalcon/Mvc/Model.zep", 3510); if (Z_TYPE_P(&relations) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relations), _1) { @@ -5929,7 +5929,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { } if (_3$$3) { ZEPHIR_OBS_NVAR(&_4$$5); - zephir_array_fetch_string(&_4$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3428); + zephir_array_fetch_string(&_4$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3429); action = zephir_get_intval(&_4$$5); } if (action != 1) { @@ -5948,7 +5948,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { ZEPHIR_INIT_NVAR(&bindParams); array_init(&bindParams); if (Z_TYPE_P(&fields) == IS_ARRAY) { - zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3462); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3463); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _8$$7, _9$$7, _6$$7) { @@ -5962,11 +5962,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { ZVAL_COPY(&field, _6$$7); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_10$$8, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3459); + zephir_array_fetch(&_10$$8, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3460); ZEPHIR_INIT_NVAR(&_11$$8); ZEPHIR_CONCAT_SVSV(&_11$$8, "[", &_10$$8, "] = ?", &position); - zephir_array_append(&conditions, &_11$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3459); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3460); + zephir_array_append(&conditions, &_11$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3460); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3461); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &fields, "rewind", NULL, 0); @@ -5983,11 +5983,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { zephir_check_call_status(); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_12$$9, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3459); + zephir_array_fetch(&_12$$9, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3460); ZEPHIR_INIT_NVAR(&_13$$9); ZEPHIR_CONCAT_SVSV(&_13$$9, "[", &_12$$9, "] = ?", &position); - zephir_array_append(&conditions, &_13$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3459); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3460); + zephir_array_append(&conditions, &_13$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3460); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3461); ZEPHIR_CALL_METHOD(NULL, &fields, "next", NULL, 0); zephir_check_call_status(); } @@ -5999,12 +5999,12 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_NVAR(&_14$$10); ZEPHIR_CONCAT_SVS(&_14$$10, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_14$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3465); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3466); + zephir_array_append(&conditions, &_14$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3466); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3467); } ZEPHIR_OBS_NVAR(&extraConditions); if (zephir_array_isset_string_fetch(&extraConditions, &foreignKey, SL("conditions"), 0)) { - zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3473); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3474); } ZEPHIR_INIT_NVAR(&_16$$3); zephir_create_array(&_16$$3, 2, 0); @@ -6055,7 +6055,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { } if (_22$$14) { ZEPHIR_OBS_NVAR(&_23$$16); - zephir_array_fetch_string(&_23$$16, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3428); + zephir_array_fetch_string(&_23$$16, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3429); action = zephir_get_intval(&_23$$16); } if (action != 1) { @@ -6074,7 +6074,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { ZEPHIR_INIT_NVAR(&bindParams); array_init(&bindParams); if (Z_TYPE_P(&fields) == IS_ARRAY) { - zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3462); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3463); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _27$$18, _28$$18, _25$$18) { @@ -6088,11 +6088,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { ZVAL_COPY(&field, _25$$18); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_29$$19, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3459); + zephir_array_fetch(&_29$$19, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3460); ZEPHIR_INIT_NVAR(&_30$$19); ZEPHIR_CONCAT_SVSV(&_30$$19, "[", &_29$$19, "] = ?", &position); - zephir_array_append(&conditions, &_30$$19, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3459); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3460); + zephir_array_append(&conditions, &_30$$19, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3460); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3461); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &fields, "rewind", NULL, 0); @@ -6109,11 +6109,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { zephir_check_call_status(); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_31$$20, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3459); + zephir_array_fetch(&_31$$20, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3460); ZEPHIR_INIT_NVAR(&_32$$20); ZEPHIR_CONCAT_SVSV(&_32$$20, "[", &_31$$20, "] = ?", &position); - zephir_array_append(&conditions, &_32$$20, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3459); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3460); + zephir_array_append(&conditions, &_32$$20, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3460); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3461); ZEPHIR_CALL_METHOD(NULL, &fields, "next", NULL, 0); zephir_check_call_status(); } @@ -6125,12 +6125,12 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_NVAR(&_33$$21); ZEPHIR_CONCAT_SVS(&_33$$21, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_33$$21, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3465); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3466); + zephir_array_append(&conditions, &_33$$21, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3466); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3467); } ZEPHIR_OBS_NVAR(&extraConditions); if (zephir_array_isset_string_fetch(&extraConditions, &foreignKey, SL("conditions"), 0)) { - zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3473); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3474); } ZEPHIR_INIT_NVAR(&_35$$14); zephir_create_array(&_35$$14, 2, 0); @@ -6290,7 +6290,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_INIT_NVAR(&columnMap); ZVAL_NULL(&columnMap); } - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 3623); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 3624); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _1) { @@ -6305,7 +6305,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_CONCAT_SVS(&_4$$7, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", &_5, 6, &_4$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 3565); + zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 3566); ZEPHIR_MM_RESTORE(); return; } @@ -6323,9 +6323,9 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { if (_6$$11) { ZEPHIR_CALL_METHOD(&value, connection, "getdefaultvalue", &_7, 0); zephir_check_call_status(); - zephir_array_fetch(&_8$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3584); + zephir_array_fetch(&_8$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3585); zephir_array_update_zval(&snapshot, &attributeField, &_8$$12, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_9$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3585); + zephir_array_fetch(&_9$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3586); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_9$$12, PH_COPY | PH_SEPARATE); } else { zephir_array_update_zval(&snapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); @@ -6338,28 +6338,28 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_CONCAT_SVS(&_11$$14, "Column '", &field, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_10$$14, "__construct", &_5, 6, &_11$$14); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$14, "phalcon/Mvc/Model.zep", 3596); + zephir_throw_exception_debug(&_10$$14, "phalcon/Mvc/Model.zep", 3597); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3599); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3600); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3601); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3600); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3601); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3602); } else { if (zephir_array_isset(&defaultValues, &field)) { ZEPHIR_CALL_METHOD(&_12$$16, connection, "getdefaultvalue", &_13, 0); zephir_check_call_status(); - zephir_array_append(&values, &_12$$16, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3604); - zephir_array_fetch(&_14$$16, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3606); + zephir_array_append(&values, &_12$$16, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3605); + zephir_array_fetch(&_14$$16, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3607); zephir_array_update_zval(&snapshot, &attributeField, &_14$$16, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_15$$16, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3607); + zephir_array_fetch(&_15$$16, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3608); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_15$$16, PH_COPY | PH_SEPARATE); } else { - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3609); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3610); zephir_array_update_zval(&snapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3613); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3614); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3614); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3615); } } } @@ -6384,7 +6384,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_CONCAT_SVS(&_17$$20, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_16$$20, "__construct", &_5, 6, &_17$$20); zephir_check_call_status(); - zephir_throw_exception_debug(&_16$$20, "phalcon/Mvc/Model.zep", 3565); + zephir_throw_exception_debug(&_16$$20, "phalcon/Mvc/Model.zep", 3566); ZEPHIR_MM_RESTORE(); return; } @@ -6402,9 +6402,9 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { if (_18$$24) { ZEPHIR_CALL_METHOD(&value, connection, "getdefaultvalue", &_19, 0); zephir_check_call_status(); - zephir_array_fetch(&_20$$25, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3584); + zephir_array_fetch(&_20$$25, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3585); zephir_array_update_zval(&snapshot, &attributeField, &_20$$25, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_21$$25, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3585); + zephir_array_fetch(&_21$$25, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3586); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_21$$25, PH_COPY | PH_SEPARATE); } else { zephir_array_update_zval(&snapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); @@ -6417,28 +6417,28 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_CONCAT_SVS(&_23$$27, "Column '", &field, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_22$$27, "__construct", &_5, 6, &_23$$27); zephir_check_call_status(); - zephir_throw_exception_debug(&_22$$27, "phalcon/Mvc/Model.zep", 3596); + zephir_throw_exception_debug(&_22$$27, "phalcon/Mvc/Model.zep", 3597); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3599); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3600); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3601); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3600); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3601); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3602); } else { if (zephir_array_isset(&defaultValues, &field)) { ZEPHIR_CALL_METHOD(&_24$$29, connection, "getdefaultvalue", &_25, 0); zephir_check_call_status(); - zephir_array_append(&values, &_24$$29, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3604); - zephir_array_fetch(&_26$$29, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3606); + zephir_array_append(&values, &_24$$29, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3605); + zephir_array_fetch(&_26$$29, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3607); zephir_array_update_zval(&snapshot, &attributeField, &_26$$29, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_27$$29, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3607); + zephir_array_fetch(&_27$$29, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3608); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_27$$29, PH_COPY | PH_SEPARATE); } else { - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3609); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3610); zephir_array_update_zval(&snapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3613); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3614); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3614); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3615); } } } @@ -6454,7 +6454,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { zephir_check_call_status(); useExplicitIdentity = zephir_get_boolval(&_28$$31); if (useExplicitIdentity) { - zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3633); + zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3634); } if (Z_TYPE_P(&columnMap) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&attributeField); @@ -6465,7 +6465,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_CONCAT_SVS(&_30$$34, "Identity column '", identityField, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_29$$34, "__construct", &_5, 6, &_30$$34); zephir_check_call_status(); - zephir_throw_exception_debug(&_29$$34, "phalcon/Mvc/Model.zep", 3643); + zephir_throw_exception_debug(&_29$$34, "phalcon/Mvc/Model.zep", 3644); ZEPHIR_MM_RESTORE(); return; } @@ -6480,12 +6480,12 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { } if (_31$$36) { if (useExplicitIdentity) { - zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3655); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3655); + zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3656); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3656); } } else { if (!(useExplicitIdentity)) { - zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3663); + zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3664); } ZEPHIR_OBS_NVAR(&bindType); if (UNEXPECTED(!(zephir_array_isset_fetch(&bindType, &bindDataTypes, identityField, 0)))) { @@ -6495,23 +6495,23 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_CONCAT_SVS(&_33$$41, "Identity column '", identityField, "' isn\\'t part of the table columns"); ZEPHIR_CALL_METHOD(NULL, &_32$$41, "__construct", &_5, 6, &_33$$41); zephir_check_call_status(); - zephir_throw_exception_debug(&_32$$41, "phalcon/Mvc/Model.zep", 3672); + zephir_throw_exception_debug(&_32$$41, "phalcon/Mvc/Model.zep", 3673); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3675); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3676); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3676); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3677); } } else { if (useExplicitIdentity) { - zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3680); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3681); + zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3681); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3682); } } } if (Z_TYPE_P(table) == IS_ARRAY) { - zephir_array_fetch_long(&_34$$44, table, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3690); - zephir_array_fetch_long(&_35$$44, table, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3690); + zephir_array_fetch_long(&_34$$44, table, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3691); + zephir_array_fetch_long(&_35$$44, table, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3691); ZEPHIR_INIT_VAR(&_36$$44); ZEPHIR_CONCAT_VSV(&_36$$44, &_34$$44, ".", &_35$$44); ZEPHIR_CPY_WRT(table, &_36$$44); @@ -6557,7 +6557,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { zephir_update_property_zval(this_ptr, SL("uniqueParams"), &__$null); } if (zephir_is_true(&success)) { - zephir_is_iterable(&unsetDefaultValues, 0, "phalcon/Mvc/Model.zep", 3751); + zephir_is_iterable(&unsetDefaultValues, 0, "phalcon/Mvc/Model.zep", 3752); if (Z_TYPE_P(&unsetDefaultValues) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&unsetDefaultValues), _43$$52, _44$$52, _41$$52) { @@ -6726,7 +6726,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_INIT_NVAR(&columnMap); ZVAL_NULL(&columnMap); } - zephir_is_iterable(&nonPrimary, 0, "phalcon/Mvc/Model.zep", 3927); + zephir_is_iterable(&nonPrimary, 0, "phalcon/Mvc/Model.zep", 3928); if (Z_TYPE_P(&nonPrimary) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&nonPrimary), _2) { @@ -6742,7 +6742,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_5$$10, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_4$$10, "__construct", &_6, 6, &_5$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_4$$10, "phalcon/Mvc/Model.zep", 3815); + zephir_throw_exception_debug(&_4$$10, "phalcon/Mvc/Model.zep", 3816); ZEPHIR_MM_RESTORE(); return; } @@ -6759,16 +6759,16 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_8$$13, "Column '", &field, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_7$$13, "__construct", &_6, 6, &_8$$13); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$13, "phalcon/Mvc/Model.zep", 3829); + zephir_throw_exception_debug(&_7$$13, "phalcon/Mvc/Model.zep", 3830); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_OBS_NVAR(&value); if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { if (!(useDynamicUpdate)) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3841); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3842); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3843); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3842); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3843); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3844); } else { ZEPHIR_OBS_NVAR(&snapshotValue); if (!(zephir_array_isset_fetch(&snapshotValue, &snapshot, &attributeField, 0))) { @@ -6788,7 +6788,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_10$$23, "Column '", &field, "' have not defined a data type"); ZEPHIR_CALL_METHOD(NULL, &_9$$23, "__construct", &_6, 6, &_10$$23); zephir_check_call_status(); - zephir_throw_exception_debug(&_9$$23, "phalcon/Mvc/Model.zep", 3868); + zephir_throw_exception_debug(&_9$$23, "phalcon/Mvc/Model.zep", 3869); ZEPHIR_MM_RESTORE(); return; } @@ -6818,17 +6818,17 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { } } if (changed) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3907); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3908); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3909); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3908); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3909); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3910); } } zephir_array_update_zval(&newSnapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } else { zephir_array_update_zval(&newSnapshot, &attributeField, &__$null, PH_COPY | PH_SEPARATE); - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3917); - zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3918); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3919); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3918); + zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3919); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3920); } } } ZEND_HASH_FOREACH_END(); @@ -6853,7 +6853,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_17$$33, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_16$$33, "__construct", &_6, 6, &_17$$33); zephir_check_call_status(); - zephir_throw_exception_debug(&_16$$33, "phalcon/Mvc/Model.zep", 3815); + zephir_throw_exception_debug(&_16$$33, "phalcon/Mvc/Model.zep", 3816); ZEPHIR_MM_RESTORE(); return; } @@ -6870,16 +6870,16 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_19$$36, "Column '", &field, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_18$$36, "__construct", &_6, 6, &_19$$36); zephir_check_call_status(); - zephir_throw_exception_debug(&_18$$36, "phalcon/Mvc/Model.zep", 3829); + zephir_throw_exception_debug(&_18$$36, "phalcon/Mvc/Model.zep", 3830); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_OBS_NVAR(&value); if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { if (!(useDynamicUpdate)) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3841); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3842); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3843); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3842); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3843); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3844); } else { ZEPHIR_OBS_NVAR(&snapshotValue); if (!(zephir_array_isset_fetch(&snapshotValue, &snapshot, &attributeField, 0))) { @@ -6899,7 +6899,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_21$$46, "Column '", &field, "' have not defined a data type"); ZEPHIR_CALL_METHOD(NULL, &_20$$46, "__construct", &_6, 6, &_21$$46); zephir_check_call_status(); - zephir_throw_exception_debug(&_20$$46, "phalcon/Mvc/Model.zep", 3868); + zephir_throw_exception_debug(&_20$$46, "phalcon/Mvc/Model.zep", 3869); ZEPHIR_MM_RESTORE(); return; } @@ -6929,17 +6929,17 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { } } if (changed) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3907); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3908); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3909); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3908); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3909); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3910); } } zephir_array_update_zval(&newSnapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } else { zephir_array_update_zval(&newSnapshot, &attributeField, &__$null, PH_COPY | PH_SEPARATE); - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3917); - zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3918); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3919); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3918); + zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3919); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3920); } } ZEPHIR_CALL_METHOD(NULL, &nonPrimary, "next", NULL, 0); @@ -6963,12 +6963,12 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CALL_METHOD(&primaryKeys, metaData, "getprimarykeyattributes", NULL, 0, this_ptr); zephir_check_call_status(); if (UNEXPECTED(!(zephir_fast_count_int(&primaryKeys)))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A primary key must be defined in the model in order to perform the operation", "phalcon/Mvc/Model.zep", 3951); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A primary key must be defined in the model in order to perform the operation", "phalcon/Mvc/Model.zep", 3952); return; } ZEPHIR_INIT_NVAR(&uniqueParams); array_init(&uniqueParams); - zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 3978); + zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 3979); if (Z_TYPE_P(&primaryKeys) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&primaryKeys), _26$$55) { @@ -6983,7 +6983,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_29$$59, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_28$$59, "__construct", &_6, 6, &_29$$59); zephir_check_call_status(); - zephir_throw_exception_debug(&_28$$59, "phalcon/Mvc/Model.zep", 3964); + zephir_throw_exception_debug(&_28$$59, "phalcon/Mvc/Model.zep", 3965); ZEPHIR_MM_RESTORE(); return; } @@ -6993,10 +6993,10 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_OBS_NVAR(&value); if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { zephir_array_update_zval(&newSnapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); - zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3972); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3973); } else { zephir_array_update_zval(&newSnapshot, &attributeField, &__$null, PH_COPY | PH_SEPARATE); - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3975); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3976); } } ZEND_HASH_FOREACH_END(); } else { @@ -7019,7 +7019,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_31$$65, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_30$$65, "__construct", &_6, 6, &_31$$65); zephir_check_call_status(); - zephir_throw_exception_debug(&_30$$65, "phalcon/Mvc/Model.zep", 3964); + zephir_throw_exception_debug(&_30$$65, "phalcon/Mvc/Model.zep", 3965); ZEPHIR_MM_RESTORE(); return; } @@ -7029,10 +7029,10 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_OBS_NVAR(&value); if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { zephir_array_update_zval(&newSnapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); - zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3972); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3973); } else { zephir_array_update_zval(&newSnapshot, &attributeField, &__$null, PH_COPY | PH_SEPARATE); - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3975); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3976); } ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "next", NULL, 0); zephir_check_call_status(); @@ -7041,8 +7041,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_INIT_NVAR(&field); } if (Z_TYPE_P(table) == IS_ARRAY) { - zephir_array_fetch_long(&_32$$69, table, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3984); - zephir_array_fetch_long(&_33$$69, table, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3984); + zephir_array_fetch_long(&_32$$69, table, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3985); + zephir_array_fetch_long(&_33$$69, table, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3985); ZEPHIR_INIT_VAR(&_34$$69); ZEPHIR_CONCAT_VSV(&_34$$69, &_32$$69, ".", &_33$$69); ZEPHIR_CPY_WRT(table, &_34$$69); @@ -7170,7 +7170,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { array_init(&uniqueParams); ZEPHIR_INIT_NVAR(&uniqueTypes); array_init(&uniqueTypes); - zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 4106); + zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 4107); if (Z_TYPE_P(&primaryKeys) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&primaryKeys), _1$$3) { @@ -7185,7 +7185,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { ZEPHIR_CONCAT_SVS(&_4$$9, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_3$$9, "__construct", &_5, 6, &_4$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$9, "phalcon/Mvc/Model.zep", 4065); + zephir_throw_exception_debug(&_3$$9, "phalcon/Mvc/Model.zep", 4066); ZEPHIR_MM_RESTORE(); return; } @@ -7203,9 +7203,9 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { if (_6$$11) { numberEmpty++; } - zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4086); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4087); } else { - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4088); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4089); numberEmpty++; } ZEPHIR_OBS_NVAR(&type); @@ -7216,16 +7216,16 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { ZEPHIR_CONCAT_SVS(&_8$$14, "Column '", &field, "' isn't part of the table columns"); ZEPHIR_CALL_METHOD(NULL, &_7$$14, "__construct", &_5, 6, &_8$$14); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$14, "phalcon/Mvc/Model.zep", 4095); + zephir_throw_exception_debug(&_7$$14, "phalcon/Mvc/Model.zep", 4096); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4098); + zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4099); ZEPHIR_CALL_METHOD(&_9$$7, connection, "escapeidentifier", &_10, 0, &field); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_11$$7); ZEPHIR_CONCAT_VS(&_11$$7, &_9$$7, " = ?"); - zephir_array_append(&wherePk, &_11$$7, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4099); + zephir_array_append(&wherePk, &_11$$7, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4100); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "rewind", NULL, 0); @@ -7247,7 +7247,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { ZEPHIR_CONCAT_SVS(&_13$$17, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_12$$17, "__construct", &_5, 6, &_13$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_12$$17, "phalcon/Mvc/Model.zep", 4065); + zephir_throw_exception_debug(&_12$$17, "phalcon/Mvc/Model.zep", 4066); ZEPHIR_MM_RESTORE(); return; } @@ -7265,9 +7265,9 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { if (_14$$19) { numberEmpty++; } - zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4086); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4087); } else { - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4088); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4089); numberEmpty++; } ZEPHIR_OBS_NVAR(&type); @@ -7278,16 +7278,16 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { ZEPHIR_CONCAT_SVS(&_16$$22, "Column '", &field, "' isn't part of the table columns"); ZEPHIR_CALL_METHOD(NULL, &_15$$22, "__construct", &_5, 6, &_16$$22); zephir_check_call_status(); - zephir_throw_exception_debug(&_15$$22, "phalcon/Mvc/Model.zep", 4095); + zephir_throw_exception_debug(&_15$$22, "phalcon/Mvc/Model.zep", 4096); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4098); + zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4099); ZEPHIR_CALL_METHOD(&_17$$15, connection, "escapeidentifier", &_18, 0, &field); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_19$$15); ZEPHIR_CONCAT_VS(&_19$$15, &_17$$15, " = ?"); - zephir_array_append(&wherePk, &_19$$15, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4099); + zephir_array_append(&wherePk, &_19$$15, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4100); ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "next", NULL, 0); zephir_check_call_status(); } @@ -7338,7 +7338,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { ZVAL_NULL(&_25); ZEPHIR_CALL_METHOD(&num, connection, "fetchone", NULL, 0, &_24, &_25, &uniqueParams, &uniqueTypes); zephir_check_call_status(); - zephir_array_fetch_string(&_26, &num, SL("rowcount"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4160); + zephir_array_fetch_string(&_26, &num, SL("rowcount"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4161); if (zephir_is_true(&_26)) { ZEPHIR_INIT_ZVAL_NREF(_27$$30); ZVAL_LONG(&_27$$30, 0); @@ -7526,7 +7526,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _groupResult) { ZEPHIR_INIT_VAR(¶ms); array_init(¶ms); if (Z_TYPE_P(parameters) != IS_NULL) { - zephir_array_append(¶ms, parameters, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4260); + zephir_array_append(¶ms, parameters, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4261); } } else { ZEPHIR_CPY_WRT(¶ms, parameters); @@ -7669,7 +7669,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _invokeFinder) { ZEPHIR_CONCAT_SVS(&_4$$7, "The static method '", &method, "' requires one argument"); ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", NULL, 6, &_4$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 4379); + zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 4380); ZEPHIR_MM_RESTORE(); return; } @@ -7701,7 +7701,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _invokeFinder) { ZEPHIR_CONCAT_SVS(&_6$$13, "Cannot resolve attribute '", &extraMethod, "' in the model"); ZEPHIR_CALL_METHOD(NULL, &_5$$13, "__construct", NULL, 6, &_6$$13); zephir_check_call_status(); - zephir_throw_exception_debug(&_5$$13, "phalcon/Mvc/Model.zep", 4416); + zephir_throw_exception_debug(&_5$$13, "phalcon/Mvc/Model.zep", 4417); ZEPHIR_MM_RESTORE(); return; } @@ -7907,7 +7907,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSave) { ZEPHIR_CALL_METHOD(&emptyStringValues, metaData, "getemptystringattributes", NULL, 0, this_ptr); zephir_check_call_status(); error = 0; - zephir_is_iterable(¬Null, 0, "phalcon/Mvc/Model.zep", 4651); + zephir_is_iterable(¬Null, 0, "phalcon/Mvc/Model.zep", 4652); if (Z_TYPE_P(¬Null) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(¬Null), _4$$11) { @@ -7923,7 +7923,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSave) { ZEPHIR_CONCAT_SVS(&_7$$19, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_6$$19, "__construct", &_8, 6, &_7$$19); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$19, "phalcon/Mvc/Model.zep", 4575); + zephir_throw_exception_debug(&_6$$19, "phalcon/Mvc/Model.zep", 4576); ZEPHIR_MM_RESTORE(); return; } @@ -7948,7 +7948,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSave) { if (_10$$27) { _11$$27 = !(zephir_array_isset(&defaultValues, &field)); if (!(_11$$27)) { - zephir_array_fetch(&_12$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4605); + zephir_array_fetch(&_12$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4606); _11$$27 = !ZEPHIR_IS_IDENTICAL(&value, &_12$$27); } _10$$27 = _11$$27; @@ -8011,7 +8011,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSave) { ZEPHIR_CONCAT_SVS(&_18$$39, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_17$$39, "__construct", &_8, 6, &_18$$39); zephir_check_call_status(); - zephir_throw_exception_debug(&_17$$39, "phalcon/Mvc/Model.zep", 4575); + zephir_throw_exception_debug(&_17$$39, "phalcon/Mvc/Model.zep", 4576); ZEPHIR_MM_RESTORE(); return; } @@ -8036,7 +8036,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSave) { if (_20$$47) { _21$$47 = !(zephir_array_isset(&defaultValues, &field)); if (!(_21$$47)) { - zephir_array_fetch(&_22$$47, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4605); + zephir_array_fetch(&_22$$47, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4606); _21$$47 = !ZEPHIR_IS_IDENTICAL(&value, &_22$$47); } _20$$47 = _21$$47; @@ -8234,7 +8234,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) { ZEPHIR_CALL_METHOD(&_1, this_ptr, "getmodelsmanager", NULL, 0); zephir_check_call_status(); ZEPHIR_CPY_WRT(&manager, &_1); - zephir_is_iterable(related, 0, "phalcon/Mvc/Model.zep", 4828); + zephir_is_iterable(related, 0, "phalcon/Mvc/Model.zep", 4829); if (Z_TYPE_P(related) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(related), _4, _5, _2) { @@ -8261,7 +8261,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_10, 0, &_9$$6); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects can be stored as part of belongs-to relations", "phalcon/Mvc/Model.zep", 4771); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects can be stored as part of belongs-to relations", "phalcon/Mvc/Model.zep", 4772); return; } ZEPHIR_CALL_METHOD(&columns, &relation, "getfields", &_11, 0); @@ -8278,7 +8278,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_15, 0, &_14$$7); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4781); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4782); return; } zephir_read_property(&_16$$5, &record, SL("dirtyState"), PH_NOISY_CC | PH_READONLY); @@ -8291,7 +8291,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) { if (_17$$5) { ZEPHIR_CALL_METHOD(&_19$$8, &record, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_19$$8, 0, "phalcon/Mvc/Model.zep", 4814); + zephir_is_iterable(&_19$$8, 0, "phalcon/Mvc/Model.zep", 4815); if (Z_TYPE_P(&_19$$8) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_19$$8), _20$$8) { @@ -8375,7 +8375,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_31, 0, &_30$$16); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects can be stored as part of belongs-to relations", "phalcon/Mvc/Model.zep", 4771); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects can be stored as part of belongs-to relations", "phalcon/Mvc/Model.zep", 4772); return; } ZEPHIR_CALL_METHOD(&columns, &relation, "getfields", &_11, 0); @@ -8392,7 +8392,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_33, 0, &_32$$17); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4781); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4782); return; } zephir_read_property(&_34$$15, &record, SL("dirtyState"), PH_NOISY_CC | PH_READONLY); @@ -8405,7 +8405,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) { if (_35$$15) { ZEPHIR_CALL_METHOD(&_37$$18, &record, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_37$$18, 0, "phalcon/Mvc/Model.zep", 4814); + zephir_is_iterable(&_37$$18, 0, "phalcon/Mvc/Model.zep", 4815); if (Z_TYPE_P(&_37$$18) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_37$$18), _38$$18) { @@ -8649,7 +8649,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmodelsmanager", NULL, 0); zephir_check_call_status(); ZEPHIR_CPY_WRT(&manager, &_0); - zephir_is_iterable(related, 0, "phalcon/Mvc/Model.zep", 5075); + zephir_is_iterable(related, 0, "phalcon/Mvc/Model.zep", 5076); if (Z_TYPE_P(related) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(related), _3, _4, _1) { @@ -8682,7 +8682,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_11, 0, &_10$$6); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects/arrays can be stored as part of has-many/has-one/has-one-through/has-many-to-many relations", "phalcon/Mvc/Model.zep", 4888); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects/arrays can be stored as part of has-many/has-one/has-one-through/has-many-to-many relations", "phalcon/Mvc/Model.zep", 4889); return; } ZEPHIR_CALL_METHOD(&columns, &relation, "getfields", &_12, 0); @@ -8699,7 +8699,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_16, 0, &_15$$7); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4898); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4899); return; } if (Z_TYPE_P(&record) == IS_OBJECT) { @@ -8724,7 +8724,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { ZEPHIR_CONCAT_SVS(&_20$$10, "The column '", &columns, "' needs to be present in the model"); ZEPHIR_CALL_METHOD(NULL, &_19$$10, "__construct", &_21, 6, &_20$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_19$$10, "phalcon/Mvc/Model.zep", 4915); + zephir_throw_exception_debug(&_19$$10, "phalcon/Mvc/Model.zep", 4916); ZEPHIR_MM_RESTORE(); return; } @@ -8739,7 +8739,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { ZEPHIR_CALL_METHOD(&intermediateReferencedFields, &relation, "getintermediatereferencedfields", &_26, 0); zephir_check_call_status(); } - zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5061); + zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5062); if (Z_TYPE_P(&relatedRecords) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relatedRecords), _27$$4) { @@ -8754,7 +8754,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_29$$12))) { ZEPHIR_CALL_METHOD(&_30$$14, &recordAfter, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_30$$14, 0, "phalcon/Mvc/Model.zep", 4974); + zephir_is_iterable(&_30$$14, 0, "phalcon/Mvc/Model.zep", 4975); if (Z_TYPE_P(&_30$$14) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_30$$14), _31$$14) { @@ -8837,7 +8837,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_43$$19))) { ZEPHIR_CALL_METHOD(&_44$$22, &intermediateModel, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_44$$22, 0, "phalcon/Mvc/Model.zep", 5055); + zephir_is_iterable(&_44$$22, 0, "phalcon/Mvc/Model.zep", 5056); if (Z_TYPE_P(&_44$$22) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_44$$22), _45$$22) { @@ -8909,7 +8909,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_51$$27))) { ZEPHIR_CALL_METHOD(&_52$$29, &recordAfter, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_52$$29, 0, "phalcon/Mvc/Model.zep", 4974); + zephir_is_iterable(&_52$$29, 0, "phalcon/Mvc/Model.zep", 4975); if (Z_TYPE_P(&_52$$29) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_52$$29), _53$$29) { @@ -8992,7 +8992,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_64$$34))) { ZEPHIR_CALL_METHOD(&_65$$37, &intermediateModel, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_65$$37, 0, "phalcon/Mvc/Model.zep", 5055); + zephir_is_iterable(&_65$$37, 0, "phalcon/Mvc/Model.zep", 5056); if (Z_TYPE_P(&_65$$37) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_65$$37), _66$$37) { @@ -9063,7 +9063,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { ZEPHIR_CONCAT_SVSVS(&_75$$43, "There are no defined relations for the model '", &className, "' using alias '", &name, "'"); ZEPHIR_CALL_METHOD(NULL, &_74$$43, "__construct", &_21, 6, &_75$$43); zephir_check_call_status(); - zephir_throw_exception_debug(&_74$$43, "phalcon/Mvc/Model.zep", 5067); + zephir_throw_exception_debug(&_74$$43, "phalcon/Mvc/Model.zep", 5068); ZEPHIR_MM_RESTORE(); return; } @@ -9103,7 +9103,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_81, 0, &_80$$47); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects/arrays can be stored as part of has-many/has-one/has-one-through/has-many-to-many relations", "phalcon/Mvc/Model.zep", 4888); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects/arrays can be stored as part of has-many/has-one/has-one-through/has-many-to-many relations", "phalcon/Mvc/Model.zep", 4889); return; } ZEPHIR_CALL_METHOD(&columns, &relation, "getfields", &_12, 0); @@ -9120,7 +9120,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_83, 0, &_82$$48); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4898); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4899); return; } if (Z_TYPE_P(&record) == IS_OBJECT) { @@ -9146,7 +9146,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { ZEPHIR_CONCAT_SVS(&_88$$51, "The column '", &columns, "' needs to be present in the model"); ZEPHIR_CALL_METHOD(NULL, &_87$$51, "__construct", &_21, 6, &_88$$51); zephir_check_call_status(); - zephir_throw_exception_debug(&_87$$51, "phalcon/Mvc/Model.zep", 4915); + zephir_throw_exception_debug(&_87$$51, "phalcon/Mvc/Model.zep", 4916); ZEPHIR_MM_RESTORE(); return; } @@ -9161,7 +9161,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { ZEPHIR_CALL_METHOD(&intermediateReferencedFields, &relation, "getintermediatereferencedfields", &_26, 0); zephir_check_call_status(); } - zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5061); + zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5062); if (Z_TYPE_P(&relatedRecords) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relatedRecords), _90$$45) { @@ -9176,7 +9176,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_92$$53))) { ZEPHIR_CALL_METHOD(&_93$$55, &recordAfter, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_93$$55, 0, "phalcon/Mvc/Model.zep", 4974); + zephir_is_iterable(&_93$$55, 0, "phalcon/Mvc/Model.zep", 4975); if (Z_TYPE_P(&_93$$55) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_93$$55), _94$$55) { @@ -9259,7 +9259,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_105$$60))) { ZEPHIR_CALL_METHOD(&_106$$63, &intermediateModel, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_106$$63, 0, "phalcon/Mvc/Model.zep", 5055); + zephir_is_iterable(&_106$$63, 0, "phalcon/Mvc/Model.zep", 5056); if (Z_TYPE_P(&_106$$63) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_106$$63), _107$$63) { @@ -9331,7 +9331,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_113$$68))) { ZEPHIR_CALL_METHOD(&_114$$70, &recordAfter, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_114$$70, 0, "phalcon/Mvc/Model.zep", 4974); + zephir_is_iterable(&_114$$70, 0, "phalcon/Mvc/Model.zep", 4975); if (Z_TYPE_P(&_114$$70) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_114$$70), _115$$70) { @@ -9414,7 +9414,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_126$$75))) { ZEPHIR_CALL_METHOD(&_127$$78, &intermediateModel, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_127$$78, 0, "phalcon/Mvc/Model.zep", 5055); + zephir_is_iterable(&_127$$78, 0, "phalcon/Mvc/Model.zep", 5056); if (Z_TYPE_P(&_127$$78) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_127$$78), _128$$78) { @@ -9485,7 +9485,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { ZEPHIR_CONCAT_SVSVS(&_137$$84, "There are no defined relations for the model '", &className, "' using alias '", &name, "'"); ZEPHIR_CALL_METHOD(NULL, &_136$$84, "__construct", &_21, 6, &_137$$84); zephir_check_call_status(); - zephir_throw_exception_debug(&_136$$84, "phalcon/Mvc/Model.zep", 5067); + zephir_throw_exception_debug(&_136$$84, "phalcon/Mvc/Model.zep", 5068); ZEPHIR_MM_RESTORE(); return; } @@ -9548,7 +9548,7 @@ PHP_METHOD(Phalcon_Mvc_Model, allowEmptyStringValues) { ZEPHIR_INIT_VAR(&keysAttributes); array_init(&keysAttributes); - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5108); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5109); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _0) { @@ -10347,7 +10347,7 @@ PHP_METHOD(Phalcon_Mvc_Model, skipAttributesOnCreate) { ZEPHIR_INIT_VAR(&keysAttributes); array_init(&keysAttributes); - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5560); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5561); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _0) { @@ -10421,7 +10421,7 @@ PHP_METHOD(Phalcon_Mvc_Model, skipAttributesOnUpdate) { ZEPHIR_INIT_VAR(&keysAttributes); array_init(&keysAttributes); - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5595); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5596); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _0) { @@ -10656,7 +10656,7 @@ PHP_METHOD(Phalcon_Mvc_Model, caseInsensitiveColumnMap) { ZEPHIR_INIT_VAR(&_0); zephir_array_keys(&_0, columnMap); - zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model.zep", 5731); + zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model.zep", 5732); if (Z_TYPE_P(&_0) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_0), _1) { diff --git a/ext/phalcon/mvc/model.zep.h b/ext/phalcon/mvc/model.zep.h index e90136bf76a..7214fe37d64 100644 --- a/ext/phalcon/mvc/model.zep.h +++ b/ext/phalcon/mvc/model.zep.h @@ -654,11 +654,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_skipoperation, 0, 0, 1) #endif ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 70200 -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_sum, 0, 0, IS_DOUBLE, 0) -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_sum, 0, 0, IS_DOUBLE, NULL, 0) -#endif +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_sum, 0, 0, 0) ZEND_ARG_INFO(0, parameters) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/mvc/modelinterface.zep.c b/ext/phalcon/mvc/modelinterface.zep.c index 979422f0ee4..06ac7572ea9 100644 --- a/ext/phalcon/mvc/modelinterface.zep.c +++ b/ext/phalcon/mvc/modelinterface.zep.c @@ -13,12 +13,12 @@ /** - * This file is part of the Phalcon. + * This file is part of the Phalcon Framework. * - * (c) Phalcon Team + * (c) Phalcon Team * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. + * For the full copyright and license information, please view the + * LICENSE.txt file that was distributed with this source code. */ /** * Phalcon\Mvc\ModelInterface @@ -257,7 +257,7 @@ ZEPHIR_DOC_METHOD(Phalcon_Mvc_ModelInterface, skipOperation); * Allows to calculate a sum on a column that match the specified conditions * * @param array parameters - * @return double + * @return double | ResultsetInterface */ ZEPHIR_DOC_METHOD(Phalcon_Mvc_ModelInterface, sum); diff --git a/ext/phalcon/mvc/modelinterface.zep.h b/ext/phalcon/mvc/modelinterface.zep.h index 2f4767cf442..599fdedcb31 100644 --- a/ext/phalcon/mvc/modelinterface.zep.h +++ b/ext/phalcon/mvc/modelinterface.zep.h @@ -343,11 +343,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_modelinterface_skipoperation, 0, 0, 1 #endif ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 70200 -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_modelinterface_sum, 0, 0, IS_DOUBLE, 0) -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_modelinterface_sum, 0, 0, IS_DOUBLE, NULL, 0) -#endif +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_modelinterface_sum, 0, 0, 0) ZEND_ARG_INFO(0, parameters) ZEND_END_ARG_INFO() diff --git a/phalcon/Mvc/Model.zep b/phalcon/Mvc/Model.zep index 59af80aceee..c68cc3ab7a9 100644 --- a/phalcon/Mvc/Model.zep +++ b/phalcon/Mvc/Model.zep @@ -1,10 +1,11 @@ + /** - * This file is part of the Phalcon. + * This file is part of the Phalcon Framework. * - * (c) Phalcon Team + * (c) Phalcon Team * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. + * For the full copyright and license information, please view the + * LICENSE.txt file that was distributed with this source code. */ namespace Phalcon\Mvc; @@ -2982,9 +2983,9 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, * ``` * * @param array parameters - * @return double + * @return double | ResultsetInterface */ - public static function sum(var parameters = null) -> float + public static function sum(var parameters = null) -> float | { return self::_groupResult("SUM", "sumatory", parameters); } diff --git a/phalcon/Mvc/ModelInterface.zep b/phalcon/Mvc/ModelInterface.zep index 8bc6ec65264..640046c265d 100644 --- a/phalcon/Mvc/ModelInterface.zep +++ b/phalcon/Mvc/ModelInterface.zep @@ -1,10 +1,11 @@ + /** - * This file is part of the Phalcon. + * This file is part of the Phalcon Framework. * - * (c) Phalcon Team + * (c) Phalcon Team * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. + * For the full copyright and license information, please view the + * LICENSE.txt file that was distributed with this source code. */ namespace Phalcon\Mvc; @@ -248,9 +249,9 @@ interface ModelInterface * Allows to calculate a sum on a column that match the specified conditions * * @param array parameters - * @return double + * @return double | ResultsetInterface */ - public static function sum(parameters = null) -> float; + public static function sum(parameters = null) -> float | ; /** * Check whether validation process has generated any messages diff --git a/tests/_data/fixtures/Traits/RecordsTrait.php b/tests/_data/fixtures/Traits/RecordsTrait.php index 8ac5a35965f..803d9ae7fae 100644 --- a/tests/_data/fixtures/Traits/RecordsTrait.php +++ b/tests/_data/fixtures/Traits/RecordsTrait.php @@ -5,49 +5,17 @@ * * (c) Phalcon Team * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. + * For the full copyright and license information, please view the + * LICENSE.txt file that was distributed with this source code. */ declare(strict_types=1); namespace Phalcon\Test\Fixtures\Traits; -use DatabaseTester; -use PDO; -use Phalcon\Annotations\Adapter\Memory as AnnotationsMemory; -use Phalcon\Cache\Adapter\Libmemcached as StorageLibmemcached; -use Phalcon\Cache\Adapter\Stream as StorageStream; -use Phalcon\Cli\Console as CliConsole; -use Phalcon\Crypt; -use Phalcon\Db\Adapter\PdoFactory; -use Phalcon\Di; -use Phalcon\Di\DiInterface; -use Phalcon\Di\FactoryDefault; -use Phalcon\Di\FactoryDefault\Cli as CliFactoryDefault; -use Phalcon\Escaper; -use Phalcon\Events\Manager as EventsManager; -use Phalcon\Filter; -use Phalcon\Http\Request; -use Phalcon\Http\Response; -use Phalcon\Mvc\Model\Manager as ModelsManager; -use Phalcon\Mvc\Model\Metadata\Memory as MetadataMemory; -use Phalcon\Mvc\View; -use Phalcon\Mvc\View\Simple; -use Phalcon\Session\Adapter\Libmemcached as SessionLibmemcached; -use Phalcon\Session\Adapter\Noop as SessionNoop; -use Phalcon\Session\Adapter\Redis as SessionRedis; -use Phalcon\Session\Adapter\Stream as SessionFiles; -use Phalcon\Session\Manager as SessionManager; -use Phalcon\Storage\SerializerFactory; use Phalcon\Test\Fixtures\Migrations\InvoicesMigration; -use Phalcon\Url; -use function dataDir; -use function getOptionsLibmemcached; -use function getOptionsMysql; -use function getOptionsPostgresql; -use function getOptionsRedis; -use function getOptionsSqlite; +use PHPUnit\Framework\Assert; + use function uniqid; trait RecordsTrait @@ -59,7 +27,7 @@ trait RecordsTrait */ private function getFibonacci(int $number) { - return round(pow((sqrt(5) + 1) / 2, $number) / sqrt(5)); + return round((((sqrt(5) + 1) / 2) ** $number) / sqrt(5)); } /** @@ -78,15 +46,25 @@ private function insertDataInvoices( string $prefix, int $pad = 0 ) { - $title = uniqid($prefix . '-'); + $title = uniqid($prefix . '-', true); for ($counter = 1; $counter <= $count; $counter++) { - $migration->insert( + $result = $migration->insert( $invId, $custId, 1, $title, $this->getFibonacci($pad + $counter) ); + + if (!$result) { + $table = $migration->getTable(); + $driver = $migration->getDriverName(); + Assert::fail( + sprintf("Failed to insert row #%d into table '%s' using '%s' driver", $counter, $table, $driver) + ); + } + + } } } diff --git a/tests/database/Mvc/Model/QueryCest.php b/tests/database/Mvc/Model/QueryCest.php index 5bb5fd53801..155bb8a6dad 100644 --- a/tests/database/Mvc/Model/QueryCest.php +++ b/tests/database/Mvc/Model/QueryCest.php @@ -65,6 +65,23 @@ public function _before(DatabaseTester $I): void $this->invoiceMigration = new InvoicesMigration($I->getConnection()); } + /** + * Executed after each test + * + * @param DatabaseTester $I + * @return void + */ + public function _after(DatabaseTester $I): void + { + if ($this->invoiceMigration) { + $this->invoiceMigration->clear(); + } + + if ($this->customerMigration) { + $this->customerMigration->clear(); + } + } + /** * Tests Phalcon\Mvc\Model :: query() * diff --git a/tests/database/Mvc/Model/SumCest.php b/tests/database/Mvc/Model/SumCest.php index 863c9ef88b5..ae81f53e1ef 100644 --- a/tests/database/Mvc/Model/SumCest.php +++ b/tests/database/Mvc/Model/SumCest.php @@ -1,11 +1,21 @@ + * + * For the full copyright and license information, please view the + * LICENSE.txt file that was distributed with this source code. + */ + declare(strict_types=1); namespace Phalcon\Test\Database\Mvc\Model; use DatabaseTester; use Phalcon\Mvc\Model\Resultset\Simple; +use Phalcon\Storage\Exception; use Phalcon\Test\Fixtures\Migrations\InvoicesMigration; use Phalcon\Test\Fixtures\Traits\DiTrait; use Phalcon\Test\Fixtures\Traits\RecordsTrait; @@ -16,20 +26,48 @@ class SumCest use DiTrait; use RecordsTrait; - public function _before(DatabaseTester $I) + /** + * @var InvoicesMigration + */ + private $invoiceMigration; + + /** + * Executed before each test + * + * @param DatabaseTester $I + * @return void + */ + public function _before(DatabaseTester $I): void { - $this->setNewFactoryDefault(); + try { + $this->setNewFactoryDefault(); + } catch (Exception $e) { + $I->fail($e->getMessage()); + } + $this->setDatabase($I); - /** @var PDO $connection */ - $connection = $I->getConnection(); - $migration = new InvoicesMigration($connection); - $migration->clear(); + $this->invoiceMigration = new InvoicesMigration($I->getConnection()); + } + + /** + * Executed after each test + * + * @param DatabaseTester $I + * @return void + */ + public function _after(DatabaseTester $I): void + { + if ($this->invoiceMigration) { + $this->invoiceMigration->clear(); + } } /** * Tests Phalcon\Mvc\Model :: sum() * + * @param DatabaseTester $I + * * @author Phalcon Team * @since 2020-01-30 * @@ -38,19 +76,15 @@ public function _before(DatabaseTester $I) */ public function mvcModelSum(DatabaseTester $I) { - /** - * The following tests need to skip sqlite because we will get - * a General Error 5 database is locked error + * @todo The following tests are skipped for sqlite because we will get + * a General Error 5 database is locked error. */ - /** @var PDO $connection */ - $connection = $I->getConnection(); - $migration = new InvoicesMigration($connection); - $invId = ('sqlite' === $I->getDriver()) ? 'null' : 'default'; - - $this->insertDataInvoices($migration, 7, $invId, 2, 'ccc'); - $this->insertDataInvoices($migration, 1, $invId, 3, 'aaa'); - $this->insertDataInvoices($migration, 11, $invId, 1, 'aaa'); + $invId = ('sqlite' === $I->getDriver()) ? 'null' : 'default'; + + $this->insertDataInvoices($this->invoiceMigration, 7, $invId, 2, 'ccc'); + $this->insertDataInvoices($this->invoiceMigration, 1, $invId, 3, 'aaa'); + $this->insertDataInvoices($this->invoiceMigration, 11, $invId, 1, 'aaa'); $total = Invoices::sum(