diff --git a/.github/actions/pack-phalcon-ext/action.yml b/.github/actions/pack-phalcon-ext/action.yml index 4722936fa57..af7abc4da12 100644 --- a/.github/actions/pack-phalcon-ext/action.yml +++ b/.github/actions/pack-phalcon-ext/action.yml @@ -25,7 +25,7 @@ runs: & 7z a "${{ inputs.target-name }}.zip" * - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ inputs.target-name }}.zip path: ./build-artifacts/phalcon*.zip diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bd76262af85..c937fa0daa1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,7 +19,7 @@ on: env: # All versions should be declared here - PHALCON_VERSION: 5.3.0 + PHALCON_VERSION: 5.3.1 ZEPHIR_PARSER_VERSION: 1.5.3 ZEPHIR_VERSION: 0.17.0 diff --git a/CHANGELOG-5.0.md b/CHANGELOG-5.0.md index c81df813e9f..0951bdb9c5c 100644 --- a/CHANGELOG-5.0.md +++ b/CHANGELOG-5.0.md @@ -1,5 +1,13 @@ # Changelog +## [5.3.1](https://github.com/phalcon/cphalcon/releases/tag/v5.3.1) (2023-09-12) + +### Fixed +- Fixed infinite save loop in `Phalcon\Mvc\Model::save()` [#16395](https://github.com/phalcon/cphalcon/issues/16395) +- Fixed undefined column with columnMap and model caching [#16420](https://github.com/phalcon/cphalcon/issues/16420) +- Fixed memory leak in `Phalcon\Mvc\Router::handle()` [#16431](https://github.com/phalcon/cphalcon/pull/16431) + + ## [5.3.0](https://github.com/phalcon/cphalcon/releases/tag/v5.3.0) (2023-08-15) ### Added @@ -23,6 +31,13 @@ - Fixed memory leak in Micro application [#16404](https://github.com/phalcon/cphalcon/pull/16404) +## [5.3.1](https://github.com/phalcon/cphalcon/releases/tag/v5.3.1) (xxxx-xx-xx) + +### Fixed + +- Forced `routeId` in `Phalcon\Mvc\Router\Route` to always return a string [#16414](https://github.com/phalcon/cphalcon/pull/16414) + + ## [5.2.3](https://github.com/phalcon/cphalcon/releases/tag/v5.2.3) (2023-07-26) ### Fixed diff --git a/composer.lock b/composer.lock index 9d6337e150c..a5a35eeda76 100644 --- a/composer.lock +++ b/composer.lock @@ -1163,16 +1163,16 @@ }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { @@ -1222,9 +1222,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -1240,7 +1240,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/xdebug-handler", @@ -1345,82 +1345,6 @@ }, "time": "2019-12-04T15:06:13+00:00" }, - { - "name": "doctrine/annotations", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.1" - }, - "time": "2023-02-02T22:02:53+00:00" - }, { "name": "doctrine/deprecations", "version": "v1.1.1", @@ -1538,84 +1462,6 @@ ], "time": "2022-12-30T00:15:36+00:00" }, - { - "name": "doctrine/lexer", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/2.1.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-12-14T08:49:07+00:00" - }, { "name": "felixfbecker/advanced-json-rpc", "version": "v3.2.1", @@ -1719,23 +1565,21 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.22.0", + "version": "v3.26.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3" + "reference": "d023ba6684055f6ea1da1352d8a02baca0426983" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/92b019f6c8d79aa26349d0db7671d37440dc0ff3", - "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/d023ba6684055f6ea1da1352d8a02baca0426983", + "reference": "d023ba6684055f6ea1da1352d8a02baca0426983", "shasum": "" }, "require": { "composer/semver": "^3.3", "composer/xdebug-handler": "^3.0.3", - "doctrine/annotations": "^2", - "doctrine/lexer": "^2 || ^3", "ext-json": "*", "ext-tokenizer": "*", "php": "^7.4 || ^8.0", @@ -1804,7 +1648,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.22.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.26.1" }, "funding": [ { @@ -1812,7 +1656,7 @@ "type": "github" } ], - "time": "2023-07-16T23:08:06+00:00" + "time": "2023-09-08T19:09:07+00:00" }, { "name": "graham-campbell/result-type", @@ -1878,22 +1722,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.7.0", + "version": "7.8.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" + "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", - "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "guzzlehttp/promises": "^1.5.3 || ^2.0.1", + "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1984,7 +1828,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.7.0" + "source": "https://github.com/guzzle/guzzle/tree/7.8.0" }, "funding": [ { @@ -2000,20 +1844,20 @@ "type": "tidelift" } ], - "time": "2023-05-21T14:04:53+00:00" + "time": "2023-08-27T10:20:53+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6" + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6", - "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", "shasum": "" }, "require": { @@ -2067,7 +1911,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.0" + "source": "https://github.com/guzzle/promises/tree/2.0.1" }, "funding": [ { @@ -2083,20 +1927,20 @@ "type": "tidelift" } ], - "time": "2023-05-21T13:50:22+00:00" + "time": "2023-08-03T15:11:55+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.5.0", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727", "shasum": "" }, "require": { @@ -2183,7 +2027,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.5.0" + "source": "https://github.com/guzzle/psr7/tree/2.6.1" }, "funding": [ { @@ -2199,7 +2043,7 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:11:26+00:00" + "time": "2023-08-27T10:13:57+00:00" }, { "name": "monolog/monolog", @@ -2465,16 +2309,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.16.0", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -2515,9 +2359,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-06-25T14:52:30+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "openlss/lib-array2xml", @@ -2950,16 +2794,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.7.2", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d" + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b2fe4d22a5426f38e014855322200b97b5362c0d", - "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", "shasum": "" }, "require": { @@ -3002,9 +2846,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" }, - "time": "2023-05-30T18:13:47+00:00" + "time": "2023-08-12T11:01:26+00:00" }, { "name": "phpoption/phpoption", @@ -3083,16 +2927,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.23.0", + "version": "1.24.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "a2b24135c35852b348894320d47b3902a94bc494" + "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a2b24135c35852b348894320d47b3902a94bc494", - "reference": "a2b24135c35852b348894320d47b3902a94bc494", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/3510b0a6274cc42f7219367cb3abfc123ffa09d6", + "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6", "shasum": "" }, "require": { @@ -3124,9 +2968,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.0" }, - "time": "2023-07-23T22:17:56+00:00" + "time": "2023-09-07T20:46:32+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3449,16 +3293,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.10", + "version": "9.6.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328" + "reference": "810500e92855eba8a7a5319ae913be2da6f957b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6d351645c3fe5a30f5e86be6577d946af65a328", - "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/810500e92855eba8a7a5319ae913be2da6f957b0", + "reference": "810500e92855eba8a7a5319ae913be2da6f957b0", "shasum": "" }, "require": { @@ -3532,7 +3376,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.10" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.11" }, "funding": [ { @@ -3548,7 +3392,7 @@ "type": "tidelift" } ], - "time": "2023-07-10T04:04:23+00:00" + "time": "2023-08-19T07:10:56+00:00" }, { "name": "predis/predis", @@ -3616,55 +3460,6 @@ ], "time": "2022-01-05T17:46:08+00:00" }, - { - "name": "psr/cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/master" - }, - "time": "2016-08-06T20:24:11+00:00" - }, { "name": "psr/container", "version": "1.1.2", @@ -4523,16 +4318,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "5.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "bde739e7565280bda77be70044ac1047bc007e34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", "shasum": "" }, "require": { @@ -4575,7 +4370,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" }, "funding": [ { @@ -4583,7 +4378,7 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-08-02T09:26:13+00:00" }, { "name": "sebastian/lines-of-code", @@ -5112,16 +4907,16 @@ }, { "name": "symfony/console", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8" + "reference": "f4f71842f24c2023b91237c72a365306f3c58827" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", + "url": "https://api.github.com/repos/symfony/console/zipball/f4f71842f24c2023b91237c72a365306f3c58827", + "reference": "f4f71842f24c2023b91237c72a365306f3c58827", "shasum": "" }, "require": { @@ -5191,7 +4986,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.24" + "source": "https://github.com/symfony/console/tree/v5.4.28" }, "funding": [ { @@ -5207,20 +5002,20 @@ "type": "tidelift" } ], - "time": "2023-05-26T05:13:16+00:00" + "time": "2023-08-07T06:12:30+00:00" }, { "name": "symfony/css-selector", - "version": "v5.4.21", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "95f3c7468db1da8cc360b24fa2a26e7cefcb355d" + "reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/95f3c7468db1da8cc360b24fa2a26e7cefcb355d", - "reference": "95f3c7468db1da8cc360b24fa2a26e7cefcb355d", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a", + "reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a", "shasum": "" }, "require": { @@ -5257,7 +5052,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.4.21" + "source": "https://github.com/symfony/css-selector/tree/v5.4.26" }, "funding": [ { @@ -5273,7 +5068,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-07-07T06:10:25+00:00" }, { "name": "symfony/deprecation-contracts", @@ -5419,16 +5214,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f" + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1df20e45d56da29a4b1d8259dd6e950acbf1b13f", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac", "shasum": "" }, "require": { @@ -5484,7 +5279,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.22" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26" }, "funding": [ { @@ -5500,7 +5295,7 @@ "type": "tidelift" } ], - "time": "2023-03-17T11:31:58+00:00" + "time": "2023-07-06T06:34:20+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -5647,16 +5442,16 @@ }, { "name": "symfony/finder", - "version": "v5.4.21", + "version": "v5.4.27", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19" + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19", + "url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d", + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d", "shasum": "" }, "require": { @@ -5690,7 +5485,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.21" + "source": "https://github.com/symfony/finder/tree/v5.4.27" }, "funding": [ { @@ -5706,7 +5501,7 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:33:00+00:00" + "time": "2023-07-31T08:02:31+00:00" }, { "name": "symfony/options-resolver", @@ -5779,16 +5574,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -5803,7 +5598,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5841,7 +5636,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -5857,20 +5652,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", "shasum": "" }, "require": { @@ -5882,7 +5677,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5922,7 +5717,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" }, "funding": [ { @@ -5938,20 +5733,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -5963,7 +5758,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6006,7 +5801,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -6022,20 +5817,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { @@ -6050,7 +5845,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6089,7 +5884,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -6105,20 +5900,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", "shasum": "" }, "require": { @@ -6127,7 +5922,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6168,7 +5963,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" }, "funding": [ { @@ -6184,20 +5979,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { @@ -6206,7 +6001,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6251,7 +6046,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -6267,20 +6062,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", "shasum": "" }, "require": { @@ -6289,7 +6084,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6330,7 +6125,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -6346,20 +6141,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/process", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64" + "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/e3c46cc5689c8782944274bb30702106ecbe3b64", - "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64", + "url": "https://api.github.com/repos/symfony/process/zipball/45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", + "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", "shasum": "" }, "require": { @@ -6392,7 +6187,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.24" + "source": "https://github.com/symfony/process/tree/v5.4.28" }, "funding": [ { @@ -6408,7 +6203,7 @@ "type": "tidelift" } ], - "time": "2023-05-17T11:26:05+00:00" + "time": "2023-08-07T10:36:04+00:00" }, { "name": "symfony/service-contracts", @@ -6557,16 +6352,16 @@ }, { "name": "symfony/string", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62" + "reference": "1181fe9270e373537475e826873b5867b863883c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", + "url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c", + "reference": "1181fe9270e373537475e826873b5867b863883c", "shasum": "" }, "require": { @@ -6623,7 +6418,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.22" + "source": "https://github.com/symfony/string/tree/v5.4.26" }, "funding": [ { @@ -6639,7 +6434,7 @@ "type": "tidelift" } ], - "time": "2023-03-14T06:11:53+00:00" + "time": "2023-06-28T12:46:07+00:00" }, { "name": "symfony/yaml", @@ -7171,5 +6966,5 @@ "ext-sqlite3": "*", "ext-xml": "*" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/config.json b/config.json index 9eb64872a81..2605b67a9db 100644 --- a/config.json +++ b/config.json @@ -3,7 +3,7 @@ "name": "phalcon", "description": "Phalcon is a full stack PHP framework, delivered as a PHP extension, offering lower resource consumption and high performance.", "author": "Phalcon Team and contributors", - "version": "5.3.0", + "version": "5.3.1", "verbose": false, "stubs": { "path": "ide\/%version%\/%namespace%\/", diff --git a/ext/phalcon/di/di.zep.c b/ext/phalcon/di/di.zep.c index 89549cbe8cd..40eac254bfc 100644 --- a/ext/phalcon/di/di.zep.c +++ b/ext/phalcon/di/di.zep.c @@ -286,36 +286,38 @@ PHP_METHOD(Phalcon_Di_Di, attempt) */ PHP_METHOD(Phalcon_Di_Di, get) { - zval _6$$5, _15$$18; - zend_bool _1$$3, _14$$11; + zval _7$$5, _18$$18; + zend_bool _1$$3, _15$$11; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *name_param = NULL, *parameters = NULL, parameters_sub, __$null, service, eventsManager, isShared, instance, _0, _5, _2$$3, _3$$4, _4$$4, _7$$5, _8$$7, _9$$7, _10$$9, _12$$12, _16$$18; - zval name, _11$$9, _13$$12; + zval *name_param = NULL, *parameters = NULL, parameters_sub, __$null, service, isShared, instance, _0, _5, _16, _2$$3, _3$$4, _4$$4, _6$$5, _8$$5, _9$$7, _10$$7, _11$$9, _13$$12, _17$$18, _19$$18; + zval name, _12$$9, _14$$12; zval *this_ptr = getThis(); ZVAL_UNDEF(&name); - ZVAL_UNDEF(&_11$$9); - ZVAL_UNDEF(&_13$$12); + ZVAL_UNDEF(&_12$$9); + ZVAL_UNDEF(&_14$$12); ZVAL_UNDEF(¶meters_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&service); - ZVAL_UNDEF(&eventsManager); ZVAL_UNDEF(&isShared); ZVAL_UNDEF(&instance); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_5); + ZVAL_UNDEF(&_16); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_4$$4); - ZVAL_UNDEF(&_7$$5); - ZVAL_UNDEF(&_8$$7); - ZVAL_UNDEF(&_9$$7); - ZVAL_UNDEF(&_10$$9); - ZVAL_UNDEF(&_12$$12); - ZVAL_UNDEF(&_16$$18); ZVAL_UNDEF(&_6$$5); - ZVAL_UNDEF(&_15$$18); + ZVAL_UNDEF(&_8$$5); + ZVAL_UNDEF(&_9$$7); + ZVAL_UNDEF(&_10$$7); + ZVAL_UNDEF(&_11$$9); + ZVAL_UNDEF(&_13$$12); + ZVAL_UNDEF(&_17$$18); + ZVAL_UNDEF(&_19$$18); + ZVAL_UNDEF(&_7$$5); + ZVAL_UNDEF(&_18$$18); #if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) @@ -362,18 +364,18 @@ PHP_METHOD(Phalcon_Di_Di, get) } } zephir_read_property(&_5, this_ptr, ZEND_STRL("eventsManager"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&eventsManager, &_5); - if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { - ZEPHIR_INIT_VAR(&_6$$5); - zephir_create_array(&_6$$5, 2, 0); - zephir_array_update_string(&_6$$5, SL("name"), &name, PH_COPY | PH_SEPARATE); - zephir_array_update_string(&_6$$5, SL("parameters"), parameters, PH_COPY | PH_SEPARATE); + if (Z_TYPE_P(&_5) != IS_NULL) { + zephir_read_property(&_6$$5, this_ptr, ZEND_STRL("eventsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_7$$5); - ZVAL_STRING(&_7$$5, "di:beforeServiceResolve"); - ZEPHIR_CALL_METHOD(&instance, &eventsManager, "fire", NULL, 0, &_7$$5, this_ptr, &_6$$5); + zephir_create_array(&_7$$5, 2, 0); + zephir_array_update_string(&_7$$5, SL("name"), &name, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_7$$5, SL("parameters"), parameters, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_VAR(&_8$$5); + ZVAL_STRING(&_8$$5, "di:beforeServiceResolve"); + ZEPHIR_CALL_METHOD(&instance, &_6$$5, "fire", NULL, 0, &_8$$5, this_ptr, &_7$$5); zephir_check_call_status(); } - if (Z_TYPE_P(&instance) != IS_OBJECT) { + if (Z_TYPE_P(&instance) == IS_NULL) { if (Z_TYPE_P(&service) != IS_NULL) { /* try_start_1: */ @@ -384,20 +386,20 @@ PHP_METHOD(Phalcon_Di_Di, get) try_end_1: if (EG(exception)) { - ZEPHIR_INIT_VAR(&_8$$7); - ZVAL_OBJ(&_8$$7, EG(exception)); - Z_ADDREF_P(&_8$$7); ZEPHIR_INIT_VAR(&_9$$7); - if (zephir_instance_of_ev(&_8$$7, phalcon_di_exception_serviceresolutionexception_ce)) { + ZVAL_OBJ(&_9$$7, EG(exception)); + Z_ADDREF_P(&_9$$7); + ZEPHIR_INIT_VAR(&_10$$7); + if (zephir_instance_of_ev(&_9$$7, phalcon_di_exception_serviceresolutionexception_ce)) { zend_clear_exception(); - ZEPHIR_CPY_WRT(&_9$$7, &_8$$7); - ZEPHIR_INIT_VAR(&_10$$9); - object_init_ex(&_10$$9, phalcon_di_exception_ce); + ZEPHIR_CPY_WRT(&_10$$7, &_9$$7); ZEPHIR_INIT_VAR(&_11$$9); - ZEPHIR_CONCAT_SVS(&_11$$9, "Service '", &name, "' cannot be resolved"); - ZEPHIR_CALL_METHOD(NULL, &_10$$9, "__construct", NULL, 32, &_11$$9); + object_init_ex(&_11$$9, phalcon_di_exception_ce); + ZEPHIR_INIT_VAR(&_12$$9); + ZEPHIR_CONCAT_SVS(&_12$$9, "Service '", &name, "' cannot be resolved"); + ZEPHIR_CALL_METHOD(NULL, &_11$$9, "__construct", NULL, 32, &_12$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$9, "phalcon/Di/Di.zep", 210); + zephir_throw_exception_debug(&_11$$9, "phalcon/Di/Di.zep", 208); ZEPHIR_MM_RESTORE(); return; } @@ -407,21 +409,21 @@ PHP_METHOD(Phalcon_Di_Di, get) } } else { if (UNEXPECTED(!(zephir_class_exists(&name, 1)))) { - ZEPHIR_INIT_VAR(&_12$$12); - object_init_ex(&_12$$12, phalcon_di_exception_ce); ZEPHIR_INIT_VAR(&_13$$12); - ZEPHIR_CONCAT_SVS(&_13$$12, "Service '", &name, "' was not found in the dependency injection container"); - ZEPHIR_CALL_METHOD(NULL, &_12$$12, "__construct", NULL, 32, &_13$$12); + object_init_ex(&_13$$12, phalcon_di_exception_ce); + ZEPHIR_INIT_VAR(&_14$$12); + ZEPHIR_CONCAT_SVS(&_14$$12, "Service '", &name, "' was not found in the dependency injection container"); + ZEPHIR_CALL_METHOD(NULL, &_13$$12, "__construct", NULL, 32, &_14$$12); zephir_check_call_status(); - zephir_throw_exception_debug(&_12$$12, "phalcon/Di/Di.zep", 225); + zephir_throw_exception_debug(&_13$$12, "phalcon/Di/Di.zep", 223); ZEPHIR_MM_RESTORE(); return; } - _14$$11 = Z_TYPE_P(parameters) == IS_ARRAY; - if (_14$$11) { - _14$$11 = ((zephir_fast_count_int(parameters)) ? 1 : 0); + _15$$11 = Z_TYPE_P(parameters) == IS_ARRAY; + if (_15$$11) { + _15$$11 = ((zephir_fast_count_int(parameters)) ? 1 : 0); } - if (_14$$11) { + if (_15$$11) { ZEPHIR_INIT_NVAR(&instance); ZEPHIR_LAST_CALL_STATUS = zephir_create_instance_params(&instance, &name, parameters); zephir_check_call_status(); @@ -442,15 +444,17 @@ PHP_METHOD(Phalcon_Di_Di, get) zephir_check_call_status(); } } - if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { - ZEPHIR_INIT_VAR(&_15$$18); - zephir_create_array(&_15$$18, 3, 0); - zephir_array_update_string(&_15$$18, SL("name"), &name, PH_COPY | PH_SEPARATE); - zephir_array_update_string(&_15$$18, SL("parameters"), parameters, PH_COPY | PH_SEPARATE); - zephir_array_update_string(&_15$$18, SL("instance"), &instance, PH_COPY | PH_SEPARATE); - ZEPHIR_INIT_VAR(&_16$$18); - ZVAL_STRING(&_16$$18, "di:afterServiceResolve"); - ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", NULL, 0, &_16$$18, this_ptr, &_15$$18); + zephir_read_property(&_16, this_ptr, ZEND_STRL("eventsManager"), PH_NOISY_CC | PH_READONLY); + if (Z_TYPE_P(&_16) != IS_NULL) { + zephir_read_property(&_17$$18, this_ptr, ZEND_STRL("eventsManager"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_INIT_VAR(&_18$$18); + zephir_create_array(&_18$$18, 3, 0); + zephir_array_update_string(&_18$$18, SL("name"), &name, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_18$$18, SL("parameters"), parameters, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_18$$18, SL("instance"), &instance, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_VAR(&_19$$18); + ZVAL_STRING(&_19$$18, "di:afterServiceResolve"); + ZEPHIR_CALL_METHOD(NULL, &_17$$18, "fire", NULL, 0, &_19$$18, this_ptr, &_18$$18); zephir_check_call_status(); } RETURN_CCTOR(&instance); @@ -530,7 +534,7 @@ PHP_METHOD(Phalcon_Di_Di, getRaw) ZEPHIR_CONCAT_SVS(&_2$$3, "Service '", &name, "' was not found in the dependency injection container"); ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$3, "phalcon/Di/Di.zep", 295); + zephir_throw_exception_debug(&_1$$3, "phalcon/Di/Di.zep", 293); ZEPHIR_MM_RESTORE(); return; } @@ -585,7 +589,7 @@ PHP_METHOD(Phalcon_Di_Di, getService) ZEPHIR_CONCAT_SVS(&_2$$3, "Service '", &name, "' was not found in the dependency injection container"); ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$3, "phalcon/Di/Di.zep", 311); + zephir_throw_exception_debug(&_1$$3, "phalcon/Di/Di.zep", 309); ZEPHIR_MM_RESTORE(); return; } @@ -695,7 +699,7 @@ PHP_METHOD(Phalcon_Di_Di, loadFromConfig) ZEPHIR_CALL_METHOD(&services, config, "toarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&services, 0, "phalcon/Di/Di.zep", 361); + zephir_is_iterable(&services, 0, "phalcon/Di/Di.zep", 359); if (Z_TYPE_P(&services) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&services), _2, _3, _0) { @@ -710,7 +714,7 @@ PHP_METHOD(Phalcon_Di_Di, loadFromConfig) _4$$3 = zephir_array_isset_string(&service, SL("shared")); if (_4$$3) { ZEPHIR_OBS_NVAR(&_5$$3); - zephir_array_fetch_string(&_5$$3, &service, SL("shared"), PH_NOISY, "phalcon/Di/Di.zep", 359); + zephir_array_fetch_string(&_5$$3, &service, SL("shared"), PH_NOISY, "phalcon/Di/Di.zep", 357); _4$$3 = zephir_is_true(&_5$$3); } ZVAL_BOOL(&_6$$3, _4$$3); @@ -733,7 +737,7 @@ PHP_METHOD(Phalcon_Di_Di, loadFromConfig) _8$$4 = zephir_array_isset_string(&service, SL("shared")); if (_8$$4) { ZEPHIR_OBS_NVAR(&_9$$4); - zephir_array_fetch_string(&_9$$4, &service, SL("shared"), PH_NOISY, "phalcon/Di/Di.zep", 359); + zephir_array_fetch_string(&_9$$4, &service, SL("shared"), PH_NOISY, "phalcon/Di/Di.zep", 357); _8$$4 = zephir_is_true(&_9$$4); } ZVAL_BOOL(&_10$$4, _8$$4); @@ -1231,7 +1235,7 @@ PHP_METHOD(Phalcon_Di_Di, set) zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("services"), &name, &_0); zephir_read_property(&_2, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); - zephir_array_fetch(&_3, &_2, &name, PH_NOISY | PH_READONLY, "phalcon/Di/Di.zep", 552); + zephir_array_fetch(&_3, &_2, &name, PH_NOISY | PH_READONLY, "phalcon/Di/Di.zep", 550); RETURN_CTOR(&_3); } diff --git a/ext/phalcon/di/service.zep.c b/ext/phalcon/di/service.zep.c index 25ab60712b4..b86999c7614 100644 --- a/ext/phalcon/di/service.zep.c +++ b/ext/phalcon/di/service.zep.c @@ -124,14 +124,14 @@ PHP_METHOD(Phalcon_Di_Service, getDefinition) PHP_METHOD(Phalcon_Di_Service, getParameter) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zval *position_param = NULL, definition, arguments, parameter, _0; + zval *position_param = NULL, arguments, parameter, _0, _1; zend_long position; zval *this_ptr = getThis(); - ZVAL_UNDEF(&definition); ZVAL_UNDEF(&arguments); ZVAL_UNDEF(¶meter); ZVAL_UNDEF(&_0); + ZVAL_UNDEF(&_1); #if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) @@ -145,13 +145,14 @@ PHP_METHOD(Phalcon_Di_Service, getParameter) position = zephir_get_intval(position_param); - zephir_read_property(&_0, this_ptr, ZEND_STRL("definition"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&definition, &_0); - if (UNEXPECTED(Z_TYPE_P(&definition) != IS_ARRAY)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_di_exception_ce, "Definition must be an array to obtain its parameters", "phalcon/Di/Service.zep", 82); + ZEPHIR_OBS_VAR(&_0); + zephir_read_property(&_0, this_ptr, ZEND_STRL("definition"), PH_NOISY_CC); + if (UNEXPECTED(Z_TYPE_P(&_0) != IS_ARRAY)) { + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_di_exception_ce, "Definition must be an array to obtain its parameters", "phalcon/Di/Service.zep", 80); return; } - if (zephir_array_isset_string_fetch(&arguments, &definition, SL("arguments"), 1)) { + zephir_read_property(&_1, this_ptr, ZEND_STRL("definition"), PH_NOISY_CC | PH_READONLY); + if (zephir_array_isset_string_fetch(&arguments, &_1, SL("arguments"), 1)) { if (zephir_array_isset_long_fetch(¶meter, &arguments, position, 1)) { RETURN_CTOR(¶meter); } @@ -190,11 +191,11 @@ PHP_METHOD(Phalcon_Di_Service, isShared) */ PHP_METHOD(Phalcon_Di_Service, resolve) { - zend_class_entry *_4$$13; - zend_bool found = 0, _2$$6; + zend_class_entry *_6$$12; + zend_bool found = 0, _1, _4$$5; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *parameters = NULL, parameters_sub, *container = NULL, container_sub, __$true, __$false, __$null, shared, definition, sharedInstance, instance, builder, _0, _1$$3, _3$$13, _5$$20; + zval *parameters = NULL, parameters_sub, *container = NULL, container_sub, __$true, __$false, __$null, definition, instance, builder, _0, _2, _3, _5$$12, _7$$19; zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); @@ -202,15 +203,14 @@ PHP_METHOD(Phalcon_Di_Service, resolve) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); ZVAL_NULL(&__$null); - ZVAL_UNDEF(&shared); ZVAL_UNDEF(&definition); - ZVAL_UNDEF(&sharedInstance); ZVAL_UNDEF(&instance); ZVAL_UNDEF(&builder); ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_1$$3); - ZVAL_UNDEF(&_3$$13); - ZVAL_UNDEF(&_5$$20); + ZVAL_UNDEF(&_2); + ZVAL_UNDEF(&_3); + ZVAL_UNDEF(&_5$$12); + ZVAL_UNDEF(&_7$$19); #if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) @@ -234,26 +234,26 @@ PHP_METHOD(Phalcon_Di_Service, resolve) zephir_read_property(&_0, this_ptr, ZEND_STRL("shared"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&shared, &_0); - if (zephir_is_true(&shared)) { - zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("sharedInstance"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&sharedInstance, &_1$$3); - if (Z_TYPE_P(&sharedInstance) != IS_NULL) { - RETURN_CCTOR(&sharedInstance); - } + _1 = zephir_is_true(&_0); + if (_1) { + zephir_read_property(&_2, this_ptr, ZEND_STRL("sharedInstance"), PH_NOISY_CC | PH_READONLY); + _1 = Z_TYPE_P(&_2) != IS_NULL; + } + if (_1) { + RETURN_MM_MEMBER(getThis(), "sharedInstance"); } found = 1; ZEPHIR_INIT_VAR(&instance); ZVAL_NULL(&instance); - zephir_read_property(&_0, this_ptr, ZEND_STRL("definition"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&definition, &_0); + zephir_read_property(&_3, this_ptr, ZEND_STRL("definition"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CPY_WRT(&definition, &_3); if (Z_TYPE_P(&definition) == IS_STRING) { if (zephir_class_exists(&definition, 1)) { - _2$$6 = Z_TYPE_P(parameters) == IS_ARRAY; - if (_2$$6) { - _2$$6 = ((zephir_fast_count_int(parameters)) ? 1 : 0); + _4$$5 = Z_TYPE_P(parameters) == IS_ARRAY; + if (_4$$5) { + _4$$5 = ((zephir_fast_count_int(parameters)) ? 1 : 0); } - if (_2$$6) { + if (_4$$5) { ZEPHIR_INIT_NVAR(&instance); ZEPHIR_LAST_CALL_STATUS = zephir_create_instance_params(&instance, &definition, parameters); zephir_check_call_status(); @@ -268,11 +268,11 @@ PHP_METHOD(Phalcon_Di_Service, resolve) } else { if (Z_TYPE_P(&definition) == IS_OBJECT) { if (zephir_is_instance_of(&definition, SL("Closure"))) { - if (Z_TYPE_P(container) == IS_OBJECT) { - _4$$13 = zephir_fetch_class_str_ex(SL("Closure"), ZEND_FETCH_CLASS_AUTO); - ZEPHIR_CALL_CE_STATIC(&_3$$13, _4$$13, "bind", NULL, 0, &definition, container); + if (Z_TYPE_P(container) != IS_NULL) { + _6$$12 = zephir_fetch_class_str_ex(SL("Closure"), ZEND_FETCH_CLASS_AUTO); + ZEPHIR_CALL_CE_STATIC(&_5$$12, _6$$12, "bind", NULL, 0, &definition, container); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&definition, &_3$$13); + ZEPHIR_CPY_WRT(&definition, &_5$$12); } if (Z_TYPE_P(parameters) == IS_ARRAY) { ZEPHIR_INIT_NVAR(&instance); @@ -303,15 +303,16 @@ PHP_METHOD(Phalcon_Di_Service, resolve) } } if (UNEXPECTED(found == 0)) { - ZEPHIR_INIT_VAR(&_5$$20); - object_init_ex(&_5$$20, phalcon_di_exception_serviceresolutionexception_ce); - ZEPHIR_CALL_METHOD(NULL, &_5$$20, "__construct", NULL, 32); + ZEPHIR_INIT_VAR(&_7$$19); + object_init_ex(&_7$$19, phalcon_di_exception_serviceresolutionexception_ce); + ZEPHIR_CALL_METHOD(NULL, &_7$$19, "__construct", NULL, 32); zephir_check_call_status(); - zephir_throw_exception_debug(&_5$$20, "phalcon/Di/Service.zep", 202); + zephir_throw_exception_debug(&_7$$19, "phalcon/Di/Service.zep", 195); ZEPHIR_MM_RESTORE(); return; } - if (zephir_is_true(&shared)) { + zephir_read_property(&_3, this_ptr, ZEND_STRL("shared"), PH_NOISY_CC | PH_READONLY); + if (zephir_is_true(&_3)) { zephir_update_property_zval(this_ptr, ZEND_STRL("sharedInstance"), &instance); } if (1) { @@ -352,14 +353,15 @@ PHP_METHOD(Phalcon_Di_Service, setParameter) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval parameter; - zval *position_param = NULL, *parameter_param = NULL, definition, arguments, _0, _1$$5; + zval *position_param = NULL, *parameter_param = NULL, arguments, _0, _1, _3, _2$$5; zend_long position; zval *this_ptr = getThis(); - ZVAL_UNDEF(&definition); ZVAL_UNDEF(&arguments); ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_1$$5); + ZVAL_UNDEF(&_1); + ZVAL_UNDEF(&_3); + ZVAL_UNDEF(&_2$$5); ZVAL_UNDEF(¶meter); #if PHP_VERSION_ID >= 80000 bool is_null_true = 1; @@ -376,23 +378,25 @@ PHP_METHOD(Phalcon_Di_Service, setParameter) ZEPHIR_OBS_COPY_OR_DUP(¶meter, parameter_param); - zephir_read_property(&_0, this_ptr, ZEND_STRL("definition"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&definition, &_0); - if (UNEXPECTED(Z_TYPE_P(&definition) != IS_ARRAY)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_di_exception_ce, "Definition must be an array to update its parameters", "phalcon/Di/Service.zep", 237); + ZEPHIR_OBS_VAR(&_0); + zephir_read_property(&_0, this_ptr, ZEND_STRL("definition"), PH_NOISY_CC); + if (UNEXPECTED(Z_TYPE_P(&_0) != IS_ARRAY)) { + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_di_exception_ce, "Definition must be an array to update its parameters", "phalcon/Di/Service.zep", 228); return; } ZEPHIR_OBS_VAR(&arguments); - if (zephir_array_isset_string_fetch(&arguments, &definition, SL("arguments"), 0)) { + zephir_read_property(&_1, this_ptr, ZEND_STRL("definition"), PH_NOISY_CC | PH_READONLY); + if (zephir_array_isset_string_fetch(&arguments, &_1, SL("arguments"), 0)) { zephir_array_update_long(&arguments, position, ¶meter, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); } else { - ZEPHIR_INIT_VAR(&_1$$5); - zephir_create_array(&_1$$5, 1, 0); - zephir_array_update_long(&_1$$5, position, ¶meter, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); - ZEPHIR_CPY_WRT(&arguments, &_1$$5); + ZEPHIR_INIT_VAR(&_2$$5); + zephir_create_array(&_2$$5, 1, 0); + zephir_array_update_long(&_2$$5, position, ¶meter, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); + ZEPHIR_CPY_WRT(&arguments, &_2$$5); } - zephir_array_update_string(&definition, SL("arguments"), &arguments, PH_COPY | PH_SEPARATE); - zephir_update_property_zval(this_ptr, ZEND_STRL("definition"), &definition); + ZEPHIR_INIT_VAR(&_3); + ZVAL_STRING(&_3, "arguments"); + zephir_update_property_array(this_ptr, SL("definition"), &_3, &arguments); RETURN_THIS(); } diff --git a/ext/phalcon/mvc/model.zep.c b/ext/phalcon/mvc/model.zep.c index 3914fa28ca7..5f7767b12b6 100644 --- a/ext/phalcon/mvc/model.zep.c +++ b/ext/phalcon/mvc/model.zep.c @@ -222,7 +222,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __construct) ZEPHIR_CONCAT_SVS(&_3$$4, "A dependency injection container is required to access the services related to the ODM in '", &_2$$4, "'"); ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 32, &_3$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model.zep", 182); + zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model.zep", 184); ZEPHIR_MM_RESTORE(); return; } @@ -242,7 +242,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __construct) ZEPHIR_CONCAT_SVS(&_8$$6, "The injected service 'modelsManager' is not valid in '", &_7$$6, "'"); ZEPHIR_CALL_METHOD(NULL, &_6$$6, "__construct", NULL, 32, &_8$$6); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$6, "phalcon/Mvc/Model.zep", 195); + zephir_throw_exception_debug(&_6$$6, "phalcon/Mvc/Model.zep", 197); ZEPHIR_MM_RESTORE(); return; } @@ -324,7 +324,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, 32, &_3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2, "phalcon/Mvc/Model.zep", 264); + zephir_throw_exception_debug(&_2, "phalcon/Mvc/Model.zep", 266); ZEPHIR_MM_RESTORE(); return; } @@ -379,7 +379,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, 32, &_2); zephir_check_call_status(); - zephir_throw_exception_debug(&_1, "phalcon/Mvc/Model.zep", 290); + zephir_throw_exception_debug(&_1, "phalcon/Mvc/Model.zep", 292); ZEPHIR_MM_RESTORE(); return; } @@ -445,7 +445,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __get) zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("dirtyRelated"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset(&_1$$3, &lowerProperty)) { zephir_read_property(&_2$$4, this_ptr, ZEND_STRL("dirtyRelated"), PH_NOISY_CC | PH_READONLY); - zephir_array_fetch(&_3$$4, &_2$$4, &lowerProperty, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 322); + zephir_array_fetch(&_3$$4, &_2$$4, &lowerProperty, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 324); RETURN_CTOR(&_3$$4); } ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getrelated", NULL, 0, &lowerProperty); @@ -711,7 +711,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", 493); + zephir_is_iterable(value, 0, "phalcon/Mvc/Model.zep", 495); if (Z_TYPE_P(value) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(value), _9$$10) { @@ -719,7 +719,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", 488); + zephir_array_append(&related, &item, PH_SEPARATE, "phalcon/Mvc/Model.zep", 490); } } } ZEND_HASH_FOREACH_END(); @@ -736,7 +736,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", 488); + zephir_array_append(&related, &item, PH_SEPARATE, "phalcon/Mvc/Model.zep", 490); } } ZEPHIR_CALL_METHOD(NULL, value, "next", NULL, 0); @@ -786,7 +786,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) ZEPHIR_CONCAT_SVSVS(&_19$$21, "Cannot access property '", &property, "' (not public) in '", &_18$$21, "'"); ZEPHIR_CALL_METHOD(NULL, &_17$$21, "__construct", NULL, 32, &_19$$21); zephir_check_call_status(); - zephir_throw_exception_debug(&_17$$21, "phalcon/Mvc/Model.zep", 522); + zephir_throw_exception_debug(&_17$$21, "phalcon/Mvc/Model.zep", 524); ZEPHIR_MM_RESTORE(); return; } @@ -858,7 +858,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __unserialize) ZEPHIR_CONCAT_SVS(&_4$$4, "A dependency injection container is required to access the services related to the ODM in '", &_3$$4, "'"); ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 32, &_4$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$4, "phalcon/Mvc/Model.zep", 551); + zephir_throw_exception_debug(&_2$$4, "phalcon/Mvc/Model.zep", 553); ZEPHIR_MM_RESTORE(); return; } @@ -877,7 +877,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __unserialize) ZEPHIR_CONCAT_SVS(&_9$$5, "The injected service 'modelsManager' is not valid in '", &_8$$5, "'"); ZEPHIR_CALL_METHOD(NULL, &_7$$5, "__construct", NULL, 32, &_9$$5); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$5, "phalcon/Mvc/Model.zep", 566); + zephir_throw_exception_debug(&_7$$5, "phalcon/Mvc/Model.zep", 568); ZEPHIR_MM_RESTORE(); return; } @@ -886,7 +886,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __unserialize) zephir_check_call_status(); ZEPHIR_OBS_VAR(&properties); if (zephir_array_isset_string_fetch(&properties, &data, SL("attributes"), 0)) { - zephir_is_iterable(&properties, 0, "phalcon/Mvc/Model.zep", 589); + zephir_is_iterable(&properties, 0, "phalcon/Mvc/Model.zep", 591); if (Z_TYPE_P(&properties) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&properties), _12$$6, _13$$6, _10$$6) { @@ -1163,7 +1163,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", 749); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 751); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2$$3, _3$$3, _0$$3) { @@ -1220,7 +1220,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", 806); + zephir_is_iterable(&_4, 0, "phalcon/Mvc/Model.zep", 808); if (Z_TYPE_P(&_4) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_4), _5) { @@ -1247,7 +1247,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) ZEPHIR_CONCAT_SVSVS(&_12$$16, "Column '", &attribute, "' doesn't make part of the column map in '", &_11$$16, "'"); ZEPHIR_CALL_METHOD(NULL, &_10$$16, "__construct", &_13, 32, &_12$$16); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$16, "phalcon/Mvc/Model.zep", 780); + zephir_throw_exception_debug(&_10$$16, "phalcon/Mvc/Model.zep", 782); ZEPHIR_MM_RESTORE(); return; } @@ -1306,7 +1306,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) ZEPHIR_CONCAT_SVSVS(&_21$$26, "Column '", &attribute, "' doesn't make part of the column map in '", &_20$$26, "'"); ZEPHIR_CALL_METHOD(NULL, &_19$$26, "__construct", &_13, 32, &_21$$26); zephir_check_call_status(); - zephir_throw_exception_debug(&_19$$26, "phalcon/Mvc/Model.zep", 780); + zephir_throw_exception_debug(&_19$$26, "phalcon/Mvc/Model.zep", 782); ZEPHIR_MM_RESTORE(); return; } @@ -1482,7 +1482,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", 896); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 898); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _3, _4, _1) { @@ -1503,7 +1503,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResult) ZEPHIR_CONCAT_SVS(&_7$$4, "Invalid key in array data provided to dumpResult() in '", &_6$$4, "'"); ZEPHIR_CALL_METHOD(NULL, &_5$$4, "__construct", &_8, 32, &_7$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_5$$4, "phalcon/Mvc/Model.zep", 886); + zephir_throw_exception_debug(&_5$$4, "phalcon/Mvc/Model.zep", 888); ZEPHIR_MM_RESTORE(); return; } @@ -1531,7 +1531,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResult) ZEPHIR_CONCAT_SVS(&_11$$6, "Invalid key in array data provided to dumpResult() in '", &_10$$6, "'"); ZEPHIR_CALL_METHOD(NULL, &_9$$6, "__construct", &_8, 32, &_11$$6); zephir_check_call_status(); - zephir_throw_exception_debug(&_9$$6, "phalcon/Mvc/Model.zep", 886); + zephir_throw_exception_debug(&_9$$6, "phalcon/Mvc/Model.zep", 888); ZEPHIR_MM_RESTORE(); return; } @@ -1649,7 +1649,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", 1029); + zephir_is_iterable(&data, 1, "phalcon/Mvc/Model.zep", 1031); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _3, _4, _1) { @@ -1690,7 +1690,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) ZEPHIR_CONCAT_SVSVS(&_8$$9, "Column '", &key, "' doesn't make part of the column map in '", &_7$$9, "'"); ZEPHIR_CALL_METHOD(NULL, &_6$$9, "__construct", &_9, 32, &_8$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$9, "phalcon/Mvc/Model.zep", 956); + zephir_throw_exception_debug(&_6$$9, "phalcon/Mvc/Model.zep", 958); ZEPHIR_MM_RESTORE(); return; } @@ -1706,7 +1706,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) ZEPHIR_CONCAT_SVSVS(&_12$$11, "Column '", &key, "' doesn't make part of the column map in '", &_11$$11, "'"); ZEPHIR_CALL_METHOD(NULL, &_10$$11, "__construct", &_9, 32, &_12$$11); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$11, "phalcon/Mvc/Model.zep", 965); + zephir_throw_exception_debug(&_10$$11, "phalcon/Mvc/Model.zep", 967); ZEPHIR_MM_RESTORE(); return; } @@ -1722,7 +1722,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) _13$$3 = Z_TYPE_P(&value) != IS_NULL; } if (_13$$3) { - zephir_array_fetch_long(&_14$$13, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 979); + zephir_array_fetch_long(&_14$$13, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 981); do { if (ZEPHIR_IS_LONG(&_14$$13, 0) || ZEPHIR_IS_LONG(&_14$$13, 21) || ZEPHIR_IS_LONG(&_14$$13, 22) || ZEPHIR_IS_LONG(&_14$$13, 26)) { ZVAL_LONG(&_15$$14, 10); @@ -1745,7 +1745,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) } while(0); } else { - zephir_array_fetch_long(&_17$$18, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1002); + zephir_array_fetch_long(&_17$$18, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1004); do { if (ZEPHIR_IS_LONG(&_17$$18, 14) || ZEPHIR_IS_LONG(&_17$$18, 8) || ZEPHIR_IS_LONG(&_17$$18, 3) || ZEPHIR_IS_LONG(&_17$$18, 9) || ZEPHIR_IS_LONG(&_17$$18, 7) || ZEPHIR_IS_LONG(&_17$$18, 0) || ZEPHIR_IS_LONG(&_17$$18, 21) || ZEPHIR_IS_LONG(&_17$$18, 22) || ZEPHIR_IS_LONG(&_17$$18, 26)) { ZEPHIR_INIT_NVAR(&castValue); @@ -1758,7 +1758,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) } ZEPHIR_OBS_NVAR(&attributeName); - zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 1021); + zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 1023); zephir_update_property_zval_zval(&instance, &attributeName, &castValue); zephir_array_update_zval(&data, &key, &castValue, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -1804,7 +1804,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) ZEPHIR_CONCAT_SVSVS(&_21$$27, "Column '", &key, "' doesn't make part of the column map in '", &_20$$27, "'"); ZEPHIR_CALL_METHOD(NULL, &_19$$27, "__construct", &_9, 32, &_21$$27); zephir_check_call_status(); - zephir_throw_exception_debug(&_19$$27, "phalcon/Mvc/Model.zep", 956); + zephir_throw_exception_debug(&_19$$27, "phalcon/Mvc/Model.zep", 958); ZEPHIR_MM_RESTORE(); return; } @@ -1820,7 +1820,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) ZEPHIR_CONCAT_SVSVS(&_24$$29, "Column '", &key, "' doesn't make part of the column map in '", &_23$$29, "'"); ZEPHIR_CALL_METHOD(NULL, &_22$$29, "__construct", &_9, 32, &_24$$29); zephir_check_call_status(); - zephir_throw_exception_debug(&_22$$29, "phalcon/Mvc/Model.zep", 965); + zephir_throw_exception_debug(&_22$$29, "phalcon/Mvc/Model.zep", 967); ZEPHIR_MM_RESTORE(); return; } @@ -1836,7 +1836,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) _25$$21 = Z_TYPE_P(&value) != IS_NULL; } if (_25$$21) { - zephir_array_fetch_long(&_26$$31, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 979); + zephir_array_fetch_long(&_26$$31, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 981); do { if (ZEPHIR_IS_LONG(&_26$$31, 0) || ZEPHIR_IS_LONG(&_26$$31, 21) || ZEPHIR_IS_LONG(&_26$$31, 22) || ZEPHIR_IS_LONG(&_26$$31, 26)) { ZVAL_LONG(&_27$$32, 10); @@ -1859,7 +1859,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) } while(0); } else { - zephir_array_fetch_long(&_28$$36, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1002); + zephir_array_fetch_long(&_28$$36, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1004); do { if (ZEPHIR_IS_LONG(&_28$$36, 14) || ZEPHIR_IS_LONG(&_28$$36, 8) || ZEPHIR_IS_LONG(&_28$$36, 3) || ZEPHIR_IS_LONG(&_28$$36, 9) || ZEPHIR_IS_LONG(&_28$$36, 7) || ZEPHIR_IS_LONG(&_28$$36, 0) || ZEPHIR_IS_LONG(&_28$$36, 21) || ZEPHIR_IS_LONG(&_28$$36, 22) || ZEPHIR_IS_LONG(&_28$$36, 26)) { ZEPHIR_INIT_NVAR(&castValue); @@ -1872,7 +1872,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) } ZEPHIR_OBS_NVAR(&attributeName); - zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 1021); + zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 1023); 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); @@ -1954,7 +1954,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) } ZEPHIR_INIT_VAR(&hydrateArray); array_init(&hydrateArray); - zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 1116); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 1118); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2, _3, _0) { @@ -1988,7 +1988,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, 32, &_8$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$10, "phalcon/Mvc/Model.zep", 1095); + zephir_throw_exception_debug(&_7$$10, "phalcon/Mvc/Model.zep", 1097); ZEPHIR_MM_RESTORE(); return; } @@ -1996,7 +1996,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", 1105); + zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 1107); } else { ZEPHIR_CPY_WRT(&attributeName, &attribute); } @@ -2040,7 +2040,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, 32, &_13$$19); zephir_check_call_status(); - zephir_throw_exception_debug(&_12$$19, "phalcon/Mvc/Model.zep", 1095); + zephir_throw_exception_debug(&_12$$19, "phalcon/Mvc/Model.zep", 1097); ZEPHIR_MM_RESTORE(); return; } @@ -2048,7 +2048,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", 1105); + zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 1107); } else { ZEPHIR_CPY_WRT(&attributeName, &attribute); } @@ -2103,7 +2103,7 @@ PHP_METHOD(Phalcon_Mvc_Model, collectRelatedToSave) ZEPHIR_CPY_WRT(&related, &_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("dirtyRelated"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&dirtyRelated, &_1); - zephir_is_iterable(&related, 0, "phalcon/Mvc/Model.zep", 1157); + zephir_is_iterable(&related, 0, "phalcon/Mvc/Model.zep", 1159); if (Z_TYPE_P(&related) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&related), _4, _5, _2) { @@ -2438,11 +2438,11 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) ZEPHIR_CONCAT_SVS(&_5$$7, "A primary key must be defined in the model in order to perform the operation in '", &_4$$7, "'"); ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", NULL, 32, &_5$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 1314); + zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 1316); ZEPHIR_MM_RESTORE(); return; } - zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 1363); + zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 1365); if (Z_TYPE_P(&primaryKeys) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&primaryKeys), _6) { @@ -2458,7 +2458,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) ZEPHIR_CONCAT_SVSVS(&_10$$9, "Column '", &primaryKey, "' have not defined a bind data type in '", &_9$$9, "'"); ZEPHIR_CALL_METHOD(NULL, &_8$$9, "__construct", NULL, 32, &_10$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_8$$9, "phalcon/Mvc/Model.zep", 1328); + zephir_throw_exception_debug(&_8$$9, "phalcon/Mvc/Model.zep", 1330); ZEPHIR_MM_RESTORE(); return; } @@ -2473,7 +2473,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) ZEPHIR_CONCAT_SVSVS(&_13$$11, "Column '", &primaryKey, "' isn't part of the column map in '", &_12$$11, "'"); ZEPHIR_CALL_METHOD(NULL, &_11$$11, "__construct", NULL, 32, &_13$$11); zephir_check_call_status(); - zephir_throw_exception_debug(&_11$$11, "phalcon/Mvc/Model.zep", 1338); + zephir_throw_exception_debug(&_11$$11, "phalcon/Mvc/Model.zep", 1340); ZEPHIR_MM_RESTORE(); return; } @@ -2490,17 +2490,17 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) ZEPHIR_CONCAT_SVSVS(&_16$$13, "Cannot delete the record because the primary key attribute: '", &attributeField, "' was not set in '", &_15$$13, "'"); ZEPHIR_CALL_METHOD(NULL, &_14$$13, "__construct", NULL, 32, &_16$$13); zephir_check_call_status(); - zephir_throw_exception_debug(&_14$$13, "phalcon/Mvc/Model.zep", 1352); + zephir_throw_exception_debug(&_14$$13, "phalcon/Mvc/Model.zep", 1354); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1358); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1360); ZEPHIR_CALL_METHOD(&_17$$8, &writeConnection, "escapeidentifier", &_18, 0, &primaryKey); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_19$$8); ZEPHIR_CONCAT_VS(&_19$$8, &_17$$8, " = ?"); - zephir_array_append(&conditions, &_19$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1359); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1360); + zephir_array_append(&conditions, &_19$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1361); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1362); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "rewind", NULL, 0); @@ -2523,7 +2523,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) ZEPHIR_CONCAT_SVSVS(&_22$$15, "Column '", &primaryKey, "' have not defined a bind data type in '", &_21$$15, "'"); ZEPHIR_CALL_METHOD(NULL, &_20$$15, "__construct", NULL, 32, &_22$$15); zephir_check_call_status(); - zephir_throw_exception_debug(&_20$$15, "phalcon/Mvc/Model.zep", 1328); + zephir_throw_exception_debug(&_20$$15, "phalcon/Mvc/Model.zep", 1330); ZEPHIR_MM_RESTORE(); return; } @@ -2538,7 +2538,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) ZEPHIR_CONCAT_SVSVS(&_25$$17, "Column '", &primaryKey, "' isn't part of the column map in '", &_24$$17, "'"); ZEPHIR_CALL_METHOD(NULL, &_23$$17, "__construct", NULL, 32, &_25$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_23$$17, "phalcon/Mvc/Model.zep", 1338); + zephir_throw_exception_debug(&_23$$17, "phalcon/Mvc/Model.zep", 1340); ZEPHIR_MM_RESTORE(); return; } @@ -2555,17 +2555,17 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) ZEPHIR_CONCAT_SVSVS(&_28$$19, "Cannot delete the record because the primary key attribute: '", &attributeField, "' was not set in '", &_27$$19, "'"); ZEPHIR_CALL_METHOD(NULL, &_26$$19, "__construct", NULL, 32, &_28$$19); zephir_check_call_status(); - zephir_throw_exception_debug(&_26$$19, "phalcon/Mvc/Model.zep", 1352); + zephir_throw_exception_debug(&_26$$19, "phalcon/Mvc/Model.zep", 1354); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1358); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1360); ZEPHIR_CALL_METHOD(&_29$$14, &writeConnection, "escapeidentifier", &_30, 0, &primaryKey); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_31$$14); ZEPHIR_CONCAT_VS(&_31$$14, &_29$$14, " = ?"); - zephir_array_append(&conditions, &_31$$14, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1359); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1360); + zephir_array_append(&conditions, &_31$$14, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1361); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1362); ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "next", NULL, 0); zephir_check_call_status(); } @@ -2871,7 +2871,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", 1633); + zephir_array_append(¶ms, parameters, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1635); } } else { ZEPHIR_CPY_WRT(¶ms, parameters); @@ -3034,7 +3034,7 @@ PHP_METHOD(Phalcon_Mvc_Model, findFirst) ZEPHIR_CONCAT_SVS(&_4$$6, "Parameters passed must be of type array, string, numeric or null in '", &_3$$6, "'"); ZEPHIR_CALL_METHOD(NULL, &_2$$6, "__construct", NULL, 32, &_4$$6); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$6, "phalcon/Mvc/Model.zep", 1757); + zephir_throw_exception_debug(&_2$$6, "phalcon/Mvc/Model.zep", 1759); ZEPHIR_MM_RESTORE(); return; } @@ -3197,7 +3197,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) ZEPHIR_CONCAT_SVS(&_3$$3, "The 'keepSnapshots' option must be enabled to track changes in '", &_2$$3, "'"); ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_3$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Model.zep", 1843); + zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Model.zep", 1845); ZEPHIR_MM_RESTORE(); return; } @@ -3214,7 +3214,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) ZEPHIR_INIT_VAR(&changed); array_init(&changed); ZEPHIR_INIT_VAR(&_4); - zephir_is_iterable(&allAttributes, 0, "phalcon/Mvc/Model.zep", 1901); + zephir_is_iterable(&allAttributes, 0, "phalcon/Mvc/Model.zep", 1903); if (Z_TYPE_P(&allAttributes) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&allAttributes), _7, _8, _5) { @@ -3227,17 +3227,17 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) ZEPHIR_INIT_NVAR(&_4); ZVAL_COPY(&_4, _5); if (!(zephir_array_isset(&snapshot, &name))) { - zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1876); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1878); 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", 1886); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1888); continue; } - zephir_array_fetch(&_9$$6, &snapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1894); + zephir_array_fetch(&_9$$6, &snapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1896); if (!ZEPHIR_IS_IDENTICAL(&value, &_9$$6)) { - zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1895); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1897); continue; } } ZEND_HASH_FOREACH_END(); @@ -3255,17 +3255,17 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) ZEPHIR_CALL_METHOD(&_4, &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", 1876); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1878); 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", 1886); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1888); continue; } - zephir_array_fetch(&_10$$10, &snapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1894); + zephir_array_fetch(&_10$$10, &snapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1896); if (!ZEPHIR_IS_IDENTICAL(&value, &_10$$10)) { - zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1895); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1897); continue; } ZEPHIR_CALL_METHOD(NULL, &allAttributes, "next", NULL, 0); @@ -3376,7 +3376,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getMessages) ZEPHIR_INIT_VAR(&filtered); array_init(&filtered); zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("errorMessages"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_1$$3, 0, "phalcon/Mvc/Model.zep", 1958); + zephir_is_iterable(&_1$$3, 0, "phalcon/Mvc/Model.zep", 1960); if (Z_TYPE_P(&_1$$3) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_1$$3), _2$$3) { @@ -3385,7 +3385,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", 1954); + zephir_array_append(&filtered, &message, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1956); } } ZEND_HASH_FOREACH_END(); } else { @@ -3402,7 +3402,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", 1954); + zephir_array_append(&filtered, &message, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1956); } ZEPHIR_CALL_METHOD(NULL, &_1$$3, "next", NULL, 0); zephir_check_call_status(); @@ -3467,7 +3467,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getModelsMetaData) ZEPHIR_CONCAT_SVS(&_5$$4, "The injected service 'modelsMetadata' is not valid in '", &_4$$4, "'"); ZEPHIR_CALL_METHOD(NULL, &_3$$4, "__construct", NULL, 32, &_5$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$4, "phalcon/Mvc/Model.zep", 1992); + zephir_throw_exception_debug(&_3$$4, "phalcon/Mvc/Model.zep", 1994); ZEPHIR_MM_RESTORE(); return; } @@ -3614,7 +3614,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, 32, &_3$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "phalcon/Mvc/Model.zep", 2068); + zephir_throw_exception_debug(&_2$$3, "phalcon/Mvc/Model.zep", 2070); ZEPHIR_MM_RESTORE(); return; } @@ -3791,12 +3791,12 @@ PHP_METHOD(Phalcon_Mvc_Model, getUpdatedFields) ZEPHIR_CONCAT_SVS(&_3$$3, "The 'updateSnapshotOnSave' option must be enabled for this method to work properly in '", &_2$$3, "'"); ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_3$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Model.zep", 2192); + zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Model.zep", 2194); ZEPHIR_MM_RESTORE(); 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", 2198); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The 'keepSnapshots' option must be enabled to track changes", "phalcon/Mvc/Model.zep", 2200); return; } zephir_read_property(&_0, this_ptr, ZEND_STRL("dirtyState"), PH_NOISY_CC | PH_READONLY); @@ -3809,13 +3809,13 @@ PHP_METHOD(Phalcon_Mvc_Model, getUpdatedFields) ZEPHIR_CONCAT_SVS(&_6$$5, "Change checking cannot be performed because the object has not been persisted or is deleted in '", &_5$$5, "'"); ZEPHIR_CALL_METHOD(NULL, &_4$$5, "__construct", NULL, 32, &_6$$5); zephir_check_call_status(); - zephir_throw_exception_debug(&_4$$5, "phalcon/Mvc/Model.zep", 2207); + zephir_throw_exception_debug(&_4$$5, "phalcon/Mvc/Model.zep", 2209); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&updated); array_init(&updated); - zephir_is_iterable(&snapshot, 0, "phalcon/Mvc/Model.zep", 2222); + zephir_is_iterable(&snapshot, 0, "phalcon/Mvc/Model.zep", 2224); if (Z_TYPE_P(&snapshot) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&snapshot), _9, _10, _7) { @@ -3829,11 +3829,11 @@ PHP_METHOD(Phalcon_Mvc_Model, getUpdatedFields) ZVAL_COPY(&value, _7); _11$$6 = !(zephir_array_isset(&oldSnapshot, &name)); if (!(_11$$6)) { - zephir_array_fetch(&_12$$6, &oldSnapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 2217); + zephir_array_fetch(&_12$$6, &oldSnapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 2219); _11$$6 = !ZEPHIR_IS_IDENTICAL(&value, &_12$$6); } if (_11$$6) { - zephir_array_append(&updated, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2218); + zephir_array_append(&updated, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2220); } } ZEND_HASH_FOREACH_END(); } else { @@ -3851,11 +3851,11 @@ PHP_METHOD(Phalcon_Mvc_Model, getUpdatedFields) zephir_check_call_status(); _13$$8 = !(zephir_array_isset(&oldSnapshot, &name)); if (!(_13$$8)) { - zephir_array_fetch(&_14$$8, &oldSnapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 2217); + zephir_array_fetch(&_14$$8, &oldSnapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 2219); _13$$8 = !ZEPHIR_IS_IDENTICAL(&value, &_14$$8); } if (_13$$8) { - zephir_array_append(&updated, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2218); + zephir_array_append(&updated, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2220); } ZEPHIR_CALL_METHOD(NULL, &snapshot, "next", NULL, 0); zephir_check_call_status(); @@ -4387,7 +4387,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) ZEPHIR_CONCAT_SVS(&_3$$3, "The record cannot be refreshed because it does not exist or is deleted in '", &_2$$3, "'"); ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_3$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Model.zep", 2473); + zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Model.zep", 2475); ZEPHIR_MM_RESTORE(); return; } @@ -4423,7 +4423,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) ZEPHIR_CONCAT_SVS(&_8$$7, "The record cannot be refreshed because it does not exist or is deleted in '", &_7$$7, "'"); ZEPHIR_CALL_METHOD(NULL, &_6$$7, "__construct", NULL, 32, &_8$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$7, "phalcon/Mvc/Model.zep", 2498); + zephir_throw_exception_debug(&_6$$7, "phalcon/Mvc/Model.zep", 2500); ZEPHIR_MM_RESTORE(); return; } @@ -4441,7 +4441,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) ZEPHIR_CONCAT_SVS(&_12$$8, "The record cannot be refreshed because it does not exist or is deleted in '", &_11$$8, "'"); ZEPHIR_CALL_METHOD(NULL, &_10$$8, "__construct", NULL, 32, &_12$$8); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$8, "phalcon/Mvc/Model.zep", 2509); + zephir_throw_exception_debug(&_10$$8, "phalcon/Mvc/Model.zep", 2511); ZEPHIR_MM_RESTORE(); return; } @@ -4449,7 +4449,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) array_init(&fields); ZEPHIR_CALL_METHOD(&_13, &metaData, "getattributes", NULL, 0, this_ptr); zephir_check_call_status(); - zephir_is_iterable(&_13, 0, "phalcon/Mvc/Model.zep", 2524); + zephir_is_iterable(&_13, 0, "phalcon/Mvc/Model.zep", 2526); if (Z_TYPE_P(&_13) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_13), _14) { @@ -4458,7 +4458,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) ZEPHIR_INIT_NVAR(&_16$$9); zephir_create_array(&_16$$9, 1, 0); zephir_array_fast_append(&_16$$9, &attribute); - zephir_array_append(&fields, &_16$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2518); + zephir_array_append(&fields, &_16$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2520); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_13, "rewind", NULL, 0); @@ -4474,7 +4474,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) ZEPHIR_INIT_NVAR(&_17$$10); zephir_create_array(&_17$$10, 1, 0); zephir_array_fast_append(&_17$$10, &attribute); - zephir_array_append(&fields, &_17$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2518); + zephir_array_append(&fields, &_17$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2520); ZEPHIR_CALL_METHOD(NULL, &_13, "next", NULL, 0); zephir_check_call_status(); } @@ -4540,13 +4540,42 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) *``` */ PHP_METHOD(Phalcon_Mvc_Model, save) +{ + zval visited; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; + zend_long ZEPHIR_LAST_CALL_STATUS; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&visited); + + + ZEPHIR_MM_GROW(); + + ZEPHIR_INIT_VAR(&visited); + object_init_ex(&visited, phalcon_support_collection_ce); + ZEPHIR_CALL_METHOD(NULL, &visited, "__construct", NULL, 22); + zephir_check_call_status(); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dosave", NULL, 0, &visited); + zephir_check_call_status(); + RETURN_MM(); +} + +/** + * Inserted or updates model instance, expects a visited list of objects. + * + * @param CollectionInterface $visited + * + * @return bool + */ +PHP_METHOD(Phalcon_Mvc_Model, doSave) { zend_bool hasRelatedToSave = 0; - zval metaData, schema, writeConnection, readConnection, source, table, identityField, exists, success, relatedToSave, _0, _4, _1$$3, _2$$7, _3$$8, _5$$10, _6$$11, _7$$11, _8$$14, _9$$16, _10$$18, _11$$21, _12$$20; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; + zval *visited, visited_sub, metaData, schema, writeConnection, readConnection, source, table, identityField, exists, success, relatedToSave, objId, _0, _1, _5, _2$$4, _3$$8, _4$$9, _6$$11, _7$$12, _8$$12, _9$$15, _10$$17, _11$$19, _12$$22, _13$$21; zval *this_ptr = getThis(); + ZVAL_UNDEF(&visited_sub); ZVAL_UNDEF(&metaData); ZVAL_UNDEF(&schema); ZVAL_UNDEF(&writeConnection); @@ -4557,38 +4586,57 @@ PHP_METHOD(Phalcon_Mvc_Model, save) ZVAL_UNDEF(&exists); ZVAL_UNDEF(&success); ZVAL_UNDEF(&relatedToSave); + ZVAL_UNDEF(&objId); ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_4); - ZVAL_UNDEF(&_1$$3); - ZVAL_UNDEF(&_2$$7); + ZVAL_UNDEF(&_1); + ZVAL_UNDEF(&_5); + ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$8); - ZVAL_UNDEF(&_5$$10); + ZVAL_UNDEF(&_4$$9); ZVAL_UNDEF(&_6$$11); - ZVAL_UNDEF(&_7$$11); - ZVAL_UNDEF(&_8$$14); - ZVAL_UNDEF(&_9$$16); - ZVAL_UNDEF(&_10$$18); - ZVAL_UNDEF(&_11$$21); - ZVAL_UNDEF(&_12$$20); + ZVAL_UNDEF(&_7$$12); + ZVAL_UNDEF(&_8$$12); + ZVAL_UNDEF(&_9$$15); + ZVAL_UNDEF(&_10$$17); + ZVAL_UNDEF(&_11$$19); + ZVAL_UNDEF(&_12$$22); + ZVAL_UNDEF(&_13$$21); +#if PHP_VERSION_ID >= 80000 + bool is_null_true = 1; + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_OBJECT_OF_CLASS(visited, phalcon_support_collection_collectioninterface_ce) + ZEND_PARSE_PARAMETERS_END(); +#endif ZEPHIR_MM_GROW(); + zephir_fetch_params(1, 1, 0, &visited); + + ZEPHIR_CALL_FUNCTION(&objId, "spl_object_id", NULL, 434, this_ptr); + zephir_check_call_status(); + ZEPHIR_CALL_METHOD(&_0, visited, "has", NULL, 0, &objId); + zephir_check_call_status(); + if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { + RETURN_MM_BOOL(1); + } + ZEPHIR_CALL_METHOD(NULL, visited, "set", NULL, 0, &objId, this_ptr); + zephir_check_call_status(); ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&writeConnection, this_ptr, "getwriteconnection", NULL, 423); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_0); - ZVAL_STRING(&_0, "prepareSave"); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "fireevent", NULL, 0, &_0); + ZEPHIR_INIT_VAR(&_1); + ZVAL_STRING(&_1, "prepareSave"); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "fireevent", NULL, 0, &_1); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&relatedToSave, this_ptr, "collectrelatedtosave", NULL, 0); zephir_check_call_status(); hasRelatedToSave = zephir_fast_count_int(&relatedToSave) > 0; if (hasRelatedToSave) { - ZEPHIR_CALL_METHOD(&_1$$3, this_ptr, "presaverelatedrecords", NULL, 0, &writeConnection, &relatedToSave); + ZEPHIR_CALL_METHOD(&_2$$4, this_ptr, "presaverelatedrecords", NULL, 0, &writeConnection, &relatedToSave, visited); zephir_check_call_status(); - if (ZEPHIR_IS_FALSE_IDENTICAL(&_1$$3)) { + if (ZEPHIR_IS_FALSE_IDENTICAL(&_2$$4)) { RETURN_MM_BOOL(0); } } @@ -4609,35 +4657,35 @@ PHP_METHOD(Phalcon_Mvc_Model, save) ZEPHIR_CALL_METHOD(&exists, this_ptr, "has", NULL, 0, &metaData, &readConnection); zephir_check_call_status(); if (zephir_is_true(&exists)) { - ZEPHIR_INIT_ZVAL_NREF(_2$$7); - ZVAL_LONG(&_2$$7, 2); - zephir_update_property_zval(this_ptr, ZEND_STRL("operationMade"), &_2$$7); - } else { ZEPHIR_INIT_ZVAL_NREF(_3$$8); - ZVAL_LONG(&_3$$8, 1); + ZVAL_LONG(&_3$$8, 2); zephir_update_property_zval(this_ptr, ZEND_STRL("operationMade"), &_3$$8); + } else { + ZEPHIR_INIT_ZVAL_NREF(_4$$9); + ZVAL_LONG(&_4$$9, 1); + zephir_update_property_zval(this_ptr, ZEND_STRL("operationMade"), &_4$$9); } - ZEPHIR_INIT_NVAR(&_0); - array_init(&_0); - zephir_update_property_zval(this_ptr, ZEND_STRL("errorMessages"), &_0); + ZEPHIR_INIT_NVAR(&_1); + array_init(&_1); + zephir_update_property_zval(this_ptr, ZEND_STRL("errorMessages"), &_1); ZEPHIR_CALL_METHOD(&identityField, &metaData, "getidentityfield", NULL, 0, this_ptr); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_4, this_ptr, "presave", NULL, 0, &metaData, &exists, &identityField); + ZEPHIR_CALL_METHOD(&_5, this_ptr, "presave", NULL, 0, &metaData, &exists, &identityField); zephir_check_call_status(); - if (ZEPHIR_IS_FALSE_IDENTICAL(&_4)) { + if (ZEPHIR_IS_FALSE_IDENTICAL(&_5)) { if (hasRelatedToSave) { - ZVAL_BOOL(&_5$$10, 0); - ZEPHIR_CALL_METHOD(NULL, &writeConnection, "rollback", NULL, 0, &_5$$10); + ZVAL_BOOL(&_6$$11, 0); + ZEPHIR_CALL_METHOD(NULL, &writeConnection, "rollback", NULL, 0, &_6$$11); zephir_check_call_status(); } if (UNEXPECTED(ZEPHIR_GLOBAL(orm).exception_on_failed_save)) { - ZEPHIR_INIT_VAR(&_6$$11); - object_init_ex(&_6$$11, phalcon_mvc_model_validationfailed_ce); - ZEPHIR_CALL_METHOD(&_7$$11, this_ptr, "getmessages", NULL, 0); + ZEPHIR_INIT_VAR(&_7$$12); + object_init_ex(&_7$$12, phalcon_mvc_model_validationfailed_ce); + ZEPHIR_CALL_METHOD(&_8$$12, this_ptr, "getmessages", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_6$$11, "__construct", NULL, 434, this_ptr, &_7$$11); + ZEPHIR_CALL_METHOD(NULL, &_7$$12, "__construct", NULL, 435, this_ptr, &_8$$12); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$11, "phalcon/Mvc/Model.zep", 2675); + zephir_throw_exception_debug(&_7$$12, "phalcon/Mvc/Model.zep", 2700); ZEPHIR_MM_RESTORE(); return; } @@ -4650,38 +4698,38 @@ PHP_METHOD(Phalcon_Mvc_Model, save) ZEPHIR_CALL_METHOD(&success, this_ptr, "dolowinsert", NULL, 0, &metaData, &writeConnection, &table, &identityField); zephir_check_call_status(); } - if (zephir_is_true(&success)) { - ZEPHIR_INIT_ZVAL_NREF(_8$$14); - ZVAL_LONG(&_8$$14, 0); - zephir_update_property_zval(this_ptr, ZEND_STRL("dirtyState"), &_8$$14); + if (ZEPHIR_IS_TRUE_IDENTICAL(&success)) { + ZEPHIR_INIT_ZVAL_NREF(_9$$15); + ZVAL_LONG(&_9$$15, 0); + zephir_update_property_zval(this_ptr, ZEND_STRL("dirtyState"), &_9$$15); } if (hasRelatedToSave) { if (ZEPHIR_IS_FALSE_IDENTICAL(&success)) { - ZVAL_BOOL(&_9$$16, 0); - ZEPHIR_CALL_METHOD(NULL, &writeConnection, "rollback", NULL, 0, &_9$$16); + ZVAL_BOOL(&_10$$17, 0); + ZEPHIR_CALL_METHOD(NULL, &writeConnection, "rollback", NULL, 0, &_10$$17); zephir_check_call_status(); } else { - ZEPHIR_CALL_METHOD(&success, this_ptr, "postsaverelatedrecords", NULL, 0, &writeConnection, &relatedToSave); + ZEPHIR_CALL_METHOD(&success, this_ptr, "postsaverelatedrecords", NULL, 0, &writeConnection, &relatedToSave, visited); zephir_check_call_status(); } } if (ZEPHIR_GLOBAL(orm).events) { - ZEPHIR_CALL_METHOD(&_10$$18, this_ptr, "postsave", NULL, 0, &success, &exists); + ZEPHIR_CALL_METHOD(&_11$$19, this_ptr, "postsave", NULL, 0, &success, &exists); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&success, &_10$$18); + ZEPHIR_CPY_WRT(&success, &_11$$19); } if (ZEPHIR_IS_FALSE_IDENTICAL(&success)) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "canceloperation", NULL, 0); zephir_check_call_status(); } else { if (hasRelatedToSave) { - ZEPHIR_INIT_VAR(&_11$$21); - array_init(&_11$$21); - zephir_update_property_zval(this_ptr, ZEND_STRL("dirtyRelated"), &_11$$21); + ZEPHIR_INIT_VAR(&_12$$22); + array_init(&_12$$22); + zephir_update_property_zval(this_ptr, ZEND_STRL("dirtyRelated"), &_12$$22); } - ZEPHIR_INIT_VAR(&_12$$20); - ZVAL_STRING(&_12$$20, "afterSave"); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "fireevent", NULL, 0, &_12$$20); + ZEPHIR_INIT_VAR(&_13$$21); + ZVAL_STRING(&_13$$21, "afterSave"); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "fireevent", NULL, 0, &_13$$21); zephir_check_call_status(); } RETURN_CCTOR(&success); @@ -4812,7 +4860,7 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) ZEPHIR_CONCAT_SVS(&_4$$5, "A dependency injection container is required to access the services related to the ODM in '", &_3$$5, "'"); ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 32, &_4$$5); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$5, "phalcon/Mvc/Model.zep", 2794); + zephir_throw_exception_debug(&_2$$5, "phalcon/Mvc/Model.zep", 2820); ZEPHIR_MM_RESTORE(); return; } @@ -4831,7 +4879,7 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) ZEPHIR_CONCAT_SVS(&_9$$6, "The injected service 'modelsManager' is not valid in '", &_8$$6, "'"); ZEPHIR_CALL_METHOD(NULL, &_7$$6, "__construct", NULL, 32, &_9$$6); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$6, "phalcon/Mvc/Model.zep", 2810); + zephir_throw_exception_debug(&_7$$6, "phalcon/Mvc/Model.zep", 2836); ZEPHIR_MM_RESTORE(); return; } @@ -4840,7 +4888,7 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) zephir_check_call_status(); ZEPHIR_OBS_VAR(&properties); if (zephir_array_isset_string_fetch(&properties, &attributes, SL("attributes"), 0)) { - zephir_is_iterable(&properties, 0, "phalcon/Mvc/Model.zep", 2833); + zephir_is_iterable(&properties, 0, "phalcon/Mvc/Model.zep", 2859); if (Z_TYPE_P(&properties) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&properties), _12$$7, _13$$7, _10$$7) { @@ -5094,7 +5142,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", 2951); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 2977); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2$$3, _3$$3, _0$$3) { @@ -5120,7 +5168,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) ZEPHIR_CONCAT_SVSVS(&_6$$7, "Column '", &key, "' doesn't make part of the column map in '", &_5$$7, "'"); ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", &_7, 32, &_6$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_4$$7, "phalcon/Mvc/Model.zep", 2931); + zephir_throw_exception_debug(&_4$$7, "phalcon/Mvc/Model.zep", 2957); ZEPHIR_MM_RESTORE(); return; } @@ -5138,7 +5186,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) ZEPHIR_CONCAT_SVSVS(&_10$$10, "Column '", &key, "' doesn't make part of the column map in '", &_9$$10, "'"); ZEPHIR_CALL_METHOD(NULL, &_8$$10, "__construct", &_7, 32, &_10$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_8$$10, "phalcon/Mvc/Model.zep", 2942); + zephir_throw_exception_debug(&_8$$10, "phalcon/Mvc/Model.zep", 2968); ZEPHIR_MM_RESTORE(); return; } @@ -5174,7 +5222,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) ZEPHIR_CONCAT_SVSVS(&_13$$14, "Column '", &key, "' doesn't make part of the column map in '", &_12$$14, "'"); ZEPHIR_CALL_METHOD(NULL, &_11$$14, "__construct", &_7, 32, &_13$$14); zephir_check_call_status(); - zephir_throw_exception_debug(&_11$$14, "phalcon/Mvc/Model.zep", 2931); + zephir_throw_exception_debug(&_11$$14, "phalcon/Mvc/Model.zep", 2957); ZEPHIR_MM_RESTORE(); return; } @@ -5192,7 +5240,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) ZEPHIR_CONCAT_SVSVS(&_16$$17, "Column '", &key, "' doesn't make part of the column map in '", &_15$$17, "'"); ZEPHIR_CALL_METHOD(NULL, &_14$$17, "__construct", &_7, 32, &_16$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_14$$17, "phalcon/Mvc/Model.zep", 2942); + zephir_throw_exception_debug(&_14$$17, "phalcon/Mvc/Model.zep", 2968); ZEPHIR_MM_RESTORE(); return; } @@ -5276,7 +5324,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", 3016); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 3042); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2$$3, _3$$3, _0$$3) { @@ -5311,7 +5359,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) ZEPHIR_CONCAT_SVSVS(&_9$$8, "Column '", &key, "' doesn't make part of the column map in '", &_8$$8, "'"); ZEPHIR_CALL_METHOD(NULL, &_7$$8, "__construct", &_10, 32, &_9$$8); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$8, "phalcon/Mvc/Model.zep", 2996); + zephir_throw_exception_debug(&_7$$8, "phalcon/Mvc/Model.zep", 3022); ZEPHIR_MM_RESTORE(); return; } @@ -5329,7 +5377,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) ZEPHIR_CONCAT_SVSVS(&_13$$11, "Column '", &key, "' doesn't make part of the column map in '", &_12$$11, "'"); ZEPHIR_CALL_METHOD(NULL, &_11$$11, "__construct", &_10, 32, &_13$$11); zephir_check_call_status(); - zephir_throw_exception_debug(&_11$$11, "phalcon/Mvc/Model.zep", 3007); + zephir_throw_exception_debug(&_11$$11, "phalcon/Mvc/Model.zep", 3033); ZEPHIR_MM_RESTORE(); return; } @@ -5374,7 +5422,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) ZEPHIR_CONCAT_SVSVS(&_18$$16, "Column '", &key, "' doesn't make part of the column map in '", &_17$$16, "'"); ZEPHIR_CALL_METHOD(NULL, &_16$$16, "__construct", &_10, 32, &_18$$16); zephir_check_call_status(); - zephir_throw_exception_debug(&_16$$16, "phalcon/Mvc/Model.zep", 2996); + zephir_throw_exception_debug(&_16$$16, "phalcon/Mvc/Model.zep", 3022); ZEPHIR_MM_RESTORE(); return; } @@ -5392,7 +5440,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) ZEPHIR_CONCAT_SVSVS(&_21$$19, "Column '", &key, "' doesn't make part of the column map in '", &_20$$19, "'"); ZEPHIR_CALL_METHOD(NULL, &_19$$19, "__construct", &_10, 32, &_21$$19); zephir_check_call_status(); - zephir_throw_exception_debug(&_19$$19, "phalcon/Mvc/Model.zep", 3007); + zephir_throw_exception_debug(&_19$$19, "phalcon/Mvc/Model.zep", 3033); ZEPHIR_MM_RESTORE(); return; } @@ -5783,7 +5831,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", 3293); + zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model.zep", 3319); if (Z_TYPE_P(&_0) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_0), _1) { @@ -5810,7 +5858,7 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) ZEPHIR_CONCAT_SVSVS(&_8$$7, "Column '", &attribute, "' doesn't make part of the column map in '", &_7$$7, "'"); ZEPHIR_CALL_METHOD(NULL, &_6$$7, "__construct", &_9, 32, &_8$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$7, "phalcon/Mvc/Model.zep", 3271); + zephir_throw_exception_debug(&_6$$7, "phalcon/Mvc/Model.zep", 3297); ZEPHIR_MM_RESTORE(); return; } @@ -5863,7 +5911,7 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) ZEPHIR_CONCAT_SVSVS(&_14$$17, "Column '", &attribute, "' doesn't make part of the column map in '", &_13$$17, "'"); ZEPHIR_CALL_METHOD(NULL, &_12$$17, "__construct", &_9, 32, &_14$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_12$$17, "phalcon/Mvc/Model.zep", 3271); + zephir_throw_exception_debug(&_12$$17, "phalcon/Mvc/Model.zep", 3297); ZEPHIR_MM_RESTORE(); return; } @@ -6084,7 +6132,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", 3513); + zephir_is_iterable(&belongsTo, 0, "phalcon/Mvc/Model.zep", 3539); if (Z_TYPE_P(&belongsTo) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&belongsTo), _1) { @@ -6099,7 +6147,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", 3399); + zephir_array_fetch_string(&_3$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3425); action = zephir_get_intval(&_3$$5); } if (action != 1) { @@ -6119,7 +6167,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", 3442); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3468); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _8$$7, _9$$7, _6$$7) { @@ -6133,11 +6181,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", 3434); + 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", 3434); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3435); + 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); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -6157,11 +6205,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", 3434); + zephir_array_fetch(&_12$$10, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3460); 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", 3434); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3435); + zephir_array_append(&conditions, &_13$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3460); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3461); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -6177,15 +6225,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", 3446); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3447); + zephir_array_append(&conditions, &_14$$12, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3472); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3473); 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", 3458); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3484); } if (validateWithNulls) { ZEPHIR_OBS_NVAR(&allowNulls); @@ -6260,7 +6308,7 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) action = 1; if (zephir_array_isset_string(&foreignKey, SL("action"))) { ZEPHIR_OBS_NVAR(&_27$$24); - zephir_array_fetch_string(&_27$$24, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3399); + zephir_array_fetch_string(&_27$$24, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3425); action = zephir_get_intval(&_27$$24); } if (action != 1) { @@ -6280,7 +6328,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", 3442); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3468); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _32$$26, _33$$26, _30$$26) { @@ -6294,11 +6342,11 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) ZVAL_COPY(&field, _30$$26); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_34$$27, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3434); + zephir_array_fetch(&_34$$27, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3460); ZEPHIR_INIT_NVAR(&_35$$27); ZEPHIR_CONCAT_SVSV(&_35$$27, "[", &_34$$27, "] = ?", &position); - zephir_array_append(&conditions, &_35$$27, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3434); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3435); + zephir_array_append(&conditions, &_35$$27, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3460); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3461); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -6318,11 +6366,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(&_36$$29, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3434); + zephir_array_fetch(&_36$$29, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3460); ZEPHIR_INIT_NVAR(&_37$$29); ZEPHIR_CONCAT_SVSV(&_37$$29, "[", &_36$$29, "] = ?", &position); - zephir_array_append(&conditions, &_37$$29, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3434); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3435); + zephir_array_append(&conditions, &_37$$29, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3460); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3461); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -6338,15 +6386,15 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_NVAR(&_38$$31); ZEPHIR_CONCAT_SVS(&_38$$31, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_38$$31, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3446); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3447); + zephir_array_append(&conditions, &_38$$31, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3472); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3473); 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", 3458); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3484); } if (validateWithNulls) { ZEPHIR_OBS_NVAR(&allowNulls); @@ -6451,7 +6499,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", 3589); + zephir_is_iterable(&relations, 0, "phalcon/Mvc/Model.zep", 3615); if (Z_TYPE_P(&relations) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relations), _1) { @@ -6469,7 +6517,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", 3563); + zephir_array_fetch_string(&_4$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3589); action = zephir_get_intval(&_4$$5); } if (action != 2) { @@ -6508,7 +6556,7 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysReverseCascade) } if (_7$$9) { ZEPHIR_OBS_NVAR(&_8$$11); - zephir_array_fetch_string(&_8$$11, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3563); + zephir_array_fetch_string(&_8$$11, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3589); action = zephir_get_intval(&_8$$11); } if (action != 2) { @@ -6580,7 +6628,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", 3680); + zephir_is_iterable(&relations, 0, "phalcon/Mvc/Model.zep", 3706); if (Z_TYPE_P(&relations) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relations), _1) { @@ -6598,7 +6646,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", 3634); + zephir_array_fetch_string(&_4$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3660); action = zephir_get_intval(&_4$$5); } if (action != 1) { @@ -6661,7 +6709,7 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysReverseRestrict) } if (_15$$9) { ZEPHIR_OBS_NVAR(&_16$$11); - zephir_array_fetch_string(&_16$$11, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3634); + zephir_array_fetch_string(&_16$$11, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3660); action = zephir_get_intval(&_16$$11); } if (action != 1) { @@ -6851,7 +6899,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) ZEPHIR_INIT_NVAR(&columnMap); ZVAL_NULL(&columnMap); } - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 3802); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 3828); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _1) { @@ -6868,7 +6916,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) ZEPHIR_CONCAT_SVSVS(&_5$$7, "Column '", &field, "' in '", &_4$$7, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", &_6, 32, &_5$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 3736); + zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 3762); ZEPHIR_MM_RESTORE(); return; } @@ -6884,9 +6932,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) _7$$11 = zephir_array_isset(&defaultValues, &field); } if (_7$$11) { - zephir_array_fetch(&_8$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3753); + zephir_array_fetch(&_8$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3779); 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", 3754); + zephir_array_fetch(&_9$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3780); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_9$$12, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(&_10$$12, connection, "supportsdefaultvalue", &_11, 0); zephir_check_call_status(); @@ -6908,18 +6956,18 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) ZEPHIR_CONCAT_SVSVS(&_15$$15, "Column '", &field, "' in '", &_14$$15, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_13$$15, "__construct", &_6, 32, &_15$$15); zephir_check_call_status(); - zephir_throw_exception_debug(&_13$$15, "phalcon/Mvc/Model.zep", 3771); + zephir_throw_exception_debug(&_13$$15, "phalcon/Mvc/Model.zep", 3797); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3774); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3775); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3776); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3800); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3801); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3802); } else { if (zephir_array_isset(&defaultValues, &field)) { - zephir_array_fetch(&_16$$17, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3779); + zephir_array_fetch(&_16$$17, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3805); zephir_array_update_zval(&snapshot, &attributeField, &_16$$17, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_17$$17, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3780); + zephir_array_fetch(&_17$$17, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3806); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_17$$17, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(&_18$$17, connection, "supportsdefaultvalue", &_19, 0); zephir_check_call_status(); @@ -6928,13 +6976,13 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) } ZEPHIR_CALL_METHOD(&_20$$17, connection, "getdefaultvalue", &_21, 0); zephir_check_call_status(); - zephir_array_append(&values, &_20$$17, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3786); + zephir_array_append(&values, &_20$$17, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3812); } else { - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3788); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3814); zephir_array_update_zval(&snapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3792); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3793); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3818); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3819); } } } @@ -6961,7 +7009,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) ZEPHIR_CONCAT_SVSVS(&_24$$22, "Column '", &field, "' in '", &_23$$22, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_22$$22, "__construct", &_6, 32, &_24$$22); zephir_check_call_status(); - zephir_throw_exception_debug(&_22$$22, "phalcon/Mvc/Model.zep", 3736); + zephir_throw_exception_debug(&_22$$22, "phalcon/Mvc/Model.zep", 3762); ZEPHIR_MM_RESTORE(); return; } @@ -6977,9 +7025,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) _25$$26 = zephir_array_isset(&defaultValues, &field); } if (_25$$26) { - zephir_array_fetch(&_26$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3753); + zephir_array_fetch(&_26$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3779); zephir_array_update_zval(&snapshot, &attributeField, &_26$$27, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_27$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3754); + zephir_array_fetch(&_27$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3780); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_27$$27, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(&_28$$27, connection, "supportsdefaultvalue", &_29, 0); zephir_check_call_status(); @@ -7001,18 +7049,18 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) ZEPHIR_CONCAT_SVSVS(&_33$$30, "Column '", &field, "' in '", &_32$$30, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_31$$30, "__construct", &_6, 32, &_33$$30); zephir_check_call_status(); - zephir_throw_exception_debug(&_31$$30, "phalcon/Mvc/Model.zep", 3771); + zephir_throw_exception_debug(&_31$$30, "phalcon/Mvc/Model.zep", 3797); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3774); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3775); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3776); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3800); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3801); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3802); } else { if (zephir_array_isset(&defaultValues, &field)) { - zephir_array_fetch(&_34$$32, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3779); + zephir_array_fetch(&_34$$32, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3805); zephir_array_update_zval(&snapshot, &attributeField, &_34$$32, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_35$$32, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3780); + zephir_array_fetch(&_35$$32, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3806); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_35$$32, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(&_36$$32, connection, "supportsdefaultvalue", &_37, 0); zephir_check_call_status(); @@ -7021,13 +7069,13 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) } ZEPHIR_CALL_METHOD(&_38$$32, connection, "getdefaultvalue", &_39, 0); zephir_check_call_status(); - zephir_array_append(&values, &_38$$32, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3786); + zephir_array_append(&values, &_38$$32, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3812); } else { - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3788); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3814); zephir_array_update_zval(&snapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3792); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3793); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3818); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3819); } } } @@ -7043,7 +7091,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) zephir_check_call_status(); useExplicitIdentity = zephir_get_boolval(&_40$$35); if (useExplicitIdentity) { - zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3812); + zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3838); } if (Z_TYPE_P(&columnMap) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&attributeField); @@ -7056,7 +7104,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) ZEPHIR_CONCAT_SVSVS(&_43$$38, "Identity column '", identityField, "' isn't part of the column map in '", &_42$$38, "'"); ZEPHIR_CALL_METHOD(NULL, &_41$$38, "__construct", &_6, 32, &_43$$38); zephir_check_call_status(); - zephir_throw_exception_debug(&_41$$38, "phalcon/Mvc/Model.zep", 3822); + zephir_throw_exception_debug(&_41$$38, "phalcon/Mvc/Model.zep", 3848); ZEPHIR_MM_RESTORE(); return; } @@ -7071,12 +7119,12 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) } if (_44$$40) { if (useExplicitIdentity) { - zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3834); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3834); + zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3860); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3860); } } else { if (!(useExplicitIdentity)) { - zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3842); + zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3868); } ZEPHIR_OBS_NVAR(&bindType); if (UNEXPECTED(!(zephir_array_isset_fetch(&bindType, &bindDataTypes, identityField, 0)))) { @@ -7088,23 +7136,23 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) ZEPHIR_CONCAT_SVSVS(&_47$$45, "Identity column '", identityField, "' isn\'t part of the table columns in '", &_46$$45, "'"); ZEPHIR_CALL_METHOD(NULL, &_45$$45, "__construct", &_6, 32, &_47$$45); zephir_check_call_status(); - zephir_throw_exception_debug(&_45$$45, "phalcon/Mvc/Model.zep", 3851); + zephir_throw_exception_debug(&_45$$45, "phalcon/Mvc/Model.zep", 3877); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3854); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3855); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3880); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3881); } } else { if (useExplicitIdentity) { - zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3859); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3860); + zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3885); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3886); } } } if (Z_TYPE_P(table) == IS_ARRAY) { - zephir_array_fetch_long(&_48$$48, table, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3869); - zephir_array_fetch_long(&_49$$48, table, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3869); + zephir_array_fetch_long(&_48$$48, table, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3895); + zephir_array_fetch_long(&_49$$48, table, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3895); ZEPHIR_INIT_VAR(&_50$$48); ZEPHIR_CONCAT_VSV(&_50$$48, &_48$$48, ".", &_49$$48); ZEPHIR_CPY_WRT(table, &_50$$48); @@ -7150,7 +7198,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) zephir_update_property_zval(this_ptr, ZEND_STRL("uniqueParams"), &__$null); } if (zephir_is_true(&success)) { - zephir_is_iterable(&unsetDefaultValues, 0, "phalcon/Mvc/Model.zep", 3930); + zephir_is_iterable(&unsetDefaultValues, 0, "phalcon/Mvc/Model.zep", 3956); if (Z_TYPE_P(&unsetDefaultValues) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&unsetDefaultValues), _57$$56, _58$$56, _55$$56) { @@ -7353,7 +7401,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) _2 = Z_TYPE_P(&snapshot) == IS_ARRAY; } if (EXPECTED(_2)) { - zephir_is_iterable(&nonPrimary, 0, "phalcon/Mvc/Model.zep", 4090); + zephir_is_iterable(&nonPrimary, 0, "phalcon/Mvc/Model.zep", 4116); if (Z_TYPE_P(&nonPrimary) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&nonPrimary), _3$$5) { @@ -7372,7 +7420,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_CONCAT_SVSVS(&_7$$9, "Column '", &field, "' in '", &_6$$9, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_5$$9, "__construct", &_8, 32, &_7$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/Model.zep", 3984); + zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/Model.zep", 4010); ZEPHIR_MM_RESTORE(); return; } @@ -7391,7 +7439,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_CONCAT_SVSVS(&_11$$12, "Column '", &field, "' in '", &_10$$12, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_9$$12, "__construct", &_8, 32, &_11$$12); zephir_check_call_status(); - zephir_throw_exception_debug(&_9$$12, "phalcon/Mvc/Model.zep", 3997); + zephir_throw_exception_debug(&_9$$12, "phalcon/Mvc/Model.zep", 4023); ZEPHIR_MM_RESTORE(); return; } @@ -7417,7 +7465,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_CONCAT_SVSVS(&_14$$20, "Column '", &field, "' in '", &_13$$20, "' have not defined a data type"); ZEPHIR_CALL_METHOD(NULL, &_12$$20, "__construct", &_8, 32, &_14$$20); zephir_check_call_status(); - zephir_throw_exception_debug(&_12$$20, "phalcon/Mvc/Model.zep", 4027); + zephir_throw_exception_debug(&_12$$20, "phalcon/Mvc/Model.zep", 4053); ZEPHIR_MM_RESTORE(); return; } @@ -7465,9 +7513,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) } } if (changed) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4077); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4078); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4079); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4103); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4104); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4105); } zephir_array_update_zval(&newSnapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } else { @@ -7499,7 +7547,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_CONCAT_SVSVS(&_25$$32, "Column '", &field, "' in '", &_24$$32, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_23$$32, "__construct", &_8, 32, &_25$$32); zephir_check_call_status(); - zephir_throw_exception_debug(&_23$$32, "phalcon/Mvc/Model.zep", 3984); + zephir_throw_exception_debug(&_23$$32, "phalcon/Mvc/Model.zep", 4010); ZEPHIR_MM_RESTORE(); return; } @@ -7518,7 +7566,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_CONCAT_SVSVS(&_28$$35, "Column '", &field, "' in '", &_27$$35, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_26$$35, "__construct", &_8, 32, &_28$$35); zephir_check_call_status(); - zephir_throw_exception_debug(&_26$$35, "phalcon/Mvc/Model.zep", 3997); + zephir_throw_exception_debug(&_26$$35, "phalcon/Mvc/Model.zep", 4023); ZEPHIR_MM_RESTORE(); return; } @@ -7544,7 +7592,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_CONCAT_SVSVS(&_31$$43, "Column '", &field, "' in '", &_30$$43, "' have not defined a data type"); ZEPHIR_CALL_METHOD(NULL, &_29$$43, "__construct", &_8, 32, &_31$$43); zephir_check_call_status(); - zephir_throw_exception_debug(&_29$$43, "phalcon/Mvc/Model.zep", 4027); + zephir_throw_exception_debug(&_29$$43, "phalcon/Mvc/Model.zep", 4053); ZEPHIR_MM_RESTORE(); return; } @@ -7592,9 +7640,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) } } if (changed) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4077); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4078); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4079); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4103); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4104); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4105); } zephir_array_update_zval(&newSnapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } else { @@ -7611,7 +7659,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) RETURN_MM_BOOL(1); } } else { - zephir_is_iterable(&nonPrimary, 0, "phalcon/Mvc/Model.zep", 4145); + zephir_is_iterable(&nonPrimary, 0, "phalcon/Mvc/Model.zep", 4171); if (Z_TYPE_P(&nonPrimary) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&nonPrimary), _39$$53) { @@ -7629,7 +7677,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_CONCAT_SVSVS(&_43$$57, "Column '", &field, "' in '", &_42$$57, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_41$$57, "__construct", &_8, 32, &_43$$57); zephir_check_call_status(); - zephir_throw_exception_debug(&_41$$57, "phalcon/Mvc/Model.zep", 4108); + zephir_throw_exception_debug(&_41$$57, "phalcon/Mvc/Model.zep", 4134); ZEPHIR_MM_RESTORE(); return; } @@ -7648,21 +7696,21 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_CONCAT_SVSVS(&_46$$60, "Column '", &field, "' in '", &_45$$60, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_44$$60, "__construct", &_8, 32, &_46$$60); zephir_check_call_status(); - zephir_throw_exception_debug(&_44$$60, "phalcon/Mvc/Model.zep", 4122); + zephir_throw_exception_debug(&_44$$60, "phalcon/Mvc/Model.zep", 4148); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_OBS_NVAR(&value); if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4133); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4134); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4135); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4159); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4160); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4161); 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", 4139); - zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4140); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4141); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4165); + zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4166); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4167); } } } ZEND_HASH_FOREACH_END(); @@ -7689,7 +7737,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_CONCAT_SVSVS(&_49$$66, "Column '", &field, "' in '", &_48$$66, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_47$$66, "__construct", &_8, 32, &_49$$66); zephir_check_call_status(); - zephir_throw_exception_debug(&_47$$66, "phalcon/Mvc/Model.zep", 4108); + zephir_throw_exception_debug(&_47$$66, "phalcon/Mvc/Model.zep", 4134); ZEPHIR_MM_RESTORE(); return; } @@ -7708,21 +7756,21 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_CONCAT_SVSVS(&_52$$69, "Column '", &field, "' in '", &_51$$69, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_50$$69, "__construct", &_8, 32, &_52$$69); zephir_check_call_status(); - zephir_throw_exception_debug(&_50$$69, "phalcon/Mvc/Model.zep", 4122); + zephir_throw_exception_debug(&_50$$69, "phalcon/Mvc/Model.zep", 4148); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_OBS_NVAR(&value); if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4133); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4134); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4135); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4159); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4160); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4161); 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", 4139); - zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4140); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4141); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4165); + zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4166); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4167); } } ZEPHIR_CALL_METHOD(NULL, &nonPrimary, "next", NULL, 0); @@ -7750,13 +7798,13 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_CONCAT_SVS(&_55$$74, "A primary key must be defined in the model in order to perform the operation in '", &_54$$74, "'"); ZEPHIR_CALL_METHOD(NULL, &_53$$74, "__construct", &_8, 32, &_55$$74); zephir_check_call_status(); - zephir_throw_exception_debug(&_53$$74, "phalcon/Mvc/Model.zep", 4168); + zephir_throw_exception_debug(&_53$$74, "phalcon/Mvc/Model.zep", 4194); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_NVAR(&uniqueParams); array_init(&uniqueParams); - zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 4195); + zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 4221); if (Z_TYPE_P(&primaryKeys) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&primaryKeys), _56$$73) { @@ -7773,7 +7821,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_CONCAT_SVSVS(&_60$$77, "Column '", &field, "' in '", &_59$$77, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_58$$77, "__construct", &_8, 32, &_60$$77); zephir_check_call_status(); - zephir_throw_exception_debug(&_58$$77, "phalcon/Mvc/Model.zep", 4181); + zephir_throw_exception_debug(&_58$$77, "phalcon/Mvc/Model.zep", 4207); ZEPHIR_MM_RESTORE(); return; } @@ -7783,10 +7831,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", 4189); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4215); } else { zephir_array_update_zval(&newSnapshot, &attributeField, &__$null, PH_COPY | PH_SEPARATE); - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4192); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4218); } } ZEND_HASH_FOREACH_END(); } else { @@ -7811,7 +7859,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_CONCAT_SVSVS(&_63$$83, "Column '", &field, "' in '", &_62$$83, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_61$$83, "__construct", &_8, 32, &_63$$83); zephir_check_call_status(); - zephir_throw_exception_debug(&_61$$83, "phalcon/Mvc/Model.zep", 4181); + zephir_throw_exception_debug(&_61$$83, "phalcon/Mvc/Model.zep", 4207); ZEPHIR_MM_RESTORE(); return; } @@ -7821,10 +7869,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", 4189); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4215); } else { zephir_array_update_zval(&newSnapshot, &attributeField, &__$null, PH_COPY | PH_SEPARATE); - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4192); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4218); } ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "next", NULL, 0); zephir_check_call_status(); @@ -7833,8 +7881,8 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_INIT_NVAR(&field); } if (Z_TYPE_P(table) == IS_ARRAY) { - zephir_array_fetch_long(&_64$$87, table, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4201); - zephir_array_fetch_long(&_65$$87, table, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4201); + zephir_array_fetch_long(&_64$$87, table, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4227); + zephir_array_fetch_long(&_65$$87, table, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4227); ZEPHIR_INIT_VAR(&_66$$87); ZEPHIR_CONCAT_VSV(&_66$$87, &_64$$87, ".", &_65$$87); ZEPHIR_CPY_WRT(table, &_66$$87); @@ -7976,7 +8024,7 @@ PHP_METHOD(Phalcon_Mvc_Model, has) array_init(&uniqueParams); ZEPHIR_INIT_NVAR(&uniqueTypes); array_init(&uniqueTypes); - zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 4325); + zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 4351); if (Z_TYPE_P(&primaryKeys) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&primaryKeys), _1$$3) { @@ -7993,7 +8041,7 @@ PHP_METHOD(Phalcon_Mvc_Model, has) ZEPHIR_CONCAT_SVSVS(&_5$$9, "Column '", &field, "' in '", &_4$$9, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_3$$9, "__construct", &_6, 32, &_5$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$9, "phalcon/Mvc/Model.zep", 4284); + zephir_throw_exception_debug(&_3$$9, "phalcon/Mvc/Model.zep", 4310); ZEPHIR_MM_RESTORE(); return; } @@ -8011,9 +8059,9 @@ PHP_METHOD(Phalcon_Mvc_Model, has) if (_7$$11) { numberEmpty++; } - zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4305); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4331); } else { - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4307); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4333); numberEmpty++; } ZEPHIR_OBS_NVAR(&type); @@ -8026,16 +8074,16 @@ PHP_METHOD(Phalcon_Mvc_Model, has) ZEPHIR_CONCAT_SVSVS(&_10$$14, "Column '", &field, "' in '", &_9$$14, "' isn't part of the table columns"); ZEPHIR_CALL_METHOD(NULL, &_8$$14, "__construct", &_6, 32, &_10$$14); zephir_check_call_status(); - zephir_throw_exception_debug(&_8$$14, "phalcon/Mvc/Model.zep", 4314); + zephir_throw_exception_debug(&_8$$14, "phalcon/Mvc/Model.zep", 4340); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4317); + zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4343); ZEPHIR_CALL_METHOD(&_11$$7, connection, "escapeidentifier", &_12, 0, &field); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_13$$7); ZEPHIR_CONCAT_VS(&_13$$7, &_11$$7, " = ?"); - zephir_array_append(&wherePk, &_13$$7, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4318); + zephir_array_append(&wherePk, &_13$$7, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4344); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "rewind", NULL, 0); @@ -8059,7 +8107,7 @@ PHP_METHOD(Phalcon_Mvc_Model, has) ZEPHIR_CONCAT_SVSVS(&_16$$17, "Column '", &field, "' in '", &_15$$17, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_14$$17, "__construct", &_6, 32, &_16$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_14$$17, "phalcon/Mvc/Model.zep", 4284); + zephir_throw_exception_debug(&_14$$17, "phalcon/Mvc/Model.zep", 4310); ZEPHIR_MM_RESTORE(); return; } @@ -8077,9 +8125,9 @@ PHP_METHOD(Phalcon_Mvc_Model, has) if (_17$$19) { numberEmpty++; } - zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4305); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4331); } else { - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4307); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4333); numberEmpty++; } ZEPHIR_OBS_NVAR(&type); @@ -8092,16 +8140,16 @@ PHP_METHOD(Phalcon_Mvc_Model, has) ZEPHIR_CONCAT_SVSVS(&_20$$22, "Column '", &field, "' in '", &_19$$22, "' isn't part of the table columns"); ZEPHIR_CALL_METHOD(NULL, &_18$$22, "__construct", &_6, 32, &_20$$22); zephir_check_call_status(); - zephir_throw_exception_debug(&_18$$22, "phalcon/Mvc/Model.zep", 4314); + zephir_throw_exception_debug(&_18$$22, "phalcon/Mvc/Model.zep", 4340); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4317); + zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4343); ZEPHIR_CALL_METHOD(&_21$$15, connection, "escapeidentifier", &_22, 0, &field); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_23$$15); ZEPHIR_CONCAT_VS(&_23$$15, &_21$$15, " = ?"); - zephir_array_append(&wherePk, &_23$$15, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4318); + zephir_array_append(&wherePk, &_23$$15, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4344); ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "next", NULL, 0); zephir_check_call_status(); } @@ -8152,7 +8200,7 @@ PHP_METHOD(Phalcon_Mvc_Model, has) ZVAL_NULL(&_29); ZEPHIR_CALL_METHOD(&num, connection, "fetchone", NULL, 0, &_28, &_29, &uniqueParams, &uniqueTypes); zephir_check_call_status(); - zephir_array_fetch_string(&_30, &num, SL("rowcount"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4379); + zephir_array_fetch_string(&_30, &num, SL("rowcount"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4405); if (zephir_is_true(&_30)) { ZEPHIR_INIT_ZVAL_NREF(_31$$30); ZVAL_LONG(&_31$$30, 0); @@ -8365,7 +8413,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", 4484); + zephir_array_append(¶ms, parameters, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4510); } } else { ZEPHIR_CPY_WRT(¶ms, parameters); @@ -8409,10 +8457,10 @@ PHP_METHOD(Phalcon_Mvc_Model, groupResult) } if (zephir_array_isset_string(¶ms, SL("bind"))) { ZEPHIR_OBS_NVAR(&bindParams); - zephir_array_fetch_string(&bindParams, ¶ms, SL("bind"), PH_NOISY, "phalcon/Mvc/Model.zep", 4527); + zephir_array_fetch_string(&bindParams, ¶ms, SL("bind"), PH_NOISY, "phalcon/Mvc/Model.zep", 4553); if (zephir_array_isset_string(¶ms, SL("bindTypes"))) { ZEPHIR_OBS_NVAR(&bindTypes); - zephir_array_fetch_string(&bindTypes, ¶ms, SL("bindTypes"), PH_NOISY, "phalcon/Mvc/Model.zep", 4530); + zephir_array_fetch_string(&bindTypes, ¶ms, SL("bindTypes"), PH_NOISY, "phalcon/Mvc/Model.zep", 4556); } } ZEPHIR_OBS_VAR(&cache); @@ -8524,7 +8572,7 @@ PHP_METHOD(Phalcon_Mvc_Model, invokeFinder) ZEPHIR_CONCAT_SVSVS(&_5$$7, "The static method '", &method, "' in '", &_4$$7, "' requires one argument"); ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", NULL, 32, &_5$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 4609); + zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 4635); ZEPHIR_MM_RESTORE(); return; } @@ -8558,7 +8606,7 @@ PHP_METHOD(Phalcon_Mvc_Model, invokeFinder) ZEPHIR_CONCAT_SVSVS(&_8$$13, "Cannot resolve attribute '", &extraMethod, "' in the model '", &_7$$13, "'"); ZEPHIR_CALL_METHOD(NULL, &_6$$13, "__construct", NULL, 32, &_8$$13); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$13, "phalcon/Mvc/Model.zep", 4646); + zephir_throw_exception_debug(&_6$$13, "phalcon/Mvc/Model.zep", 4672); ZEPHIR_MM_RESTORE(); return; } @@ -8755,7 +8803,7 @@ PHP_METHOD(Phalcon_Mvc_Model, preSave) } } if (ZEPHIR_GLOBAL(orm).virtual_foreign_keys) { - ZEPHIR_CALL_METHOD(&_3$$8, this_ptr, "checkforeignkeysrestrict", NULL, 435); + ZEPHIR_CALL_METHOD(&_3$$8, this_ptr, "checkforeignkeysrestrict", NULL, 436); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&_3$$8)) { RETURN_MM_BOOL(0); @@ -8786,7 +8834,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", 4887); + zephir_is_iterable(¬Null, 0, "phalcon/Mvc/Model.zep", 4913); if (Z_TYPE_P(¬Null) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(¬Null), _4$$11) { @@ -8804,7 +8852,7 @@ PHP_METHOD(Phalcon_Mvc_Model, preSave) ZEPHIR_CONCAT_SVSVS(&_8$$19, "Column '", &field, "' in '", &_7$$19, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_6$$19, "__construct", &_9, 32, &_8$$19); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$19, "phalcon/Mvc/Model.zep", 4807); + zephir_throw_exception_debug(&_6$$19, "phalcon/Mvc/Model.zep", 4833); ZEPHIR_MM_RESTORE(); return; } @@ -8829,7 +8877,7 @@ PHP_METHOD(Phalcon_Mvc_Model, preSave) if (_11$$27) { _12$$27 = !(zephir_array_isset(&defaultValues, &field)); if (!(_12$$27)) { - zephir_array_fetch(&_13$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4837); + zephir_array_fetch(&_13$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4863); _12$$27 = !ZEPHIR_IS_IDENTICAL(&value, &_13$$27); } _11$$27 = _12$$27; @@ -8900,7 +8948,7 @@ PHP_METHOD(Phalcon_Mvc_Model, preSave) ZEPHIR_CONCAT_SVSVS(&_22$$39, "Column '", &field, "' in '", &_21$$39, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_20$$39, "__construct", &_9, 32, &_22$$39); zephir_check_call_status(); - zephir_throw_exception_debug(&_20$$39, "phalcon/Mvc/Model.zep", 4807); + zephir_throw_exception_debug(&_20$$39, "phalcon/Mvc/Model.zep", 4833); ZEPHIR_MM_RESTORE(); return; } @@ -8925,7 +8973,7 @@ PHP_METHOD(Phalcon_Mvc_Model, preSave) if (_24$$47) { _25$$47 = !(zephir_array_isset(&defaultValues, &field)); if (!(_25$$47)) { - zephir_array_fetch(&_26$$47, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4837); + zephir_array_fetch(&_26$$47, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4863); _25$$47 = !ZEPHIR_IS_IDENTICAL(&value, &_26$$47); } _24$$47 = _25$$47; @@ -9059,6 +9107,7 @@ PHP_METHOD(Phalcon_Mvc_Model, preSave) * Saves related records that must be stored prior to save the master record * * @param ModelInterface[] related + * @param CollectionInterface visited * @return bool */ PHP_METHOD(Phalcon_Mvc_Model, preSaveRelatedRecords) @@ -9069,11 +9118,12 @@ PHP_METHOD(Phalcon_Mvc_Model, preSaveRelatedRecords) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zephir_fcall_cache_entry *_7 = NULL, *_9 = NULL, *_13 = NULL, *_15 = NULL, *_22 = NULL, *_24 = NULL, *_27 = NULL, *_29 = NULL, *_34 = NULL, *_42 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *connection, connection_sub, *related, related_sub, className, manager, type, relation, columns, referencedFields, name, record, _0, _1, *_2, _3, _6$$3, _8$$6, _10$$6, _11$$6, _12$$6, _14$$7, _16$$7, _17$$7, _18$$7, _19$$5, _21$$5, _25$$5, _23$$8, _26$$9, _28$$12, _30$$12, _31$$12, _32$$12, _33$$13, _35$$13, _36$$13, _37$$13, _38$$11, _40$$11, _43$$11, _41$$14; + zval *connection, connection_sub, *related, related_sub, *visited, visited_sub, className, manager, type, relation, columns, referencedFields, name, record, _0, _1, *_2, _3, _6$$3, _8$$6, _10$$6, _11$$6, _12$$6, _14$$7, _16$$7, _17$$7, _18$$7, _19$$5, _21$$5, _25$$5, _23$$8, _26$$9, _28$$12, _30$$12, _31$$12, _32$$12, _33$$13, _35$$13, _36$$13, _37$$13, _38$$11, _40$$11, _43$$11, _41$$14; zval *this_ptr = getThis(); ZVAL_UNDEF(&connection_sub); ZVAL_UNDEF(&related_sub); + ZVAL_UNDEF(&visited_sub); ZVAL_UNDEF(&className); ZVAL_UNDEF(&manager); ZVAL_UNDEF(&type); @@ -9113,15 +9163,16 @@ PHP_METHOD(Phalcon_Mvc_Model, preSaveRelatedRecords) ZVAL_UNDEF(&_41$$14); #if PHP_VERSION_ID >= 80000 bool is_null_true = 1; - ZEND_PARSE_PARAMETERS_START(2, 2) + ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_db_adapter_adapterinterface_ce) Z_PARAM_ZVAL(related) + Z_PARAM_OBJECT_OF_CLASS(visited, phalcon_support_collection_collectioninterface_ce) ZEND_PARSE_PARAMETERS_END(); #endif ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 2, 0, &connection, &related); + zephir_fetch_params(1, 3, 0, &connection, &related, &visited); nesting = 0; @@ -9137,7 +9188,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", 5050); + zephir_is_iterable(related, 0, "phalcon/Mvc/Model.zep", 5077); if (Z_TYPE_P(related) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(related), _4, _5, _2) { @@ -9172,7 +9223,7 @@ PHP_METHOD(Phalcon_Mvc_Model, preSaveRelatedRecords) ZEPHIR_CONCAT_SVSV(&_12$$6, "Only objects can be stored as part of belongs-to relations in '", &_11$$6, "' Relation ", &name); ZEPHIR_CALL_METHOD(NULL, &_10$$6, "__construct", &_13, 32, &_12$$6); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$6, "phalcon/Mvc/Model.zep", 5007); + zephir_throw_exception_debug(&_10$$6, "phalcon/Mvc/Model.zep", 5035); ZEPHIR_MM_RESTORE(); return; } @@ -9196,14 +9247,14 @@ PHP_METHOD(Phalcon_Mvc_Model, preSaveRelatedRecords) ZEPHIR_CONCAT_SVSV(&_18$$7, "Not implemented in '", &_17$$7, "' Relation ", &name); ZEPHIR_CALL_METHOD(NULL, &_16$$7, "__construct", &_13, 32, &_18$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_16$$7, "phalcon/Mvc/Model.zep", 5019); + zephir_throw_exception_debug(&_16$$7, "phalcon/Mvc/Model.zep", 5046); ZEPHIR_MM_RESTORE(); return; } zephir_read_property(&_19$$5, &record, ZEND_STRL("dirtyState"), PH_NOISY_CC | PH_READONLY); _20$$5 = !ZEPHIR_IS_LONG_IDENTICAL(&_19$$5, 0); if (_20$$5) { - ZEPHIR_CALL_METHOD(&_21$$5, &record, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_21$$5, &record, "dosave", NULL, 0, visited); zephir_check_call_status(); _20$$5 = !zephir_is_true(&_21$$5); } @@ -9261,7 +9312,7 @@ PHP_METHOD(Phalcon_Mvc_Model, preSaveRelatedRecords) ZEPHIR_CONCAT_SVSV(&_32$$12, "Only objects can be stored as part of belongs-to relations in '", &_31$$12, "' Relation ", &name); ZEPHIR_CALL_METHOD(NULL, &_30$$12, "__construct", &_13, 32, &_32$$12); zephir_check_call_status(); - zephir_throw_exception_debug(&_30$$12, "phalcon/Mvc/Model.zep", 5007); + zephir_throw_exception_debug(&_30$$12, "phalcon/Mvc/Model.zep", 5035); ZEPHIR_MM_RESTORE(); return; } @@ -9285,14 +9336,14 @@ PHP_METHOD(Phalcon_Mvc_Model, preSaveRelatedRecords) ZEPHIR_CONCAT_SVSV(&_37$$13, "Not implemented in '", &_36$$13, "' Relation ", &name); ZEPHIR_CALL_METHOD(NULL, &_35$$13, "__construct", &_13, 32, &_37$$13); zephir_check_call_status(); - zephir_throw_exception_debug(&_35$$13, "phalcon/Mvc/Model.zep", 5019); + zephir_throw_exception_debug(&_35$$13, "phalcon/Mvc/Model.zep", 5046); ZEPHIR_MM_RESTORE(); return; } zephir_read_property(&_38$$11, &record, ZEND_STRL("dirtyState"), PH_NOISY_CC | PH_READONLY); _39$$11 = !ZEPHIR_IS_LONG_IDENTICAL(&_38$$11, 0); if (_39$$11) { - ZEPHIR_CALL_METHOD(&_40$$11, &record, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_40$$11, &record, "dosave", NULL, 0, visited); zephir_check_call_status(); _39$$11 = !zephir_is_true(&_40$$11); } @@ -9372,6 +9423,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSave) * Save the related records assigned in the has-one/has-many relations * * @param ModelInterface[] related + * @param CollectionInterface visited * @return bool */ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) @@ -9383,11 +9435,12 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zephir_fcall_cache_entry *_6 = NULL, *_10 = NULL, *_13 = NULL, *_15 = NULL, *_19 = NULL, *_26 = NULL, *_28 = NULL, *_30 = NULL, *_31 = NULL, *_37 = NULL, *_40 = NULL, *_42 = NULL, *_43 = NULL, *_49 = NULL, *_54 = NULL, *_57 = NULL, *_59 = NULL, *_63 = NULL, *_67 = NULL, *_71 = NULL, *_76 = NULL, *_84 = NULL, *_86 = NULL, *_87 = NULL, *_93 = NULL, *_96 = NULL, *_98 = NULL, *_99 = NULL, *_105 = NULL, *_110 = NULL, *_113 = NULL, *_115 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *connection, connection_sub, *related, related_sub, className, manager, relation, name, record, columns, referencedModel, referencedFields, relatedRecords, value, recordAfter, intermediateModel, intermediateFields, intermediateValue, intermediateModelName, intermediateReferencedFields, existingIntermediateModel, _0, *_1, _2, _118, _5$$3, _7$$4, _22$$4, _9$$6, _11$$6, _12$$6, _14$$7, _16$$7, _17$$7, _18$$10, _20$$10, _21$$10, *_23$$11, _24$$11, _25$$12, _29$$12, _35$$12, _27$$13, _33$$14, _36$$16, _38$$17, _41$$17, _47$$17, _39$$18, _45$$19, _48$$21, *_50$$22, _51$$22, _52$$23, _53$$24, _55$$25, _56$$26, _58$$28, _60$$28, _61$$28, _62$$29, _64$$30, _79$$30, _66$$32, _68$$32, _69$$32, _70$$33, _72$$33, _73$$33, _74$$34, _75$$36, _77$$36, _78$$36, *_80$$37, _81$$37, _82$$38, _85$$38, _91$$38, _83$$39, _89$$40, _92$$42, _94$$43, _97$$43, _103$$43, _95$$44, _101$$45, _104$$47, *_106$$48, _107$$48, _108$$49, _109$$50, _111$$51, _112$$52, _114$$54, _116$$54, _117$$54; + zval *connection, connection_sub, *related, related_sub, *visited, visited_sub, className, manager, relation, name, record, columns, referencedModel, referencedFields, relatedRecords, value, recordAfter, intermediateModel, intermediateFields, intermediateValue, intermediateModelName, intermediateReferencedFields, existingIntermediateModel, _0, *_1, _2, _118, _5$$3, _7$$4, _22$$4, _9$$6, _11$$6, _12$$6, _14$$7, _16$$7, _17$$7, _18$$10, _20$$10, _21$$10, *_23$$11, _24$$11, _25$$12, _29$$12, _35$$12, _27$$13, _33$$14, _36$$16, _38$$17, _41$$17, _47$$17, _39$$18, _45$$19, _48$$21, *_50$$22, _51$$22, _52$$23, _53$$24, _55$$25, _56$$26, _58$$28, _60$$28, _61$$28, _62$$29, _64$$30, _79$$30, _66$$32, _68$$32, _69$$32, _70$$33, _72$$33, _73$$33, _74$$34, _75$$36, _77$$36, _78$$36, *_80$$37, _81$$37, _82$$38, _85$$38, _91$$38, _83$$39, _89$$40, _92$$42, _94$$43, _97$$43, _103$$43, _95$$44, _101$$45, _104$$47, *_106$$48, _107$$48, _108$$49, _109$$50, _111$$51, _112$$52, _114$$54, _116$$54, _117$$54; zval *this_ptr = getThis(); ZVAL_UNDEF(&connection_sub); ZVAL_UNDEF(&related_sub); + ZVAL_UNDEF(&visited_sub); ZVAL_UNDEF(&className); ZVAL_UNDEF(&manager); ZVAL_UNDEF(&relation); @@ -9485,15 +9538,16 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) ZVAL_UNDEF(&_102$$45); #if PHP_VERSION_ID >= 80000 bool is_null_true = 1; - ZEND_PARSE_PARAMETERS_START(2, 2) + ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_db_adapter_adapterinterface_ce) Z_PARAM_ZVAL(related) + Z_PARAM_OBJECT_OF_CLASS(visited, phalcon_support_collection_collectioninterface_ce) ZEND_PARSE_PARAMETERS_END(); #endif ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 2, 0, &connection, &related); + zephir_fetch_params(1, 3, 0, &connection, &related, &visited); nesting = 0; @@ -9502,7 +9556,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", 5277); + zephir_is_iterable(related, 0, "phalcon/Mvc/Model.zep", 5305); if (Z_TYPE_P(related) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(related), _3, _4, _1) { @@ -9541,7 +9595,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) ZEPHIR_CONCAT_SVSV(&_12$$6, "Only objects/arrays can be stored as part of has-many/has-one/has-one-through/has-many-to-many relations on model ", &className, " on Relation ", &name); ZEPHIR_CALL_METHOD(NULL, &_11$$6, "__construct", &_13, 32, &_12$$6); zephir_check_call_status(); - zephir_throw_exception_debug(&_11$$6, "phalcon/Mvc/Model.zep", 5112); + zephir_throw_exception_debug(&_11$$6, "phalcon/Mvc/Model.zep", 5140); ZEPHIR_MM_RESTORE(); return; } @@ -9565,7 +9619,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) ZEPHIR_CONCAT_SVSV(&_17$$7, "Not implemented in '", &className, "' on Relation ", &name); ZEPHIR_CALL_METHOD(NULL, &_16$$7, "__construct", &_13, 32, &_17$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_16$$7, "phalcon/Mvc/Model.zep", 5122); + zephir_throw_exception_debug(&_16$$7, "phalcon/Mvc/Model.zep", 5150); ZEPHIR_MM_RESTORE(); return; } @@ -9591,7 +9645,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) ZEPHIR_CONCAT_SVSVS(&_21$$10, "The column '", &columns, "' needs to be present in the model '", &className, "'"); ZEPHIR_CALL_METHOD(NULL, &_20$$10, "__construct", &_13, 32, &_21$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_20$$10, "phalcon/Mvc/Model.zep", 5139); + zephir_throw_exception_debug(&_20$$10, "phalcon/Mvc/Model.zep", 5167); ZEPHIR_MM_RESTORE(); return; } @@ -9605,13 +9659,13 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&intermediateReferencedFields, &relation, "getintermediatereferencedfields", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5238); + zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5266); if (Z_TYPE_P(&relatedRecords) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relatedRecords), _23$$11) { ZEPHIR_INIT_NVAR(&recordAfter); ZVAL_COPY(&recordAfter, _23$$11); - ZEPHIR_CALL_METHOD(&_25$$12, &recordAfter, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_25$$12, &recordAfter, "dosave", NULL, 0, visited); zephir_check_call_status(); if (!(zephir_is_true(&_25$$12))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "appendmessagesfrom", &_26, 0, &recordAfter); @@ -9652,7 +9706,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &intermediateModel, "writeattribute", NULL, 0, &intermediateReferencedFields, &intermediateValue); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_35$$12, &intermediateModel, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_35$$12, &intermediateModel, "dosave", NULL, 0, visited); zephir_check_call_status(); if (!(zephir_is_true(&_35$$12))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "appendmessagesfrom", &_26, 0, &intermediateModel); @@ -9678,7 +9732,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) } ZEPHIR_CALL_METHOD(&recordAfter, &relatedRecords, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_38$$17, &recordAfter, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_38$$17, &recordAfter, "dosave", NULL, 0, visited); zephir_check_call_status(); if (!(zephir_is_true(&_38$$17))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "appendmessagesfrom", &_26, 0, &recordAfter); @@ -9719,7 +9773,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &intermediateModel, "writeattribute", NULL, 0, &intermediateReferencedFields, &intermediateValue); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_47$$17, &intermediateModel, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_47$$17, &intermediateModel, "dosave", NULL, 0, visited); zephir_check_call_status(); if (!(zephir_is_true(&_47$$17))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "appendmessagesfrom", &_26, 0, &intermediateModel); @@ -9739,7 +9793,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) } ZEPHIR_INIT_NVAR(&recordAfter); } else { - zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5262); + zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5290); if (Z_TYPE_P(&relatedRecords) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relatedRecords), _50$$22) { @@ -9747,7 +9801,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) ZVAL_COPY(&recordAfter, _50$$22); ZEPHIR_CALL_METHOD(NULL, &recordAfter, "writeattribute", NULL, 0, &referencedFields, &value); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_52$$23, &recordAfter, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_52$$23, &recordAfter, "dosave", NULL, 0, visited); zephir_check_call_status(); if (!(zephir_is_true(&_52$$23))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "appendmessagesfrom", &_26, 0, &recordAfter); @@ -9775,7 +9829,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &recordAfter, "writeattribute", NULL, 0, &referencedFields, &value); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_55$$25, &recordAfter, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_55$$25, &recordAfter, "dosave", NULL, 0, visited); zephir_check_call_status(); if (!(zephir_is_true(&_55$$25))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "appendmessagesfrom", &_26, 0, &recordAfter); @@ -9810,7 +9864,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) ZEPHIR_CONCAT_SVSVS(&_61$$28, "There are no defined relations for the model '", &className, "' using alias '", &name, "'"); ZEPHIR_CALL_METHOD(NULL, &_60$$28, "__construct", &_13, 32, &_61$$28); zephir_check_call_status(); - zephir_throw_exception_debug(&_60$$28, "phalcon/Mvc/Model.zep", 5269); + zephir_throw_exception_debug(&_60$$28, "phalcon/Mvc/Model.zep", 5297); ZEPHIR_MM_RESTORE(); return; } @@ -9856,7 +9910,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) ZEPHIR_CONCAT_SVSV(&_69$$32, "Only objects/arrays can be stored as part of has-many/has-one/has-one-through/has-many-to-many relations on model ", &className, " on Relation ", &name); ZEPHIR_CALL_METHOD(NULL, &_68$$32, "__construct", &_13, 32, &_69$$32); zephir_check_call_status(); - zephir_throw_exception_debug(&_68$$32, "phalcon/Mvc/Model.zep", 5112); + zephir_throw_exception_debug(&_68$$32, "phalcon/Mvc/Model.zep", 5140); ZEPHIR_MM_RESTORE(); return; } @@ -9880,7 +9934,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) ZEPHIR_CONCAT_SVSV(&_73$$33, "Not implemented in '", &className, "' on Relation ", &name); ZEPHIR_CALL_METHOD(NULL, &_72$$33, "__construct", &_13, 32, &_73$$33); zephir_check_call_status(); - zephir_throw_exception_debug(&_72$$33, "phalcon/Mvc/Model.zep", 5122); + zephir_throw_exception_debug(&_72$$33, "phalcon/Mvc/Model.zep", 5150); ZEPHIR_MM_RESTORE(); return; } @@ -9907,7 +9961,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) ZEPHIR_CONCAT_SVSVS(&_78$$36, "The column '", &columns, "' needs to be present in the model '", &className, "'"); ZEPHIR_CALL_METHOD(NULL, &_77$$36, "__construct", &_13, 32, &_78$$36); zephir_check_call_status(); - zephir_throw_exception_debug(&_77$$36, "phalcon/Mvc/Model.zep", 5139); + zephir_throw_exception_debug(&_77$$36, "phalcon/Mvc/Model.zep", 5167); ZEPHIR_MM_RESTORE(); return; } @@ -9921,13 +9975,13 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&intermediateReferencedFields, &relation, "getintermediatereferencedfields", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5238); + zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5266); if (Z_TYPE_P(&relatedRecords) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relatedRecords), _80$$37) { ZEPHIR_INIT_NVAR(&recordAfter); ZVAL_COPY(&recordAfter, _80$$37); - ZEPHIR_CALL_METHOD(&_82$$38, &recordAfter, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_82$$38, &recordAfter, "dosave", NULL, 0, visited); zephir_check_call_status(); if (!(zephir_is_true(&_82$$38))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "appendmessagesfrom", &_26, 0, &recordAfter); @@ -9968,7 +10022,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &intermediateModel, "writeattribute", NULL, 0, &intermediateReferencedFields, &intermediateValue); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_91$$38, &intermediateModel, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_91$$38, &intermediateModel, "dosave", NULL, 0, visited); zephir_check_call_status(); if (!(zephir_is_true(&_91$$38))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "appendmessagesfrom", &_26, 0, &intermediateModel); @@ -9994,7 +10048,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) } ZEPHIR_CALL_METHOD(&recordAfter, &relatedRecords, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_94$$43, &recordAfter, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_94$$43, &recordAfter, "dosave", NULL, 0, visited); zephir_check_call_status(); if (!(zephir_is_true(&_94$$43))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "appendmessagesfrom", &_26, 0, &recordAfter); @@ -10035,7 +10089,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &intermediateModel, "writeattribute", NULL, 0, &intermediateReferencedFields, &intermediateValue); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_103$$43, &intermediateModel, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_103$$43, &intermediateModel, "dosave", NULL, 0, visited); zephir_check_call_status(); if (!(zephir_is_true(&_103$$43))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "appendmessagesfrom", &_26, 0, &intermediateModel); @@ -10055,7 +10109,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) } ZEPHIR_INIT_NVAR(&recordAfter); } else { - zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5262); + zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5290); if (Z_TYPE_P(&relatedRecords) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relatedRecords), _106$$48) { @@ -10063,7 +10117,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) ZVAL_COPY(&recordAfter, _106$$48); ZEPHIR_CALL_METHOD(NULL, &recordAfter, "writeattribute", NULL, 0, &referencedFields, &value); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_108$$49, &recordAfter, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_108$$49, &recordAfter, "dosave", NULL, 0, visited); zephir_check_call_status(); if (!(zephir_is_true(&_108$$49))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "appendmessagesfrom", &_26, 0, &recordAfter); @@ -10091,7 +10145,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &recordAfter, "writeattribute", NULL, 0, &referencedFields, &value); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_111$$51, &recordAfter, "save", NULL, 0); + ZEPHIR_CALL_METHOD(&_111$$51, &recordAfter, "dosave", NULL, 0, visited); zephir_check_call_status(); if (!(zephir_is_true(&_111$$51))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "appendmessagesfrom", &_26, 0, &recordAfter); @@ -10126,7 +10180,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) ZEPHIR_CONCAT_SVSVS(&_117$$54, "There are no defined relations for the model '", &className, "' using alias '", &name, "'"); ZEPHIR_CALL_METHOD(NULL, &_116$$54, "__construct", &_13, 32, &_117$$54); zephir_check_call_status(); - zephir_throw_exception_debug(&_116$$54, "phalcon/Mvc/Model.zep", 5269); + zephir_throw_exception_debug(&_116$$54, "phalcon/Mvc/Model.zep", 5297); ZEPHIR_MM_RESTORE(); return; } @@ -10194,7 +10248,7 @@ PHP_METHOD(Phalcon_Mvc_Model, allowEmptyStringValues) ZEPHIR_INIT_VAR(&keysAttributes); array_init(&keysAttributes); - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5310); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5338); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _0) { @@ -11077,7 +11131,7 @@ PHP_METHOD(Phalcon_Mvc_Model, skipAttributesOnCreate) ZEPHIR_INIT_VAR(&keysAttributes); array_init(&keysAttributes); - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5769); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5797); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _0) { @@ -11156,7 +11210,7 @@ PHP_METHOD(Phalcon_Mvc_Model, skipAttributesOnUpdate) ZEPHIR_INIT_VAR(&keysAttributes); array_init(&keysAttributes); - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5804); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5832); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _0) { @@ -11410,7 +11464,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", 5941); + zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model.zep", 5969); if (Z_TYPE_P(&_0) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_0), _1) { @@ -11484,7 +11538,7 @@ PHP_METHOD(Phalcon_Mvc_Model, appendMessagesFrom) ZEPHIR_CALL_METHOD(&messages, model, "getmessages", NULL, 0); zephir_check_call_status(); if (0 == ZEPHIR_IS_EMPTY(&messages)) { - zephir_is_iterable(&messages, 0, "phalcon/Mvc/Model.zep", 5965); + zephir_is_iterable(&messages, 0, "phalcon/Mvc/Model.zep", 5993); if (Z_TYPE_P(&messages) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&messages), _0$$3) { diff --git a/ext/phalcon/mvc/model.zep.h b/ext/phalcon/mvc/model.zep.h index 123cbcc58ba..f787d12b09c 100644 --- a/ext/phalcon/mvc/model.zep.h +++ b/ext/phalcon/mvc/model.zep.h @@ -55,6 +55,7 @@ PHP_METHOD(Phalcon_Mvc_Model, query); PHP_METHOD(Phalcon_Mvc_Model, readAttribute); PHP_METHOD(Phalcon_Mvc_Model, refresh); PHP_METHOD(Phalcon_Mvc_Model, save); +PHP_METHOD(Phalcon_Mvc_Model, doSave); PHP_METHOD(Phalcon_Mvc_Model, serialize); PHP_METHOD(Phalcon_Mvc_Model, unserialize); PHP_METHOD(Phalcon_Mvc_Model, setConnectionService); @@ -315,6 +316,10 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_save, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_dosave, 0, 1, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, visited, Phalcon\\Support\\Collection\\CollectionInterface, 0) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_serialize, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -451,9 +456,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_presave, 0, 3, ZEND_ARG_INFO(0, identityField) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_presaverelatedrecords, 0, 2, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_presaverelatedrecords, 0, 3, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, connection, Phalcon\\Db\\Adapter\\AdapterInterface, 0) ZEND_ARG_INFO(0, related) + ZEND_ARG_OBJ_INFO(0, visited, Phalcon\\Support\\Collection\\CollectionInterface, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_postsave, 0, 2, _IS_BOOL, 0) @@ -461,9 +467,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_postsave, 0, 2 ZEND_ARG_TYPE_INFO(0, exists, _IS_BOOL, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_postsaverelatedrecords, 0, 2, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_postsaverelatedrecords, 0, 3, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, connection, Phalcon\\Db\\Adapter\\AdapterInterface, 0) ZEND_ARG_INFO(0, related) + ZEND_ARG_OBJ_INFO(0, visited, Phalcon\\Support\\Collection\\CollectionInterface, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_allowemptystringvalues, 0, 1, IS_VOID, 0) @@ -646,6 +653,7 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_model_method_entry) { PHP_ME(Phalcon_Mvc_Model, readAttribute, arginfo_phalcon_mvc_model_readattribute, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model, refresh, arginfo_phalcon_mvc_model_refresh, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model, save, arginfo_phalcon_mvc_model_save, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Mvc_Model, doSave, arginfo_phalcon_mvc_model_dosave, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model, serialize, arginfo_phalcon_mvc_model_serialize, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model, unserialize, arginfo_phalcon_mvc_model_unserialize, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model, setConnectionService, arginfo_phalcon_mvc_model_setconnectionservice, ZEND_ACC_FINAL|ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/model/behavior/timestampable.zep.c b/ext/phalcon/mvc/model/behavior/timestampable.zep.c index 1f1262deea1..2772ffc26d9 100644 --- a/ext/phalcon/mvc/model/behavior/timestampable.zep.c +++ b/ext/phalcon/mvc/model/behavior/timestampable.zep.c @@ -101,7 +101,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior_Timestampable, notify) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The option 'field' is required", "phalcon/Mvc/Model/Behavior/Timestampable.zep", 50); return; } - ZEPHIR_CALL_METHOD(×tamp, this_ptr, "gettimestamp", NULL, 436, &options); + ZEPHIR_CALL_METHOD(×tamp, this_ptr, "gettimestamp", NULL, 437, &options); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&field) == IS_ARRAY)) { zephir_is_iterable(&field, 0, "phalcon/Mvc/Model/Behavior/Timestampable.zep", 63); @@ -165,7 +165,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior_Timestampable, getTimestamp) ZEPHIR_OBS_VAR(&format); if (zephir_array_isset_string_fetch(&format, &options, SL("format"), 0)) { - ZEPHIR_RETURN_CALL_FUNCTION("date", NULL, 437, &format); + ZEPHIR_RETURN_CALL_FUNCTION("date", NULL, 438, &format); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/mvc/model/binder.zep.c b/ext/phalcon/mvc/model/binder.zep.c index 3c663798953..69e90e1d81a 100644 --- a/ext/phalcon/mvc/model/binder.zep.c +++ b/ext/phalcon/mvc/model/binder.zep.c @@ -435,7 +435,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) ZEPHIR_INIT_VAR(&reflection); if (!ZEPHIR_IS_NULL(&methodName)) { object_init_ex(&reflection, zephir_get_internal_ce(SL("reflectionmethod"))); - ZEPHIR_CALL_METHOD(NULL, &reflection, "__construct", NULL, 438, handler, &methodName); + ZEPHIR_CALL_METHOD(NULL, &reflection, "__construct", NULL, 439, handler, &methodName); zephir_check_call_status(); } else { object_init_ex(&reflection, zephir_get_internal_ce(SL("reflectionfunction"))); @@ -477,7 +477,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) zephir_array_fetch(¶mValue, ¶ms, ¶mKey, PH_NOISY, "phalcon/Mvc/Model/Binder.zep", 199); ZEPHIR_INIT_NVAR(&_6$$5); ZVAL_STRING(&_6$$5, "Phalcon\\Mvc\\Model"); - ZEPHIR_CALL_FUNCTION(&_7$$5, "is_subclass_of", &_8, 439, &className, &_6$$5); + ZEPHIR_CALL_FUNCTION(&_7$$5, "is_subclass_of", &_8, 440, &className, &_6$$5); zephir_check_call_status(); if (ZEPHIR_IS_STRING(&className, "Phalcon\\Mvc\\Model")) { if (Z_TYPE_P(&realClasses) == IS_NULL) { @@ -559,7 +559,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) zephir_array_fetch(¶mValue, ¶ms, ¶mKey, PH_NOISY, "phalcon/Mvc/Model/Binder.zep", 199); ZEPHIR_INIT_NVAR(&_15$$19); ZVAL_STRING(&_15$$19, "Phalcon\\Mvc\\Model"); - ZEPHIR_CALL_FUNCTION(&_16$$19, "is_subclass_of", &_8, 439, &className, &_15$$19); + ZEPHIR_CALL_FUNCTION(&_16$$19, "is_subclass_of", &_8, 440, &className, &_15$$19); zephir_check_call_status(); if (ZEPHIR_IS_STRING(&className, "Phalcon\\Mvc\\Model")) { if (Z_TYPE_P(&realClasses) == IS_NULL) { diff --git a/ext/phalcon/mvc/model/criteria.zep.c b/ext/phalcon/mvc/model/criteria.zep.c index d6c071a38fa..3baa75aef19 100644 --- a/ext/phalcon/mvc/model/criteria.zep.c +++ b/ext/phalcon/mvc/model/criteria.zep.c @@ -790,9 +790,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, fromInput) ZEPHIR_INIT_VAR(&_17$$16); ZEPHIR_CONCAT_SVS(&_17$$16, " ", &operator, " "); zephir_fast_join(&_16$$16, &_17$$16, &conditions); - ZEPHIR_CALL_METHOD(NULL, &criteria, "where", NULL, 440, &_16$$16); + ZEPHIR_CALL_METHOD(NULL, &criteria, "where", NULL, 441, &_16$$16); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &criteria, "bind", NULL, 441, &bind); + ZEPHIR_CALL_METHOD(NULL, &criteria, "bind", NULL, 442, &bind); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(NULL, &criteria, "setmodelname", NULL, 432, &modelName); diff --git a/ext/phalcon/mvc/model/manager.zep.c b/ext/phalcon/mvc/model/manager.zep.c index f83cb9856c7..1f3b51e83b9 100644 --- a/ext/phalcon/mvc/model/manager.zep.c +++ b/ext/phalcon/mvc/model/manager.zep.c @@ -366,7 +366,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addBelongsTo) ZEPHIR_INIT_VAR(&relation); object_init_ex(&relation, phalcon_mvc_model_relation_ce); ZVAL_LONG(&_2, 0); - ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 442, &_2, &referencedModel, fields, referencedFields, &options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 443, &_2, &referencedModel, fields, referencedFields, &options); zephir_check_call_status(); ZEPHIR_OBS_VAR(&alias); if (zephir_array_isset_string_fetch(&alias, &options, SL("alias"), 0)) { @@ -487,7 +487,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasMany) ZEPHIR_INIT_VAR(&relation); object_init_ex(&relation, phalcon_mvc_model_relation_ce); ZVAL_LONG(&_1, 2); - ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 442, &_1, &referencedModel, fields, referencedFields, &options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 443, &_1, &referencedModel, fields, referencedFields, &options); zephir_check_call_status(); ZEPHIR_OBS_VAR(&alias); if (zephir_array_isset_string_fetch(&alias, &options, SL("alias"), 0)) { @@ -635,9 +635,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasManyToMany) ZEPHIR_INIT_VAR(&relation); object_init_ex(&relation, phalcon_mvc_model_relation_ce); ZVAL_LONG(&_1, 4); - ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 442, &_1, &referencedModel, fields, referencedFields, &options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 443, &_1, &referencedModel, fields, referencedFields, &options); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &relation, "setintermediaterelation", NULL, 443, intermediateFields, &intermediateModel, intermediateReferencedFields); + ZEPHIR_CALL_METHOD(NULL, &relation, "setintermediaterelation", NULL, 444, intermediateFields, &intermediateModel, intermediateReferencedFields); zephir_check_call_status(); ZEPHIR_OBS_VAR(&alias); if (zephir_array_isset_string_fetch(&alias, &options, SL("alias"), 0)) { @@ -757,7 +757,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOne) ZEPHIR_INIT_VAR(&relation); object_init_ex(&relation, phalcon_mvc_model_relation_ce); ZVAL_LONG(&_2, 1); - ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 442, &_2, &referencedModel, fields, referencedFields, &options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 443, &_2, &referencedModel, fields, referencedFields, &options); zephir_check_call_status(); ZEPHIR_OBS_VAR(&alias); if (zephir_array_isset_string_fetch(&alias, &options, SL("alias"), 0)) { @@ -905,9 +905,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOneThrough) ZEPHIR_INIT_VAR(&relation); object_init_ex(&relation, phalcon_mvc_model_relation_ce); ZVAL_LONG(&_1, 3); - ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 442, &_1, &referencedModel, fields, referencedFields, &options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 443, &_1, &referencedModel, fields, referencedFields, &options); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &relation, "setintermediaterelation", NULL, 443, intermediateFields, &intermediateModel, intermediateReferencedFields); + ZEPHIR_CALL_METHOD(NULL, &relation, "setintermediaterelation", NULL, 444, intermediateFields, &intermediateModel, intermediateReferencedFields); zephir_check_call_status(); ZEPHIR_OBS_VAR(&alias); if (zephir_array_isset_string_fetch(&alias, &options, SL("alias"), 0)) { @@ -2402,7 +2402,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationRecords) ZEPHIR_INIT_VAR(&_4$$3); ZEPHIR_CONCAT_SVSVSVSVS(&_4$$3, "[", &intermediateModel, "].[", &intermediateFields, "] = [", &referencedModel, "].[", &_3$$3, "]"); zephir_array_append(&joinConditions, &_4$$3, PH_SEPARATE, "phalcon/Mvc/Model/Manager.zep", 1401); - ZEPHIR_CALL_METHOD(&_5$$3, this_ptr, "mergefindparameters", NULL, 444, &extraParameters, parameters); + ZEPHIR_CALL_METHOD(&_5$$3, this_ptr, "mergefindparameters", NULL, 445, &extraParameters, parameters); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&builder, this_ptr, "createbuilder", NULL, 0, &_5$$3); zephir_check_call_status(); @@ -2533,10 +2533,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationRecords) ZEPHIR_CALL_METHOD(&_32, record, "getdi", NULL, 0); zephir_check_call_status(); zephir_array_update_string(&findParams, SL("di"), &_32, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&findArguments, this_ptr, "mergefindparameters", NULL, 444, &findParams, parameters); + ZEPHIR_CALL_METHOD(&findArguments, this_ptr, "mergefindparameters", NULL, 445, &findParams, parameters); zephir_check_call_status(); if (Z_TYPE_P(&extraParameters) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(&findParams, this_ptr, "mergefindparameters", NULL, 444, &extraParameters, &findArguments); + ZEPHIR_CALL_METHOD(&findParams, this_ptr, "mergefindparameters", NULL, 445, &extraParameters, &findArguments); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&findParams, &findArguments); @@ -3073,7 +3073,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasBelongsTo) ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "belongsTo"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 445, &_0, &modelName, &modelRelation); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 446, &_0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); } @@ -3130,7 +3130,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasHasMany) ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "hasMany"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 445, &_0, &modelName, &modelRelation); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 446, &_0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); } @@ -3187,7 +3187,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasHasManyToMany) ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "hasManyToMany"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 445, &_0, &modelName, &modelRelation); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 446, &_0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); } @@ -3244,7 +3244,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasHasOne) ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "hasOne"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 445, &_0, &modelName, &modelRelation); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 446, &_0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); } @@ -3301,7 +3301,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasHasOneThrough) ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "hasOneThrough"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 445, &_0, &modelName, &modelRelation); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 446, &_0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/mvc/model/metadata.zep.c b/ext/phalcon/mvc/model/metadata.zep.c index 85304eda532..b14b9c23631 100644 --- a/ext/phalcon/mvc/model/metadata.zep.c +++ b/ext/phalcon/mvc/model/metadata.zep.c @@ -1574,7 +1574,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, initializeColumnMap) } zephir_read_property(&_0, this_ptr, ZEND_STRL("columnMap"), PH_NOISY_CC | PH_READONLY); if (1 == zephir_array_isset(&_0, key)) { - RETURN_MM_BOOL(0); + RETURN_MM_BOOL(1); } ZEPHIR_INIT_VAR(&_1); ZEPHIR_CONCAT_SV(&_1, "map-", key); @@ -1583,7 +1583,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, initializeColumnMap) zephir_check_call_status(); if (Z_TYPE_P(&data) != IS_NULL) { zephir_update_property_array(this_ptr, SL("columnMap"), key, &data); - RETURN_MM_BOOL(0); + RETURN_MM_BOOL(1); } ZEPHIR_CALL_METHOD(&container, this_ptr, "getdi", NULL, 0); zephir_check_call_status(); diff --git a/ext/phalcon/mvc/model/metadata/stream.zep.c b/ext/phalcon/mvc/model/metadata/stream.zep.c index af1ad511ef7..e8eec8646d3 100644 --- a/ext/phalcon/mvc/model/metadata/stream.zep.c +++ b/ext/phalcon/mvc/model/metadata/stream.zep.c @@ -217,7 +217,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Stream, write) ZEPHIR_CONCAT_SVS(&_5$$3, "= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) @@ -1627,8 +1617,6 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) ZEPHIR_INIT_NVAR(&handledUri); ZVAL_STRING(&handledUri, "/"); } - ZEPHIR_INIT_VAR(&request); - ZVAL_NULL(&request); ZEPHIR_INIT_VAR(¤tHostName); ZVAL_NULL(¤tHostName); ZEPHIR_INIT_VAR(&routeFound); @@ -1653,13 +1641,24 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", NULL, 0, &_5$$6, this_ptr); zephir_check_call_status(); } + zephir_read_property(&_4, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CPY_WRT(&container, &_4); + if (Z_TYPE_P(&container) == IS_NULL) { + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_router_exception_ce, "A dependency injection container is required to access the 'request' service", "phalcon/Mvc/Router.zep", 724); + return; + } + ZEPHIR_INIT_VAR(&_7); + ZVAL_STRING(&_7, "request"); + ZEPHIR_CALL_METHOD(&_6, &container, "get", NULL, 0, &_7); + zephir_check_call_status(); + ZEPHIR_CPY_WRT(&request, &_6); zephir_read_property(&_4, this_ptr, ZEND_STRL("routes"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_4, 0, "phalcon/Mvc/Router.zep", 948); + zephir_is_iterable(&_4, 0, "phalcon/Mvc/Router.zep", 930); if (Z_TYPE_P(&_4) == IS_ARRAY) { - ZEND_HASH_REVERSE_FOREACH_VAL(Z_ARRVAL_P(&_4), _6) + ZEND_HASH_REVERSE_FOREACH_VAL(Z_ARRVAL_P(&_4), _8) { ZEPHIR_INIT_NVAR(&route); - ZVAL_COPY(&route, _6); + ZVAL_COPY(&route, _8); ZEPHIR_INIT_NVAR(¶ms); array_init(¶ms); ZEPHIR_INIT_NVAR(&matches); @@ -1667,63 +1666,37 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) ZEPHIR_CALL_METHOD(&methods, &route, "gethttpmethods", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&methods) != IS_NULL) { - if (Z_TYPE_P(&request) == IS_NULL) { - zephir_read_property(&_8$$9, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&container, &_8$$9); - if (Z_TYPE_P(&container) == IS_NULL) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_router_exception_ce, "A dependency injection container is required to access the 'request' service", "phalcon/Mvc/Router.zep", 739); - return; - } - ZEPHIR_INIT_NVAR(&_10$$9); - ZVAL_STRING(&_10$$9, "request"); - ZEPHIR_CALL_METHOD(&_9$$9, &container, "getshared", NULL, 0, &_10$$9); - zephir_check_call_status(); - ZEPHIR_CPY_WRT(&request, &_9$$9); - } - ZVAL_BOOL(&_12$$8, 1); - ZEPHIR_CALL_METHOD(&_11$$8, &request, "ismethod", NULL, 0, &methods, &_12$$8); + ZVAL_BOOL(&_11$$9, 1); + ZEPHIR_CALL_METHOD(&_10$$9, &request, "ismethod", &_12, 0, &methods, &_11$$9); zephir_check_call_status(); - if (ZEPHIR_IS_FALSE_IDENTICAL(&_11$$8)) { + if (ZEPHIR_IS_FALSE_IDENTICAL(&_10$$9)) { continue; } } ZEPHIR_CALL_METHOD(&hostname, &route, "gethostname", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&hostname) != IS_NULL) { - if (Z_TYPE_P(&request) == IS_NULL) { - zephir_read_property(&_13$$13, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&container, &_13$$13); - if (Z_TYPE_P(&container) == IS_NULL) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_router_exception_ce, "A dependency injection container is required to access the 'request' service", "phalcon/Mvc/Router.zep", 766); - return; - } - ZEPHIR_INIT_NVAR(&_15$$13); - ZVAL_STRING(&_15$$13, "request"); - ZEPHIR_CALL_METHOD(&_14$$13, &container, "getshared", NULL, 0, &_15$$13); - zephir_check_call_status(); - ZEPHIR_CPY_WRT(&request, &_14$$13); - } if (Z_TYPE_P(¤tHostName) == IS_NULL) { - ZEPHIR_CALL_METHOD(¤tHostName, &request, "gethttphost", NULL, 0); + ZEPHIR_CALL_METHOD(¤tHostName, &request, "gethttphost", &_13, 0); zephir_check_call_status(); } if (!(zephir_is_true(¤tHostName))) { continue; } - if (zephir_memnstr_str(&hostname, SL("("), "phalcon/Mvc/Router.zep", 790)) { - if (!(zephir_memnstr_str(&hostname, SL("#"), "phalcon/Mvc/Router.zep", 791))) { + if (zephir_memnstr_str(&hostname, SL("("), "phalcon/Mvc/Router.zep", 772)) { + if (!(zephir_memnstr_str(&hostname, SL("#"), "phalcon/Mvc/Router.zep", 773))) { ZEPHIR_INIT_NVAR(®exHostName); ZEPHIR_CONCAT_SV(®exHostName, "#^", &hostname); - if (!(zephir_memnstr_str(&hostname, SL(":"), "phalcon/Mvc/Router.zep", 794))) { + if (!(zephir_memnstr_str(&hostname, SL(":"), "phalcon/Mvc/Router.zep", 776))) { zephir_concat_self_str(®exHostName, SL("(:[[:digit:]]+)?")); } zephir_concat_self_str(®exHostName, SL("$#i")); } else { ZEPHIR_CPY_WRT(®exHostName, &hostname); } - ZEPHIR_INIT_NVAR(&_16$$17); + ZEPHIR_INIT_NVAR(&_14$$14); ZEPHIR_INIT_NVAR(&matched); - zephir_preg_match(&matched, ®exHostName, ¤tHostName, &_16$$17, 0, 0 , 0 ); + zephir_preg_match(&matched, ®exHostName, ¤tHostName, &_14$$14, 0, 0 , 0 ); } else { ZEPHIR_INIT_NVAR(&matched); ZVAL_BOOL(&matched, ZEPHIR_IS_EQUAL(¤tHostName, &hostname)); @@ -1733,14 +1706,14 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) } } if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { - ZEPHIR_INIT_NVAR(&_17$$23); - ZVAL_STRING(&_17$$23, "router:beforeCheckRoute"); - ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", &_18, 0, &_17$$23, this_ptr, &route); + ZEPHIR_INIT_NVAR(&_15$$20); + ZVAL_STRING(&_15$$20, "router:beforeCheckRoute"); + ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", &_16, 0, &_15$$20, this_ptr, &route); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(&pattern, &route, "getcompiledpattern", NULL, 0); zephir_check_call_status(); - if (zephir_memnstr_str(&pattern, SL("^"), "phalcon/Mvc/Router.zep", 822)) { + if (zephir_memnstr_str(&pattern, SL("^"), "phalcon/Mvc/Router.zep", 804)) { ZEPHIR_INIT_NVAR(&routeFound); zephir_preg_match(&routeFound, &pattern, &handledUri, &matches, 0, 0 , 0 ); } else { @@ -1749,32 +1722,32 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) } if (zephir_is_true(&routeFound)) { if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { - ZEPHIR_INIT_NVAR(&_19$$27); - ZVAL_STRING(&_19$$27, "router:matchedRoute"); - ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", &_20, 0, &_19$$27, this_ptr, &route); + ZEPHIR_INIT_NVAR(&_17$$24); + ZVAL_STRING(&_17$$24, "router:matchedRoute"); + ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", &_18, 0, &_17$$24, this_ptr, &route); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(&beforeMatch, &route, "getbeforematch", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&beforeMatch) != IS_NULL) { if (UNEXPECTED(!(zephir_is_callable(&beforeMatch)))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_router_exception_ce, "Before-Match callback is not callable in matched route", "phalcon/Mvc/Router.zep", 844); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_router_exception_ce, "Before-Match callback is not callable in matched route", "phalcon/Mvc/Router.zep", 826); return; } - ZEPHIR_INIT_NVAR(&_21$$28); - zephir_create_array(&_21$$28, 3, 0); - zephir_array_fast_append(&_21$$28, &handledUri); - zephir_array_fast_append(&_21$$28, &route); - zephir_array_fast_append(&_21$$28, this_ptr); + ZEPHIR_INIT_NVAR(&_19$$25); + zephir_create_array(&_19$$25, 3, 0); + zephir_array_fast_append(&_19$$25, &handledUri); + zephir_array_fast_append(&_19$$25, &route); + zephir_array_fast_append(&_19$$25, this_ptr); ZEPHIR_INIT_NVAR(&routeFound); - ZEPHIR_CALL_USER_FUNC_ARRAY(&routeFound, &beforeMatch, &_21$$28); + ZEPHIR_CALL_USER_FUNC_ARRAY(&routeFound, &beforeMatch, &_19$$25); zephir_check_call_status(); } } else { if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { - ZEPHIR_INIT_NVAR(&_22$$31); - ZVAL_STRING(&_22$$31, "router:notMatchedRoute"); - ZEPHIR_CALL_METHOD(&routeFound, &eventsManager, "fire", &_23, 0, &_22$$31, this_ptr, &route); + ZEPHIR_INIT_NVAR(&_20$$28); + ZVAL_STRING(&_20$$28, "router:notMatchedRoute"); + ZEPHIR_CALL_METHOD(&routeFound, &eventsManager, "fire", &_21, 0, &_20$$28, this_ptr, &route); zephir_check_call_status(); } } @@ -1785,34 +1758,34 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) if (Z_TYPE_P(&matches) == IS_ARRAY) { ZEPHIR_CALL_METHOD(&converters, &route, "getconverters", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&paths, 0, "phalcon/Mvc/Router.zep", 936); + zephir_is_iterable(&paths, 0, "phalcon/Mvc/Router.zep", 918); if (Z_TYPE_P(&paths) == IS_ARRAY) { - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&paths), _26$$33, _27$$33, _24$$33) + ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&paths), _24$$30, _25$$30, _22$$30) { ZEPHIR_INIT_NVAR(&part); - if (_27$$33 != NULL) { - ZVAL_STR_COPY(&part, _27$$33); + if (_25$$30 != NULL) { + ZVAL_STR_COPY(&part, _25$$30); } else { - ZVAL_LONG(&part, _26$$33); + ZVAL_LONG(&part, _24$$30); } ZEPHIR_INIT_NVAR(&position); - ZVAL_COPY(&position, _24$$33); + ZVAL_COPY(&position, _22$$30); if (UNEXPECTED(Z_TYPE_P(&part) != IS_STRING)) { - ZEPHIR_INIT_NVAR(&_28$$35); - object_init_ex(&_28$$35, phalcon_mvc_router_exception_ce); - ZEPHIR_INIT_NVAR(&_29$$35); - ZEPHIR_CONCAT_SV(&_29$$35, "Wrong key in paths: ", &part); - ZEPHIR_CALL_METHOD(NULL, &_28$$35, "__construct", &_30, 32, &_29$$35); + ZEPHIR_INIT_NVAR(&_26$$32); + object_init_ex(&_26$$32, phalcon_mvc_router_exception_ce); + ZEPHIR_INIT_NVAR(&_27$$32); + ZEPHIR_CONCAT_SV(&_27$$32, "Wrong key in paths: ", &part); + ZEPHIR_CALL_METHOD(NULL, &_26$$32, "__construct", &_28, 32, &_27$$32); zephir_check_call_status(); - zephir_throw_exception_debug(&_28$$35, "phalcon/Mvc/Router.zep", 884); + zephir_throw_exception_debug(&_26$$32, "phalcon/Mvc/Router.zep", 866); ZEPHIR_MM_RESTORE(); return; } - _31$$34 = Z_TYPE_P(&position) != IS_STRING; - if (_31$$34) { - _31$$34 = Z_TYPE_P(&position) != IS_LONG; + _29$$31 = Z_TYPE_P(&position) != IS_STRING; + if (_29$$31) { + _29$$31 = Z_TYPE_P(&position) != IS_LONG; } - if (_31$$34) { + if (_29$$31) { continue; } ZEPHIR_OBS_NVAR(&matchPosition); @@ -1820,13 +1793,13 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) if (Z_TYPE_P(&converters) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&converter); if (zephir_array_isset_fetch(&converter, &converters, &part, 0)) { - ZEPHIR_INIT_NVAR(&_32$$39); - ZEPHIR_INIT_NVAR(&_33$$39); - zephir_create_array(&_33$$39, 1, 0); - zephir_array_fast_append(&_33$$39, &matchPosition); - ZEPHIR_CALL_USER_FUNC_ARRAY(&_32$$39, &converter, &_33$$39); + ZEPHIR_INIT_NVAR(&_30$$36); + ZEPHIR_INIT_NVAR(&_31$$36); + zephir_create_array(&_31$$36, 1, 0); + zephir_array_fast_append(&_31$$36, &matchPosition); + ZEPHIR_CALL_USER_FUNC_ARRAY(&_30$$36, &converter, &_31$$36); zephir_check_call_status(); - zephir_array_update_zval(&parts, &part, &_32$$39, PH_COPY | PH_SEPARATE); + zephir_array_update_zval(&parts, &part, &_30$$36, PH_COPY | PH_SEPARATE); continue; } } @@ -1835,13 +1808,13 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) if (Z_TYPE_P(&converters) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&converter); if (zephir_array_isset_fetch(&converter, &converters, &part, 0)) { - ZEPHIR_INIT_NVAR(&_34$$42); - ZEPHIR_INIT_NVAR(&_35$$42); - zephir_create_array(&_35$$42, 1, 0); - zephir_array_fast_append(&_35$$42, &position); - ZEPHIR_CALL_USER_FUNC_ARRAY(&_34$$42, &converter, &_35$$42); + ZEPHIR_INIT_NVAR(&_32$$39); + ZEPHIR_INIT_NVAR(&_33$$39); + zephir_create_array(&_33$$39, 1, 0); + zephir_array_fast_append(&_33$$39, &position); + ZEPHIR_CALL_USER_FUNC_ARRAY(&_32$$39, &converter, &_33$$39); zephir_check_call_status(); - zephir_array_update_zval(&parts, &part, &_34$$42, PH_COPY | PH_SEPARATE); + zephir_array_update_zval(&parts, &part, &_32$$39, PH_COPY | PH_SEPARATE); } } else { if (Z_TYPE_P(&position) == IS_LONG) { @@ -1854,9 +1827,9 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) ZEPHIR_CALL_METHOD(NULL, &paths, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_25$$33, &paths, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_23$$30, &paths, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_25$$33)) { + if (!zend_is_true(&_23$$30)) { break; } ZEPHIR_CALL_METHOD(&part, &paths, "key", NULL, 0); @@ -1864,21 +1837,21 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) ZEPHIR_CALL_METHOD(&position, &paths, "current", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&part) != IS_STRING)) { - ZEPHIR_INIT_NVAR(&_36$$46); - object_init_ex(&_36$$46, phalcon_mvc_router_exception_ce); - ZEPHIR_INIT_NVAR(&_37$$46); - ZEPHIR_CONCAT_SV(&_37$$46, "Wrong key in paths: ", &part); - ZEPHIR_CALL_METHOD(NULL, &_36$$46, "__construct", &_30, 32, &_37$$46); + ZEPHIR_INIT_NVAR(&_34$$43); + object_init_ex(&_34$$43, phalcon_mvc_router_exception_ce); + ZEPHIR_INIT_NVAR(&_35$$43); + ZEPHIR_CONCAT_SV(&_35$$43, "Wrong key in paths: ", &part); + ZEPHIR_CALL_METHOD(NULL, &_34$$43, "__construct", &_28, 32, &_35$$43); zephir_check_call_status(); - zephir_throw_exception_debug(&_36$$46, "phalcon/Mvc/Router.zep", 884); + zephir_throw_exception_debug(&_34$$43, "phalcon/Mvc/Router.zep", 866); ZEPHIR_MM_RESTORE(); return; } - _38$$45 = Z_TYPE_P(&position) != IS_STRING; - if (_38$$45) { - _38$$45 = Z_TYPE_P(&position) != IS_LONG; + _36$$42 = Z_TYPE_P(&position) != IS_STRING; + if (_36$$42) { + _36$$42 = Z_TYPE_P(&position) != IS_LONG; } - if (_38$$45) { + if (_36$$42) { continue; } ZEPHIR_OBS_NVAR(&matchPosition); @@ -1886,13 +1859,13 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) if (Z_TYPE_P(&converters) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&converter); if (zephir_array_isset_fetch(&converter, &converters, &part, 0)) { - ZEPHIR_INIT_NVAR(&_39$$50); - ZEPHIR_INIT_NVAR(&_40$$50); - zephir_create_array(&_40$$50, 1, 0); - zephir_array_fast_append(&_40$$50, &matchPosition); - ZEPHIR_CALL_USER_FUNC_ARRAY(&_39$$50, &converter, &_40$$50); + ZEPHIR_INIT_NVAR(&_37$$47); + ZEPHIR_INIT_NVAR(&_38$$47); + zephir_create_array(&_38$$47, 1, 0); + zephir_array_fast_append(&_38$$47, &matchPosition); + ZEPHIR_CALL_USER_FUNC_ARRAY(&_37$$47, &converter, &_38$$47); zephir_check_call_status(); - zephir_array_update_zval(&parts, &part, &_39$$50, PH_COPY | PH_SEPARATE); + zephir_array_update_zval(&parts, &part, &_37$$47, PH_COPY | PH_SEPARATE); continue; } } @@ -1901,13 +1874,13 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) if (Z_TYPE_P(&converters) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&converter); if (zephir_array_isset_fetch(&converter, &converters, &part, 0)) { - ZEPHIR_INIT_NVAR(&_41$$53); - ZEPHIR_INIT_NVAR(&_42$$53); - zephir_create_array(&_42$$53, 1, 0); - zephir_array_fast_append(&_42$$53, &position); - ZEPHIR_CALL_USER_FUNC_ARRAY(&_41$$53, &converter, &_42$$53); + ZEPHIR_INIT_NVAR(&_39$$50); + ZEPHIR_INIT_NVAR(&_40$$50); + zephir_create_array(&_40$$50, 1, 0); + zephir_array_fast_append(&_40$$50, &position); + ZEPHIR_CALL_USER_FUNC_ARRAY(&_39$$50, &converter, &_40$$50); zephir_check_call_status(); - zephir_array_update_zval(&parts, &part, &_41$$53, PH_COPY | PH_SEPARATE); + zephir_array_update_zval(&parts, &part, &_39$$50, PH_COPY | PH_SEPARATE); } } else { if (Z_TYPE_P(&position) == IS_LONG) { @@ -1931,9 +1904,9 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) ZEPHIR_CALL_METHOD(NULL, &_4, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_7, &_4, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_9, &_4, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_7)) { + if (!zend_is_true(&_9)) { break; } ZEPHIR_CALL_METHOD(&route, &_4, "current", NULL, 0); @@ -1945,63 +1918,37 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) ZEPHIR_CALL_METHOD(&methods, &route, "gethttpmethods", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&methods) != IS_NULL) { - if (Z_TYPE_P(&request) == IS_NULL) { - zephir_read_property(&_43$$58, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&container, &_43$$58); - if (Z_TYPE_P(&container) == IS_NULL) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_router_exception_ce, "A dependency injection container is required to access the 'request' service", "phalcon/Mvc/Router.zep", 739); - return; - } - ZEPHIR_INIT_NVAR(&_45$$58); - ZVAL_STRING(&_45$$58, "request"); - ZEPHIR_CALL_METHOD(&_44$$58, &container, "getshared", NULL, 0, &_45$$58); - zephir_check_call_status(); - ZEPHIR_CPY_WRT(&request, &_44$$58); - } - ZVAL_BOOL(&_47$$57, 1); - ZEPHIR_CALL_METHOD(&_46$$57, &request, "ismethod", NULL, 0, &methods, &_47$$57); + ZVAL_BOOL(&_42$$54, 1); + ZEPHIR_CALL_METHOD(&_41$$54, &request, "ismethod", &_43, 0, &methods, &_42$$54); zephir_check_call_status(); - if (ZEPHIR_IS_FALSE_IDENTICAL(&_46$$57)) { + if (ZEPHIR_IS_FALSE_IDENTICAL(&_41$$54)) { continue; } } ZEPHIR_CALL_METHOD(&hostname, &route, "gethostname", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&hostname) != IS_NULL) { - if (Z_TYPE_P(&request) == IS_NULL) { - zephir_read_property(&_48$$62, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&container, &_48$$62); - if (Z_TYPE_P(&container) == IS_NULL) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_router_exception_ce, "A dependency injection container is required to access the 'request' service", "phalcon/Mvc/Router.zep", 766); - return; - } - ZEPHIR_INIT_NVAR(&_50$$62); - ZVAL_STRING(&_50$$62, "request"); - ZEPHIR_CALL_METHOD(&_49$$62, &container, "getshared", NULL, 0, &_50$$62); - zephir_check_call_status(); - ZEPHIR_CPY_WRT(&request, &_49$$62); - } if (Z_TYPE_P(¤tHostName) == IS_NULL) { - ZEPHIR_CALL_METHOD(¤tHostName, &request, "gethttphost", NULL, 0); + ZEPHIR_CALL_METHOD(¤tHostName, &request, "gethttphost", &_44, 0); zephir_check_call_status(); } if (!(zephir_is_true(¤tHostName))) { continue; } - if (zephir_memnstr_str(&hostname, SL("("), "phalcon/Mvc/Router.zep", 790)) { - if (!(zephir_memnstr_str(&hostname, SL("#"), "phalcon/Mvc/Router.zep", 791))) { + if (zephir_memnstr_str(&hostname, SL("("), "phalcon/Mvc/Router.zep", 772)) { + if (!(zephir_memnstr_str(&hostname, SL("#"), "phalcon/Mvc/Router.zep", 773))) { ZEPHIR_INIT_NVAR(®exHostName); ZEPHIR_CONCAT_SV(®exHostName, "#^", &hostname); - if (!(zephir_memnstr_str(&hostname, SL(":"), "phalcon/Mvc/Router.zep", 794))) { + if (!(zephir_memnstr_str(&hostname, SL(":"), "phalcon/Mvc/Router.zep", 776))) { zephir_concat_self_str(®exHostName, SL("(:[[:digit:]]+)?")); } zephir_concat_self_str(®exHostName, SL("$#i")); } else { ZEPHIR_CPY_WRT(®exHostName, &hostname); } - ZEPHIR_INIT_NVAR(&_51$$66); + ZEPHIR_INIT_NVAR(&_45$$59); ZEPHIR_INIT_NVAR(&matched); - zephir_preg_match(&matched, ®exHostName, ¤tHostName, &_51$$66, 0, 0 , 0 ); + zephir_preg_match(&matched, ®exHostName, ¤tHostName, &_45$$59, 0, 0 , 0 ); } else { ZEPHIR_INIT_NVAR(&matched); ZVAL_BOOL(&matched, ZEPHIR_IS_EQUAL(¤tHostName, &hostname)); @@ -2011,14 +1958,14 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) } } if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { - ZEPHIR_INIT_NVAR(&_52$$72); - ZVAL_STRING(&_52$$72, "router:beforeCheckRoute"); - ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", &_53, 0, &_52$$72, this_ptr, &route); + ZEPHIR_INIT_NVAR(&_46$$65); + ZVAL_STRING(&_46$$65, "router:beforeCheckRoute"); + ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", &_47, 0, &_46$$65, this_ptr, &route); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(&pattern, &route, "getcompiledpattern", NULL, 0); zephir_check_call_status(); - if (zephir_memnstr_str(&pattern, SL("^"), "phalcon/Mvc/Router.zep", 822)) { + if (zephir_memnstr_str(&pattern, SL("^"), "phalcon/Mvc/Router.zep", 804)) { ZEPHIR_INIT_NVAR(&routeFound); zephir_preg_match(&routeFound, &pattern, &handledUri, &matches, 0, 0 , 0 ); } else { @@ -2027,32 +1974,32 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) } if (zephir_is_true(&routeFound)) { if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { - ZEPHIR_INIT_NVAR(&_54$$76); - ZVAL_STRING(&_54$$76, "router:matchedRoute"); - ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", &_55, 0, &_54$$76, this_ptr, &route); + ZEPHIR_INIT_NVAR(&_48$$69); + ZVAL_STRING(&_48$$69, "router:matchedRoute"); + ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", &_49, 0, &_48$$69, this_ptr, &route); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(&beforeMatch, &route, "getbeforematch", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&beforeMatch) != IS_NULL) { if (UNEXPECTED(!(zephir_is_callable(&beforeMatch)))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_router_exception_ce, "Before-Match callback is not callable in matched route", "phalcon/Mvc/Router.zep", 844); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_router_exception_ce, "Before-Match callback is not callable in matched route", "phalcon/Mvc/Router.zep", 826); return; } - ZEPHIR_INIT_NVAR(&_56$$77); - zephir_create_array(&_56$$77, 3, 0); - zephir_array_fast_append(&_56$$77, &handledUri); - zephir_array_fast_append(&_56$$77, &route); - zephir_array_fast_append(&_56$$77, this_ptr); + ZEPHIR_INIT_NVAR(&_50$$70); + zephir_create_array(&_50$$70, 3, 0); + zephir_array_fast_append(&_50$$70, &handledUri); + zephir_array_fast_append(&_50$$70, &route); + zephir_array_fast_append(&_50$$70, this_ptr); ZEPHIR_INIT_NVAR(&routeFound); - ZEPHIR_CALL_USER_FUNC_ARRAY(&routeFound, &beforeMatch, &_56$$77); + ZEPHIR_CALL_USER_FUNC_ARRAY(&routeFound, &beforeMatch, &_50$$70); zephir_check_call_status(); } } else { if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { - ZEPHIR_INIT_NVAR(&_57$$80); - ZVAL_STRING(&_57$$80, "router:notMatchedRoute"); - ZEPHIR_CALL_METHOD(&routeFound, &eventsManager, "fire", &_58, 0, &_57$$80, this_ptr, &route); + ZEPHIR_INIT_NVAR(&_51$$73); + ZVAL_STRING(&_51$$73, "router:notMatchedRoute"); + ZEPHIR_CALL_METHOD(&routeFound, &eventsManager, "fire", &_52, 0, &_51$$73, this_ptr, &route); zephir_check_call_status(); } } @@ -2063,34 +2010,34 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) if (Z_TYPE_P(&matches) == IS_ARRAY) { ZEPHIR_CALL_METHOD(&converters, &route, "getconverters", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&paths, 0, "phalcon/Mvc/Router.zep", 936); + zephir_is_iterable(&paths, 0, "phalcon/Mvc/Router.zep", 918); if (Z_TYPE_P(&paths) == IS_ARRAY) { - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&paths), _61$$82, _62$$82, _59$$82) + ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&paths), _55$$75, _56$$75, _53$$75) { ZEPHIR_INIT_NVAR(&part); - if (_62$$82 != NULL) { - ZVAL_STR_COPY(&part, _62$$82); + if (_56$$75 != NULL) { + ZVAL_STR_COPY(&part, _56$$75); } else { - ZVAL_LONG(&part, _61$$82); + ZVAL_LONG(&part, _55$$75); } ZEPHIR_INIT_NVAR(&position); - ZVAL_COPY(&position, _59$$82); + ZVAL_COPY(&position, _53$$75); if (UNEXPECTED(Z_TYPE_P(&part) != IS_STRING)) { - ZEPHIR_INIT_NVAR(&_63$$84); - object_init_ex(&_63$$84, phalcon_mvc_router_exception_ce); - ZEPHIR_INIT_NVAR(&_64$$84); - ZEPHIR_CONCAT_SV(&_64$$84, "Wrong key in paths: ", &part); - ZEPHIR_CALL_METHOD(NULL, &_63$$84, "__construct", &_30, 32, &_64$$84); + ZEPHIR_INIT_NVAR(&_57$$77); + object_init_ex(&_57$$77, phalcon_mvc_router_exception_ce); + ZEPHIR_INIT_NVAR(&_58$$77); + ZEPHIR_CONCAT_SV(&_58$$77, "Wrong key in paths: ", &part); + ZEPHIR_CALL_METHOD(NULL, &_57$$77, "__construct", &_28, 32, &_58$$77); zephir_check_call_status(); - zephir_throw_exception_debug(&_63$$84, "phalcon/Mvc/Router.zep", 884); + zephir_throw_exception_debug(&_57$$77, "phalcon/Mvc/Router.zep", 866); ZEPHIR_MM_RESTORE(); return; } - _65$$83 = Z_TYPE_P(&position) != IS_STRING; - if (_65$$83) { - _65$$83 = Z_TYPE_P(&position) != IS_LONG; + _59$$76 = Z_TYPE_P(&position) != IS_STRING; + if (_59$$76) { + _59$$76 = Z_TYPE_P(&position) != IS_LONG; } - if (_65$$83) { + if (_59$$76) { continue; } ZEPHIR_OBS_NVAR(&matchPosition); @@ -2098,13 +2045,13 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) if (Z_TYPE_P(&converters) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&converter); if (zephir_array_isset_fetch(&converter, &converters, &part, 0)) { - ZEPHIR_INIT_NVAR(&_66$$88); - ZEPHIR_INIT_NVAR(&_67$$88); - zephir_create_array(&_67$$88, 1, 0); - zephir_array_fast_append(&_67$$88, &matchPosition); - ZEPHIR_CALL_USER_FUNC_ARRAY(&_66$$88, &converter, &_67$$88); + ZEPHIR_INIT_NVAR(&_60$$81); + ZEPHIR_INIT_NVAR(&_61$$81); + zephir_create_array(&_61$$81, 1, 0); + zephir_array_fast_append(&_61$$81, &matchPosition); + ZEPHIR_CALL_USER_FUNC_ARRAY(&_60$$81, &converter, &_61$$81); zephir_check_call_status(); - zephir_array_update_zval(&parts, &part, &_66$$88, PH_COPY | PH_SEPARATE); + zephir_array_update_zval(&parts, &part, &_60$$81, PH_COPY | PH_SEPARATE); continue; } } @@ -2113,13 +2060,13 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) if (Z_TYPE_P(&converters) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&converter); if (zephir_array_isset_fetch(&converter, &converters, &part, 0)) { - ZEPHIR_INIT_NVAR(&_68$$91); - ZEPHIR_INIT_NVAR(&_69$$91); - zephir_create_array(&_69$$91, 1, 0); - zephir_array_fast_append(&_69$$91, &position); - ZEPHIR_CALL_USER_FUNC_ARRAY(&_68$$91, &converter, &_69$$91); + ZEPHIR_INIT_NVAR(&_62$$84); + ZEPHIR_INIT_NVAR(&_63$$84); + zephir_create_array(&_63$$84, 1, 0); + zephir_array_fast_append(&_63$$84, &position); + ZEPHIR_CALL_USER_FUNC_ARRAY(&_62$$84, &converter, &_63$$84); zephir_check_call_status(); - zephir_array_update_zval(&parts, &part, &_68$$91, PH_COPY | PH_SEPARATE); + zephir_array_update_zval(&parts, &part, &_62$$84, PH_COPY | PH_SEPARATE); } } else { if (Z_TYPE_P(&position) == IS_LONG) { @@ -2132,9 +2079,9 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) ZEPHIR_CALL_METHOD(NULL, &paths, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_60$$82, &paths, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_54$$75, &paths, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_60$$82)) { + if (!zend_is_true(&_54$$75)) { break; } ZEPHIR_CALL_METHOD(&part, &paths, "key", NULL, 0); @@ -2142,21 +2089,21 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) ZEPHIR_CALL_METHOD(&position, &paths, "current", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&part) != IS_STRING)) { - ZEPHIR_INIT_NVAR(&_70$$95); - object_init_ex(&_70$$95, phalcon_mvc_router_exception_ce); - ZEPHIR_INIT_NVAR(&_71$$95); - ZEPHIR_CONCAT_SV(&_71$$95, "Wrong key in paths: ", &part); - ZEPHIR_CALL_METHOD(NULL, &_70$$95, "__construct", &_30, 32, &_71$$95); + ZEPHIR_INIT_NVAR(&_64$$88); + object_init_ex(&_64$$88, phalcon_mvc_router_exception_ce); + ZEPHIR_INIT_NVAR(&_65$$88); + ZEPHIR_CONCAT_SV(&_65$$88, "Wrong key in paths: ", &part); + ZEPHIR_CALL_METHOD(NULL, &_64$$88, "__construct", &_28, 32, &_65$$88); zephir_check_call_status(); - zephir_throw_exception_debug(&_70$$95, "phalcon/Mvc/Router.zep", 884); + zephir_throw_exception_debug(&_64$$88, "phalcon/Mvc/Router.zep", 866); ZEPHIR_MM_RESTORE(); return; } - _72$$94 = Z_TYPE_P(&position) != IS_STRING; - if (_72$$94) { - _72$$94 = Z_TYPE_P(&position) != IS_LONG; + _66$$87 = Z_TYPE_P(&position) != IS_STRING; + if (_66$$87) { + _66$$87 = Z_TYPE_P(&position) != IS_LONG; } - if (_72$$94) { + if (_66$$87) { continue; } ZEPHIR_OBS_NVAR(&matchPosition); @@ -2164,13 +2111,13 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) if (Z_TYPE_P(&converters) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&converter); if (zephir_array_isset_fetch(&converter, &converters, &part, 0)) { - ZEPHIR_INIT_NVAR(&_73$$99); - ZEPHIR_INIT_NVAR(&_74$$99); - zephir_create_array(&_74$$99, 1, 0); - zephir_array_fast_append(&_74$$99, &matchPosition); - ZEPHIR_CALL_USER_FUNC_ARRAY(&_73$$99, &converter, &_74$$99); + ZEPHIR_INIT_NVAR(&_67$$92); + ZEPHIR_INIT_NVAR(&_68$$92); + zephir_create_array(&_68$$92, 1, 0); + zephir_array_fast_append(&_68$$92, &matchPosition); + ZEPHIR_CALL_USER_FUNC_ARRAY(&_67$$92, &converter, &_68$$92); zephir_check_call_status(); - zephir_array_update_zval(&parts, &part, &_73$$99, PH_COPY | PH_SEPARATE); + zephir_array_update_zval(&parts, &part, &_67$$92, PH_COPY | PH_SEPARATE); continue; } } @@ -2179,13 +2126,13 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) if (Z_TYPE_P(&converters) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&converter); if (zephir_array_isset_fetch(&converter, &converters, &part, 0)) { - ZEPHIR_INIT_NVAR(&_75$$102); - ZEPHIR_INIT_NVAR(&_76$$102); - zephir_create_array(&_76$$102, 1, 0); - zephir_array_fast_append(&_76$$102, &position); - ZEPHIR_CALL_USER_FUNC_ARRAY(&_75$$102, &converter, &_76$$102); + ZEPHIR_INIT_NVAR(&_69$$95); + ZEPHIR_INIT_NVAR(&_70$$95); + zephir_create_array(&_70$$95, 1, 0); + zephir_array_fast_append(&_70$$95, &position); + ZEPHIR_CALL_USER_FUNC_ARRAY(&_69$$95, &converter, &_70$$95); zephir_check_call_status(); - zephir_array_update_zval(&parts, &part, &_75$$102, PH_COPY | PH_SEPARATE); + zephir_array_update_zval(&parts, &part, &_69$$95, PH_COPY | PH_SEPARATE); } } else { if (Z_TYPE_P(&position) == IS_LONG) { @@ -2223,25 +2170,25 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) } } if (!(zephir_is_true(&routeFound))) { - zephir_read_property(&_77$$107, this_ptr, ZEND_STRL("notFoundPaths"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(¬FoundPaths, &_77$$107); + zephir_read_property(&_71$$100, this_ptr, ZEND_STRL("notFoundPaths"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CPY_WRT(¬FoundPaths, &_71$$100); if (Z_TYPE_P(¬FoundPaths) != IS_NULL) { - ZEPHIR_CALL_CE_STATIC(&parts, phalcon_mvc_router_route_ce, "getroutepaths", &_78, 0, ¬FoundPaths); + ZEPHIR_CALL_CE_STATIC(&parts, phalcon_mvc_router_route_ce, "getroutepaths", &_72, 0, ¬FoundPaths); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&routeFound); ZVAL_BOOL(&routeFound, 1); } } - zephir_read_property(&_79, this_ptr, ZEND_STRL("defaultNamespace"), PH_NOISY_CC | PH_READONLY); - zephir_update_property_zval(this_ptr, ZEND_STRL("namespaceName"), &_79); - zephir_read_property(&_80, this_ptr, ZEND_STRL("defaultModule"), PH_NOISY_CC | PH_READONLY); - zephir_update_property_zval(this_ptr, ZEND_STRL("module"), &_80); - zephir_read_property(&_81, this_ptr, ZEND_STRL("defaultController"), PH_NOISY_CC | PH_READONLY); - zephir_update_property_zval(this_ptr, ZEND_STRL("controller"), &_81); - zephir_read_property(&_82, this_ptr, ZEND_STRL("defaultAction"), PH_NOISY_CC | PH_READONLY); - zephir_update_property_zval(this_ptr, ZEND_STRL("action"), &_82); - zephir_read_property(&_83, this_ptr, ZEND_STRL("defaultParams"), PH_NOISY_CC | PH_READONLY); - zephir_update_property_zval(this_ptr, ZEND_STRL("params"), &_83); + zephir_read_property(&_73, this_ptr, ZEND_STRL("defaultNamespace"), PH_NOISY_CC | PH_READONLY); + zephir_update_property_zval(this_ptr, ZEND_STRL("namespaceName"), &_73); + zephir_read_property(&_74, this_ptr, ZEND_STRL("defaultModule"), PH_NOISY_CC | PH_READONLY); + zephir_update_property_zval(this_ptr, ZEND_STRL("module"), &_74); + zephir_read_property(&_75, this_ptr, ZEND_STRL("defaultController"), PH_NOISY_CC | PH_READONLY); + zephir_update_property_zval(this_ptr, ZEND_STRL("controller"), &_75); + zephir_read_property(&_76, this_ptr, ZEND_STRL("defaultAction"), PH_NOISY_CC | PH_READONLY); + zephir_update_property_zval(this_ptr, ZEND_STRL("action"), &_76); + zephir_read_property(&_77, this_ptr, ZEND_STRL("defaultParams"), PH_NOISY_CC | PH_READONLY); + zephir_update_property_zval(this_ptr, ZEND_STRL("params"), &_77); if (zephir_is_true(&routeFound)) { ZEPHIR_OBS_VAR(&vnamespace); if (zephir_array_isset_string_fetch(&vnamespace, &parts, SL("namespace"), 0)) { @@ -2266,10 +2213,10 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) ZEPHIR_OBS_VAR(¶msStr); if (zephir_array_isset_string_fetch(¶msStr, &parts, SL("params"), 0)) { if (Z_TYPE_P(¶msStr) == IS_STRING) { - ZEPHIR_INIT_VAR(&_84$$115); - ZVAL_STRING(&_84$$115, "/"); + ZEPHIR_INIT_VAR(&_78$$108); + ZVAL_STRING(&_78$$108, "/"); ZEPHIR_INIT_VAR(&strParams); - zephir_fast_trim(&strParams, ¶msStr, &_84$$115, ZEPHIR_TRIM_BOTH); + zephir_fast_trim(&strParams, ¶msStr, &_78$$108, ZEPHIR_TRIM_BOTH); if (!ZEPHIR_IS_STRING_IDENTICAL(&strParams, "")) { ZEPHIR_INIT_NVAR(¶ms); zephir_fast_explode_str(¶ms, SL("/"), &strParams, LONG_MAX); @@ -2278,17 +2225,17 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) zephir_array_unset_string(&parts, SL("params"), PH_SEPARATE); } if (zephir_fast_count_int(¶ms)) { - ZEPHIR_INIT_VAR(&_85$$117); - zephir_fast_array_merge(&_85$$117, ¶ms, &parts); - zephir_update_property_zval(this_ptr, ZEND_STRL("params"), &_85$$117); + ZEPHIR_INIT_VAR(&_79$$110); + zephir_fast_array_merge(&_79$$110, ¶ms, &parts); + zephir_update_property_zval(this_ptr, ZEND_STRL("params"), &_79$$110); } else { zephir_update_property_zval(this_ptr, ZEND_STRL("params"), &parts); } } if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { - ZEPHIR_INIT_VAR(&_86$$119); - ZVAL_STRING(&_86$$119, "router:afterCheckRoutes"); - ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", NULL, 0, &_86$$119, this_ptr); + ZEPHIR_INIT_VAR(&_80$$112); + ZVAL_STRING(&_80$$112, "router:afterCheckRoutes"); + ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", NULL, 0, &_80$$112, this_ptr); zephir_check_call_status(); } ZEPHIR_MM_RESTORE(); @@ -2355,13 +2302,13 @@ PHP_METHOD(Phalcon_Mvc_Router, mount) ZEPHIR_CALL_METHOD(&groupRoutes, group, "getroutes", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(!(zephir_fast_count_int(&groupRoutes)))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_router_exception_ce, "The group of routes does not contain any routes", "phalcon/Mvc/Router.zep", 1069); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_router_exception_ce, "The group of routes does not contain any routes", "phalcon/Mvc/Router.zep", 1051); return; } ZEPHIR_CALL_METHOD(&beforeMatch, group, "getbeforematch", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&beforeMatch) != IS_NULL) { - zephir_is_iterable(&groupRoutes, 0, "phalcon/Mvc/Router.zep", 1081); + zephir_is_iterable(&groupRoutes, 0, "phalcon/Mvc/Router.zep", 1063); if (Z_TYPE_P(&groupRoutes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&groupRoutes), _2$$5) { @@ -2392,7 +2339,7 @@ PHP_METHOD(Phalcon_Mvc_Router, mount) ZEPHIR_CALL_METHOD(&hostname, group, "gethostname", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&hostname) != IS_NULL) { - zephir_is_iterable(&groupRoutes, 0, "phalcon/Mvc/Router.zep", 1090); + zephir_is_iterable(&groupRoutes, 0, "phalcon/Mvc/Router.zep", 1072); if (Z_TYPE_P(&groupRoutes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&groupRoutes), _4$$8) { @@ -2459,7 +2406,7 @@ PHP_METHOD(Phalcon_Mvc_Router, notFound) _0 = Z_TYPE_P(paths) != IS_STRING; } if (UNEXPECTED(_0)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_mvc_router_exception_ce, "The not-found paths must be an array or string", "phalcon/Mvc/Router.zep", 1112); + ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_mvc_router_exception_ce, "The not-found paths must be an array or string", "phalcon/Mvc/Router.zep", 1094); return; } zephir_update_property_zval(this_ptr, ZEND_STRL("notFoundPaths"), paths); diff --git a/ext/phalcon/mvc/router/annotations.zep.c b/ext/phalcon/mvc/router/annotations.zep.c index a444a70d9a4..132872e6249 100644 --- a/ext/phalcon/mvc/router/annotations.zep.c +++ b/ext/phalcon/mvc/router/annotations.zep.c @@ -342,7 +342,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) object_init_ex(&route, phalcon_mvc_router_route_ce); ZEPHIR_CALL_METHOD(NULL, &route, "__construct", &_4, 100, &prefix); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_5$$6, &route, "getcompiledpattern", &_6, 487); + ZEPHIR_CALL_METHOD(&_5$$6, &route, "getcompiledpattern", &_6, 488); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_7$$6); ZVAL_STRING(&_7$$6, "$#"); @@ -556,7 +556,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) object_init_ex(&route, phalcon_mvc_router_route_ce); ZEPHIR_CALL_METHOD(NULL, &route, "__construct", &_4, 100, &prefix); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_28$$29, &route, "getcompiledpattern", &_6, 487); + ZEPHIR_CALL_METHOD(&_28$$29, &route, "getcompiledpattern", &_6, 488); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_29$$29); ZVAL_STRING(&_29$$29, "$#"); diff --git a/ext/phalcon/mvc/router/group.zep.c b/ext/phalcon/mvc/router/group.zep.c index 0d2f5fe3f1d..8152b64020a 100644 --- a/ext/phalcon/mvc/router/group.zep.c +++ b/ext/phalcon/mvc/router/group.zep.c @@ -1104,7 +1104,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addRoute) ZEPHIR_CALL_METHOD(NULL, &route, "__construct", NULL, 100, &_2, &mergedPaths, httpMethods); zephir_check_call_status(); zephir_update_property_array_append(this_ptr, SL("routes"), &route); - ZEPHIR_CALL_METHOD(NULL, &route, "setgroup", NULL, 488, this_ptr); + ZEPHIR_CALL_METHOD(NULL, &route, "setgroup", NULL, 489, this_ptr); zephir_check_call_status(); RETURN_CCTOR(&route); } diff --git a/ext/phalcon/mvc/router/route.zep.c b/ext/phalcon/mvc/router/route.zep.c index 64a7d502185..ff891df3584 100644 --- a/ext/phalcon/mvc/router/route.zep.c +++ b/ext/phalcon/mvc/router/route.zep.c @@ -61,9 +61,9 @@ ZEPHIR_INIT_CLASS(Phalcon_Mvc_Router_Route) */ zend_declare_property_null(phalcon_mvc_router_route_ce, SL("hostname"), ZEND_ACC_PROTECTED); /** - * @var string|null + * @var string */ - zend_declare_property_null(phalcon_mvc_router_route_ce, SL("id"), ZEND_ACC_PROTECTED); + zend_declare_property_string(phalcon_mvc_router_route_ce, SL("id"), "", ZEND_ACC_PROTECTED); /** * @var array|string */ @@ -102,10 +102,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, __construct) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *pattern_param = NULL, *paths = NULL, paths_sub, *httpMethods = NULL, httpMethods_sub, __$null, routeId, uniqueId, _0; - zval pattern; + zval pattern, _1; zval *this_ptr = getThis(); ZVAL_UNDEF(&pattern); + ZVAL_UNDEF(&_1); ZVAL_UNDEF(&paths_sub); ZVAL_UNDEF(&httpMethods_sub); ZVAL_NULL(&__$null); @@ -152,7 +153,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, __construct) zephir_read_static_property_ce(&_0, phalcon_mvc_router_route_ce, SL("uniqueId"), PH_NOISY_CC); ZEPHIR_CPY_WRT(&uniqueId, &_0); ZEPHIR_CPY_WRT(&routeId, &uniqueId); - zephir_update_property_zval(this_ptr, ZEND_STRL("id"), &routeId); + zephir_cast_to_string(&_1, &routeId); + zephir_update_property_zval(this_ptr, ZEND_STRL("id"), &_1); ZEPHIR_INIT_ZVAL_NREF(_0); ZVAL_LONG(&_0, (zephir_get_numberval(&uniqueId) + 1)); zephir_update_static_property_ce(phalcon_mvc_router_route_ce, ZEND_STRL("uniqueId"), &_0); @@ -684,7 +686,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getHostname) } /** - * @return string | null + * @return string */ PHP_METHOD(Phalcon_Mvc_Router_Route, getId) { diff --git a/ext/phalcon/mvc/router/route.zep.h b/ext/phalcon/mvc/router/route.zep.h index e7f56808098..2c8c362178a 100644 --- a/ext/phalcon/mvc/router/route.zep.h +++ b/ext/phalcon/mvc/router/route.zep.h @@ -73,7 +73,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_router_route_gethostname, 0, 0, IS_STRING, 1) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_router_route_getid, 0, 0, IS_STRING, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_router_route_getid, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_router_route_getmatch, 0, 0, 0) diff --git a/ext/phalcon/mvc/url.zep.c b/ext/phalcon/mvc/url.zep.c index 2e6bf472211..c8818a24f55 100644 --- a/ext/phalcon/mvc/url.zep.c +++ b/ext/phalcon/mvc/url.zep.c @@ -309,7 +309,7 @@ PHP_METHOD(Phalcon_Mvc_Url, get) zephir_check_call_status(); } if (zephir_is_true(args)) { - ZEPHIR_CALL_FUNCTION(&queryString, "http_build_query", NULL, 489, args); + ZEPHIR_CALL_FUNCTION(&queryString, "http_build_query", NULL, 490, args); zephir_check_call_status(); _20$$16 = Z_TYPE_P(&queryString) == IS_STRING; if (_20$$16) { diff --git a/ext/phalcon/mvc/view.zep.c b/ext/phalcon/mvc/view.zep.c index ed21245c4b1..9408c9b711d 100644 --- a/ext/phalcon/mvc/view.zep.c +++ b/ext/phalcon/mvc/view.zep.c @@ -522,7 +522,7 @@ PHP_METHOD(Phalcon_Mvc_View, finish) ZEPHIR_MM_GROW(); - ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 490); + ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 491); zephir_check_call_status(); RETURN_THIS(); } @@ -1972,7 +1972,7 @@ PHP_METHOD(Phalcon_Mvc_View, setViewsDir) return; } if (Z_TYPE_P(viewsDir) == IS_STRING) { - ZEPHIR_CALL_METHOD(&_1$$4, this_ptr, "getdirseparator", NULL, 491, viewsDir); + ZEPHIR_CALL_METHOD(&_1$$4, this_ptr, "getdirseparator", NULL, 492, viewsDir); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("viewsDirs"), &_1$$4); } else { @@ -1994,7 +1994,7 @@ PHP_METHOD(Phalcon_Mvc_View, setViewsDir) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_exception_ce, "Views directory item must be a string", "phalcon/Mvc/View.zep", 994); return; } - ZEPHIR_CALL_METHOD(&_6$$6, this_ptr, "getdirseparator", NULL, 491, &directory); + ZEPHIR_CALL_METHOD(&_6$$6, this_ptr, "getdirseparator", NULL, 492, &directory); zephir_check_call_status(); zephir_array_update_zval(&newViewsDir, &position, &_6$$6, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -2015,7 +2015,7 @@ PHP_METHOD(Phalcon_Mvc_View, setViewsDir) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_exception_ce, "Views directory item must be a string", "phalcon/Mvc/View.zep", 994); return; } - ZEPHIR_CALL_METHOD(&_7$$8, this_ptr, "getdirseparator", NULL, 491, &directory); + ZEPHIR_CALL_METHOD(&_7$$8, this_ptr, "getdirseparator", NULL, 492, &directory); zephir_check_call_status(); zephir_array_update_zval(&newViewsDir, &position, &_7$$8, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, viewsDir, "next", NULL, 0); @@ -2218,7 +2218,7 @@ PHP_METHOD(Phalcon_Mvc_View, engineRender) { ZEPHIR_INIT_NVAR(&viewsDir); ZVAL_COPY(&viewsDir, _2); - ZEPHIR_CALL_METHOD(&_4$$3, this_ptr, "isabsolutepath", &_5, 492, &viewPath); + ZEPHIR_CALL_METHOD(&_4$$3, this_ptr, "isabsolutepath", &_5, 493, &viewPath); zephir_check_call_status(); if (!(zephir_is_true(&_4$$3))) { ZEPHIR_INIT_NVAR(&viewsDirPath); @@ -2334,7 +2334,7 @@ PHP_METHOD(Phalcon_Mvc_View, engineRender) } ZEPHIR_CALL_METHOD(&viewsDir, &_1, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_24$$16, this_ptr, "isabsolutepath", &_5, 492, &viewPath); + ZEPHIR_CALL_METHOD(&_24$$16, this_ptr, "isabsolutepath", &_5, 493, &viewPath); zephir_check_call_status(); if (!(zephir_is_true(&_24$$16))) { ZEPHIR_INIT_NVAR(&viewsDirPath); @@ -2565,7 +2565,7 @@ PHP_METHOD(Phalcon_Mvc_View, loadTemplateEngines) if (ZEPHIR_IS_EMPTY(®isteredEngines)) { ZEPHIR_INIT_VAR(&_2$$4); object_init_ex(&_2$$4, phalcon_mvc_view_engine_php_ce); - ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 493, this_ptr, &di); + ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 494, this_ptr, &di); zephir_check_call_status(); zephir_array_update_string(&engines, SL(".phtml"), &_2$$4, PH_COPY | PH_SEPARATE); } else { @@ -2780,7 +2780,7 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) zephir_update_property_zval(this_ptr, ZEND_STRL("currentRenderLevel"), &_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("disabled"), PH_NOISY_CC | PH_READONLY); if (!ZEPHIR_IS_FALSE_IDENTICAL(&_0)) { - ZEPHIR_CALL_FUNCTION(&_1$$3, "ob_get_contents", NULL, 494); + ZEPHIR_CALL_FUNCTION(&_1$$3, "ob_get_contents", NULL, 495); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("content"), &_1$$3); RETURN_MM_BOOL(0); @@ -2838,7 +2838,7 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) RETURN_MM_BOOL(0); } } - ZEPHIR_CALL_FUNCTION(&_8, "ob_get_contents", NULL, 494); + ZEPHIR_CALL_FUNCTION(&_8, "ob_get_contents", NULL, 495); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("content"), &_8); silence = 1; diff --git a/ext/phalcon/mvc/view/engine/php.zep.c b/ext/phalcon/mvc/view/engine/php.zep.c index 3389e387fb5..018257d5f2f 100644 --- a/ext/phalcon/mvc/view/engine/php.zep.c +++ b/ext/phalcon/mvc/view/engine/php.zep.c @@ -92,7 +92,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Php, render) if (mustClean) { - ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 495); + ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 496); zephir_check_call_status(); } if (Z_TYPE_P(params) == IS_ARRAY) { @@ -142,7 +142,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Php, render) } if (mustClean) { zephir_read_property(&_6$$7, this_ptr, ZEND_STRL("view"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_7$$7, "ob_get_contents", NULL, 494); + ZEPHIR_CALL_FUNCTION(&_7$$7, "ob_get_contents", NULL, 495); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_6$$7, "setcontent", NULL, 0, &_7$$7); zephir_check_call_status(); diff --git a/ext/phalcon/mvc/view/engine/volt.zep.c b/ext/phalcon/mvc/view/engine/volt.zep.c index 416e1c0c1cd..fd6c193902f 100644 --- a/ext/phalcon/mvc/view/engine/volt.zep.c +++ b/ext/phalcon/mvc/view/engine/volt.zep.c @@ -186,7 +186,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, convertEncoding) _0 = ZEPHIR_IS_STRING_IDENTICAL(&to, "utf8"); } if (_0) { - ZEPHIR_RETURN_CALL_FUNCTION("utf8_encode", NULL, 496, &text); + ZEPHIR_RETURN_CALL_FUNCTION("utf8_encode", NULL, 497, &text); zephir_check_call_status(); RETURN_MM(); } @@ -236,18 +236,18 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, getCompiler) ZEPHIR_INIT_NVAR(&compiler); object_init_ex(&compiler, phalcon_mvc_view_engine_volt_compiler_ce); zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("view"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &compiler, "__construct", NULL, 497, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &compiler, "__construct", NULL, 498, &_1$$3); zephir_check_call_status(); zephir_read_property(&_2$$3, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_2$$3); if (Z_TYPE_P(&container) == IS_OBJECT) { - ZEPHIR_CALL_METHOD(NULL, &compiler, "setdi", NULL, 498, &container); + ZEPHIR_CALL_METHOD(NULL, &compiler, "setdi", NULL, 499, &container); zephir_check_call_status(); } zephir_read_property(&_2$$3, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&options, &_2$$3); if (Z_TYPE_P(&options) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(NULL, &compiler, "setoptions", NULL, 499, &options); + ZEPHIR_CALL_METHOD(NULL, &compiler, "setoptions", NULL, 500, &options); zephir_check_call_status(); } zephir_update_property_zval(this_ptr, ZEND_STRL("compiler"), &compiler); @@ -470,7 +470,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, preload) zephir_fast_str_replace(&_5$$5, &_6$$5, &_7$$5, &href); ZEPHIR_INIT_VAR(&_8$$5); ZVAL_STRING(&_8$$5, "preload"); - ZEPHIR_CALL_METHOD(NULL, &link, "__construct", NULL, 500, &_8$$5, &_5$$5, &attributes); + ZEPHIR_CALL_METHOD(NULL, &link, "__construct", NULL, 501, &_8$$5, &_5$$5, &attributes); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_8$$5); object_init_ex(&_8$$5, phalcon_html_link_serializer_header_ce); @@ -482,7 +482,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, preload) ZEPHIR_INIT_VAR(&_10$$5); zephir_create_array(&_10$$5, 1, 0); zephir_array_fast_append(&_10$$5, &link); - ZEPHIR_CALL_METHOD(&_9$$5, &_8$$5, "serialize", NULL, 501, &_10$$5); + ZEPHIR_CALL_METHOD(&_9$$5, &_8$$5, "serialize", NULL, 502, &_10$$5); zephir_check_call_status(); ZEPHIR_INIT_VAR(&header); ZEPHIR_CONCAT_SV(&header, "Link: ", &_9$$5); @@ -559,7 +559,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, render) if (mustClean) { - ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 495); + ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 496); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(&compiler, this_ptr, "getcompiler", NULL, 0); @@ -635,7 +635,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, render) } if (mustClean) { zephir_read_property(&_11$$11, this_ptr, ZEND_STRL("view"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_12$$11, "ob_get_contents", NULL, 494); + ZEPHIR_CALL_FUNCTION(&_12$$11, "ob_get_contents", NULL, 495); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_11$$11, "setcontent", NULL, 0, &_12$$11); zephir_check_call_status(); @@ -792,7 +792,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, slice) } if (Z_TYPE_P(value) == IS_ARRAY) { ZVAL_LONG(&_5$$9, start); - ZEPHIR_RETURN_CALL_FUNCTION("array_slice", NULL, 502, value, &_5$$9, &length); + ZEPHIR_RETURN_CALL_FUNCTION("array_slice", NULL, 503, value, &_5$$9, &length); zephir_check_call_status(); RETURN_MM(); } @@ -844,7 +844,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, sort) ZEPHIR_MAKE_REF(&value); - ZEPHIR_CALL_FUNCTION(NULL, "asort", NULL, 503, &value); + ZEPHIR_CALL_FUNCTION(NULL, "asort", NULL, 504, &value); ZEPHIR_UNREF(&value); zephir_check_call_status(); RETURN_CTOR(&value); diff --git a/ext/phalcon/mvc/view/engine/volt/compiler.zep.c b/ext/phalcon/mvc/view/engine/volt/compiler.zep.c index da61cdc2fe2..13bfb6a3ebd 100644 --- a/ext/phalcon/mvc/view/engine/volt/compiler.zep.c +++ b/ext/phalcon/mvc/view/engine/volt/compiler.zep.c @@ -385,7 +385,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, attributeReader) } } } else { - ZEPHIR_CALL_METHOD(&leftCode, this_ptr, "expression", NULL, 504, &left); + ZEPHIR_CALL_METHOD(&leftCode, this_ptr, "expression", NULL, 505, &left); zephir_check_call_status(); ZEPHIR_OBS_VAR(&leftType); zephir_array_fetch_string(&leftType, &left, SL("type"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 244); @@ -407,7 +407,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, attributeReader) zephir_array_fetch_string(&_11$$11, &right, SL("value"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 258); zephir_concat_self(&exprCode, &_11$$11); } else { - ZEPHIR_CALL_METHOD(&_12$$12, this_ptr, "expression", NULL, 504, &right); + ZEPHIR_CALL_METHOD(&_12$$12, this_ptr, "expression", NULL, 505, &right); zephir_check_call_status(); zephir_concat_self(&exprCode, &_12$$12); } @@ -679,7 +679,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compile) object_init_ex(&_17$$35, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_18$$35); ZEPHIR_CONCAT_SVS(&_18$$35, "Extends compilation file ", &compiledTemplatePath, " could not be opened"); - ZEPHIR_CALL_METHOD(NULL, &_17$$35, "__construct", NULL, 505, &_18$$35); + ZEPHIR_CALL_METHOD(NULL, &_17$$35, "__construct", NULL, 506, &_18$$35); zephir_check_call_status(); zephir_throw_exception_debug(&_17$$35, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 478); ZEPHIR_MM_RESTORE(); @@ -752,7 +752,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileAutoEscape) } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_CALL_METHOD(&compilation, this_ptr, "statementlist", NULL, 506, &_0, &_1); + ZEPHIR_CALL_METHOD(&compilation, this_ptr, "statementlist", NULL, 507, &_0, &_1); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("autoescape"), &oldAutoescape); RETURN_CCTOR(&compilation); @@ -841,13 +841,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileCase) object_init_ex(&_0$$4, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_1$$4); ZVAL_STRING(&_1$$4, "Corrupt statement"); - ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 505, &_1$$4, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 506, &_1$$4, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$4, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 568); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 504, &expr); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 505, &expr); zephir_check_call_status(); ZEPHIR_CONCAT_SVS(return_value, ""); RETURN_MM(); @@ -889,7 +889,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileDo) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "Corrupted statement", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 592); return; } - ZEPHIR_CALL_METHOD(&_0, this_ptr, "expression", NULL, 504, &expr); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "expression", NULL, 505, &expr); zephir_check_call_status(); ZEPHIR_CONCAT_SVS(return_value, ""); RETURN_MM(); @@ -941,21 +941,21 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileEcho) object_init_ex(&_0$$3, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "Corrupt statement"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 505, &_1$$3, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 506, &_1$$3, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 616); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 504, &expr); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 505, &expr); zephir_check_call_status(); zephir_array_fetch_string(&_2, &expr, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 624); if (ZEPHIR_IS_LONG(&_2, 350)) { - ZEPHIR_CALL_METHOD(&_3$$4, this_ptr, "istagfactory", NULL, 507, &expr); + ZEPHIR_CALL_METHOD(&_3$$4, this_ptr, "istagfactory", NULL, 508, &expr); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_3$$4)) { ZVAL_BOOL(&_4$$5, 1); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 504, &expr, &_4$$5); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 505, &expr, &_4$$5); zephir_check_call_status(); } zephir_array_fetch_string(&name, &expr, SL("name"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 629); @@ -1015,13 +1015,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileElseIf) object_init_ex(&_0$$3, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "Corrupt statement"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 505, &_1$$3, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 506, &_1$$3, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 666); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 504, &expr); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 505, &expr); zephir_check_call_status(); ZEPHIR_CONCAT_SVS(return_value, ""); RETURN_MM(); @@ -1111,7 +1111,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileFile) object_init_ex(&_0$$4, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_1$$4); ZEPHIR_CONCAT_SVS(&_1$$4, "Template file ", &path, " does not exist"); - ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 505, &_1$$4); + ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 506, &_1$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$4, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 706); ZEPHIR_MM_RESTORE(); @@ -1124,7 +1124,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileFile) object_init_ex(&_2$$5, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_3$$5); ZEPHIR_CONCAT_SVS(&_3$$5, "Template file ", &path, " could not be opened"); - ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 505, &_3$$5); + ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 506, &_3$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_2$$5, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 718); ZEPHIR_MM_RESTORE(); @@ -1249,7 +1249,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileForeach) ZEPHIR_CONCAT_VV(&prefixLevel, &prefix, &level); ZEPHIR_OBS_VAR(&expr); zephir_array_fetch_string(&expr, &statement, SL("expr"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 782); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 504, &expr); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 505, &expr); zephir_check_call_status(); ZEPHIR_OBS_VAR(&blockStatements); zephir_array_fetch_string(&blockStatements, &statement, SL("block_statements"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 788); @@ -1309,7 +1309,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileForeach) } else { ZVAL_BOOL(&_4, 0); } - ZEPHIR_CALL_METHOD(&code, this_ptr, "statementlist", NULL, 506, &blockStatements, &_4); + ZEPHIR_CALL_METHOD(&code, this_ptr, "statementlist", NULL, 507, &blockStatements, &_4); zephir_check_call_status(); ZEPHIR_OBS_VAR(&loopContext); zephir_read_property(&loopContext, this_ptr, ZEND_STRL("loopPointers"), PH_NOISY_CC); @@ -1360,7 +1360,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileForeach) } ZEPHIR_OBS_VAR(&ifExpr); if (zephir_array_isset_string_fetch(&ifExpr, &statement, SL("if_expr"), 0)) { - ZEPHIR_CALL_METHOD(&_16$$15, this_ptr, "expression", NULL, 504, &ifExpr); + ZEPHIR_CALL_METHOD(&_16$$15, this_ptr, "expression", NULL, 505, &ifExpr); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_17$$15); ZEPHIR_CONCAT_SVS(&_17$$15, "if (", &_16$$15, ") { ?>"); @@ -1502,13 +1502,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileIf) object_init_ex(&_0$$3, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "Corrupt statement"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 505, &_1$$3, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 506, &_1$$3, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 941); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 504, &expr); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 505, &expr); zephir_check_call_status(); zephir_array_fetch_string(&_4, &statement, SL("true_statements"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 947); if (extendsMode) { @@ -1516,7 +1516,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileIf) } else { ZVAL_BOOL(&_5, 0); } - ZEPHIR_CALL_METHOD(&_3, this_ptr, "statementlist", NULL, 506, &_4, &_5); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "statementlist", NULL, 507, &_4, &_5); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_6); ZEPHIR_CONCAT_SVSV(&_6, "", &_3); @@ -1528,7 +1528,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileIf) } else { ZVAL_BOOL(&_8$$4, 0); } - ZEPHIR_CALL_METHOD(&_7$$4, this_ptr, "statementlist", NULL, 506, &blockStatements, &_8$$4); + ZEPHIR_CALL_METHOD(&_7$$4, this_ptr, "statementlist", NULL, 507, &blockStatements, &_8$$4); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_9$$4); ZEPHIR_CONCAT_SV(&_9$$4, "", &_7$$4); @@ -1606,14 +1606,14 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileInclude) RETURN_CCTOR(&compilation); } } - ZEPHIR_CALL_METHOD(&path, this_ptr, "expression", NULL, 504, &pathExpr); + ZEPHIR_CALL_METHOD(&path, this_ptr, "expression", NULL, 505, &pathExpr); zephir_check_call_status(); ZEPHIR_OBS_VAR(¶ms); if (!(zephir_array_isset_string_fetch(¶ms, &statement, SL("params"), 0))) { ZEPHIR_CONCAT_SVS(return_value, "partial(", &path, "); ?>"); RETURN_MM(); } - ZEPHIR_CALL_METHOD(&_3, this_ptr, "expression", NULL, 504, ¶ms); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "expression", NULL, 505, ¶ms); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "partial(", &path, ", ", &_3, "); ?>"); RETURN_MM(); @@ -1701,7 +1701,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileMacro) object_init_ex(&_1$$4, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_2$$4); ZEPHIR_CONCAT_SVS(&_2$$4, "Macro '", &name, "' is already defined"); - ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 505, &_2$$4); + ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 506, &_2$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1063); ZEPHIR_MM_RESTORE(); @@ -1752,7 +1752,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileMacro) zephir_concat_self_str(&code, " } else { ", sizeof(" } else { ") - 1); ZEPHIR_OBS_NVAR(&defaultValue); if (EXPECTED(zephir_array_isset_string_fetch(&defaultValue, ¶meter, SL("default"), 0))) { - ZEPHIR_CALL_METHOD(&_14$$8, this_ptr, "expression", &_15, 504, &defaultValue); + ZEPHIR_CALL_METHOD(&_14$$8, this_ptr, "expression", &_15, 505, &defaultValue); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_16$$8); ZEPHIR_CONCAT_SVSVS(&_16$$8, "$", &variableName, " = ", &_14$$8, ";"); @@ -1795,7 +1795,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileMacro) zephir_concat_self_str(&code, " } else { ", sizeof(" } else { ") - 1); ZEPHIR_OBS_NVAR(&defaultValue); if (EXPECTED(zephir_array_isset_string_fetch(&defaultValue, ¶meter, SL("default"), 0))) { - ZEPHIR_CALL_METHOD(&_22$$11, this_ptr, "expression", &_15, 504, &defaultValue); + ZEPHIR_CALL_METHOD(&_22$$11, this_ptr, "expression", &_15, 505, &defaultValue); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_23$$11); ZEPHIR_CONCAT_SVSVS(&_23$$11, "$", &variableName, " = ", &_22$$11, ";"); @@ -1821,7 +1821,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileMacro) } else { ZVAL_BOOL(&_26$$13, 0); } - ZEPHIR_CALL_METHOD(&_25$$13, this_ptr, "statementlist", NULL, 506, &blockStatements, &_26$$13); + ZEPHIR_CALL_METHOD(&_25$$13, this_ptr, "statementlist", NULL, 507, &blockStatements, &_26$$13); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_27$$13); ZEPHIR_CONCAT_VS(&_27$$13, &_25$$13, ""); RETURN_MM(); @@ -1944,10 +1944,10 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSet) ZEPHIR_INIT_NVAR(&assignment); ZVAL_COPY(&assignment, _0); zephir_array_fetch_string(&_2$$4, &assignment, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1174); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", &_3, 504, &_2$$4); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", &_3, 505, &_2$$4); zephir_check_call_status(); zephir_array_fetch_string(&_4$$4, &assignment, SL("variable"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1181); - ZEPHIR_CALL_METHOD(&target, this_ptr, "expression", &_3, 504, &_4$$4); + ZEPHIR_CALL_METHOD(&target, this_ptr, "expression", &_3, 505, &_4$$4); zephir_check_call_status(); zephir_array_fetch_string(&_5$$4, &assignment, SL("op"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1187); do { @@ -1994,10 +1994,10 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSet) ZEPHIR_CALL_METHOD(&assignment, &assignments, "current", NULL, 0); zephir_check_call_status(); zephir_array_fetch_string(&_11$$10, &assignment, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1174); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", &_3, 504, &_11$$10); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", &_3, 505, &_11$$10); zephir_check_call_status(); zephir_array_fetch_string(&_12$$10, &assignment, SL("variable"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1181); - ZEPHIR_CALL_METHOD(&target, this_ptr, "expression", &_3, 504, &_12$$10); + ZEPHIR_CALL_METHOD(&target, this_ptr, "expression", &_3, 505, &_12$$10); zephir_check_call_status(); zephir_array_fetch_string(&_13$$10, &assignment, SL("op"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1187); do { @@ -2162,13 +2162,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSwitch) object_init_ex(&_0$$3, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "Corrupt statement"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 505, &_1$$3, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 506, &_1$$3, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1253); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 504, &expr); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 505, &expr); zephir_check_call_status(); ZEPHIR_INIT_VAR(&compilation); ZEPHIR_CONCAT_SVS(&compilation, ""); @@ -2179,7 +2179,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSwitch) } else { ZVAL_BOOL(&_3$$4, 0); } - ZEPHIR_CALL_METHOD(&lines, this_ptr, "statementlist", NULL, 506, &caseClauses, &_3$$4); + ZEPHIR_CALL_METHOD(&lines, this_ptr, "statementlist", NULL, 507, &caseClauses, &_3$$4); zephir_check_call_status(); if (zephir_fast_strlen_ev(&lines) != 0) { ZEPHIR_INIT_VAR(&_4$$5); @@ -2292,7 +2292,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) zephir_array_fast_append(&_1$$4, &expr); ZEPHIR_INIT_NVAR(&_2$$4); ZVAL_STRING(&_2$$4, "resolveExpression"); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "fireextensionevent", &_3, 508, &_2$$4, &_1$$4); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "fireextensionevent", &_3, 509, &_2$$4, &_1$$4); zephir_check_call_status(); if (Z_TYPE_P(&exprCode) == IS_STRING) { break; @@ -2314,7 +2314,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_7$$7, 0); } - ZEPHIR_CALL_METHOD(&singleExprCode, this_ptr, "expression", &_8, 504, &_6$$7, &_7$$7); + ZEPHIR_CALL_METHOD(&singleExprCode, this_ptr, "expression", &_8, 505, &_6$$7, &_7$$7); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&name); if (zephir_array_isset_string_fetch(&name, &singleExpr, SL("name"), 0)) { @@ -2342,7 +2342,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_11$$10, 0); } - ZEPHIR_CALL_METHOD(&singleExprCode, this_ptr, "expression", &_8, 504, &_10$$10, &_11$$10); + ZEPHIR_CALL_METHOD(&singleExprCode, this_ptr, "expression", &_8, 505, &_10$$10, &_11$$10); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&name); if (zephir_array_isset_string_fetch(&name, &singleExpr, SL("name"), 0)) { @@ -2373,7 +2373,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_14$$14, 0); } - ZEPHIR_CALL_METHOD(&leftCode, this_ptr, "expression", &_8, 504, &left, &_14$$14); + ZEPHIR_CALL_METHOD(&leftCode, this_ptr, "expression", &_8, 505, &left, &_14$$14); zephir_check_call_status(); } if (ZEPHIR_IS_LONG(&type, 311)) { @@ -2384,7 +2384,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } if (ZEPHIR_IS_LONG(&type, 124)) { zephir_array_fetch_string(&_17$$16, &expr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1390); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "resolvefilter", &_18, 509, &_17$$16, &leftCode); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "resolvefilter", &_18, 510, &_17$$16, &leftCode); zephir_check_call_status(); break; } @@ -2395,7 +2395,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_19$$17, 0); } - ZEPHIR_CALL_METHOD(&rightCode, this_ptr, "expression", &_8, 504, &right, &_19$$17); + ZEPHIR_CALL_METHOD(&rightCode, this_ptr, "expression", &_8, 505, &right, &_19$$17); zephir_check_call_status(); } ZEPHIR_INIT_NVAR(&exprCode); @@ -2586,7 +2586,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_28$$54, 0); } - ZEPHIR_CALL_METHOD(&startCode, this_ptr, "expression", &_8, 504, &start, &_28$$54); + ZEPHIR_CALL_METHOD(&startCode, this_ptr, "expression", &_8, 505, &start, &_28$$54); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&startCode); @@ -2599,7 +2599,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_29$$56, 0); } - ZEPHIR_CALL_METHOD(&endCode, this_ptr, "expression", &_8, 504, &end, &_29$$56); + ZEPHIR_CALL_METHOD(&endCode, this_ptr, "expression", &_8, 505, &end, &_29$$56); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&endCode); @@ -2696,7 +2696,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_32$$74, 0); } - ZEPHIR_CALL_METHOD(&_30$$74, this_ptr, "expression", &_8, 504, &_31$$74, &_32$$74); + ZEPHIR_CALL_METHOD(&_30$$74, this_ptr, "expression", &_8, 505, &_31$$74, &_32$$74); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&exprCode); ZEPHIR_CONCAT_SVSVSVS(&exprCode, "(", &_30$$74, " ? ", &leftCode, " : ", &rightCode, ")"); @@ -2723,7 +2723,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) zephir_array_fetch_string(&_35$$78, &expr, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1646); ZEPHIR_INIT_NVAR(&_36$$78); ZEPHIR_CONCAT_SVSVSV(&_36$$78, "Unknown expression ", &type, " in ", &_34$$78, " on line ", &_35$$78); - ZEPHIR_CALL_METHOD(NULL, &_33$$78, "__construct", &_37, 505, &_36$$78); + ZEPHIR_CALL_METHOD(NULL, &_33$$78, "__construct", &_37, 506, &_36$$78); zephir_check_call_status(); zephir_throw_exception_debug(&_33$$78, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1646); ZEPHIR_MM_RESTORE(); @@ -2960,7 +2960,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) } else { ZVAL_BOOL(&_0$$3, 0); } - ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 504, &funcArguments, &_0$$3); + ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 505, &funcArguments, &_0$$3); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&arguments); @@ -2979,7 +2979,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) zephir_array_fast_append(&_2$$6, &funcArguments); ZEPHIR_INIT_VAR(&_3$$6); ZVAL_STRING(&_3$$6, "compileFunction"); - ZEPHIR_CALL_METHOD(&code, this_ptr, "fireextensionevent", NULL, 508, &_3$$6, &_2$$6); + ZEPHIR_CALL_METHOD(&code, this_ptr, "fireextensionevent", NULL, 509, &_3$$6, &_2$$6); zephir_check_call_status(); if (Z_TYPE_P(&code) == IS_STRING) { RETURN_CCTOR(&code); @@ -3011,7 +3011,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) zephir_array_fetch_string(&_7$$9, &expr, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1782); ZEPHIR_INIT_VAR(&_8$$9); ZEPHIR_CONCAT_SVSVSV(&_8$$9, "Invalid definition for user function '", &name, "' in ", &_6$$9, " on line ", &_7$$9); - ZEPHIR_CALL_METHOD(NULL, &_5$$9, "__construct", NULL, 505, &_8$$9); + ZEPHIR_CALL_METHOD(NULL, &_5$$9, "__construct", NULL, 506, &_8$$9); zephir_check_call_status(); zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1782); ZEPHIR_MM_RESTORE(); @@ -3040,7 +3040,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) zephir_read_property(&_12$$17, this_ptr, ZEND_STRL("exprLevel"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&exprLevel, &_12$$17); if (Z_TYPE_P(&block) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(&code, this_ptr, "statementlistorextends", NULL, 510, &block); + ZEPHIR_CALL_METHOD(&code, this_ptr, "statementlistorextends", NULL, 511, &block); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&exprLevel, 1)) { ZEPHIR_CPY_WRT(&escapedCode, &code); @@ -3125,7 +3125,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) ZEPHIR_OBS_NVAR(&funcArguments); if (zephir_array_isset_string_fetch(&funcArguments, &expr, SL("arguments"), 0)) { ZVAL_BOOL(&_22$$30, 1); - ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 504, &funcArguments, &_22$$30); + ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 505, &funcArguments, &_22$$30); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&arguments); @@ -3176,7 +3176,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) } else { ZVAL_BOOL(&_24, 0); } - ZEPHIR_CALL_METHOD(&_23, this_ptr, "expression", NULL, 504, &nameExpr, &_24); + ZEPHIR_CALL_METHOD(&_23, this_ptr, "expression", NULL, 505, &nameExpr, &_24); zephir_check_call_status(); ZEPHIR_CONCAT_VSVS(return_value, &_23, "(", &arguments, ")"); RETURN_MM(); @@ -3515,21 +3515,21 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveTest) do { if (ZEPHIR_IS_STRING(&name, "divisibleby")) { zephir_array_fetch_string(&_1$$12, &test, SL("arguments"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2144); - ZEPHIR_CALL_METHOD(&_0$$12, this_ptr, "expression", NULL, 504, &_1$$12); + ZEPHIR_CALL_METHOD(&_0$$12, this_ptr, "expression", NULL, 505, &_1$$12); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "(((", &left, ") % (", &_0$$12, ")) == 0)"); RETURN_MM(); } if (ZEPHIR_IS_STRING(&name, "sameas")) { zephir_array_fetch_string(&_3$$13, &test, SL("arguments"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2146); - ZEPHIR_CALL_METHOD(&_2$$13, this_ptr, "expression", NULL, 504, &_3$$13); + ZEPHIR_CALL_METHOD(&_2$$13, this_ptr, "expression", NULL, 505, &_3$$13); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "(", &left, ") === (", &_2$$13, ")"); RETURN_MM(); } if (ZEPHIR_IS_STRING(&name, "type")) { zephir_array_fetch_string(&_5$$14, &test, SL("arguments"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2148); - ZEPHIR_CALL_METHOD(&_4$$14, this_ptr, "expression", NULL, 504, &_5$$14); + ZEPHIR_CALL_METHOD(&_4$$14, this_ptr, "expression", NULL, 505, &_5$$14); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "gettype(", &left, ") === (", &_4$$14, ")"); RETURN_MM(); @@ -3538,7 +3538,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveTest) } } - ZEPHIR_CALL_METHOD(&_6, this_ptr, "expression", NULL, 504, &test); + ZEPHIR_CALL_METHOD(&_6, this_ptr, "expression", NULL, 505, &test); zephir_check_call_status(); ZEPHIR_CONCAT_VSV(return_value, &left, " == ", &_6); RETURN_MM(); @@ -3757,7 +3757,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSource) } else { ZVAL_BOOL(&_0, 0); } - ZEPHIR_CALL_METHOD(&compilation, this_ptr, "statementlist", NULL, 506, &intermediate, &_0); + ZEPHIR_CALL_METHOD(&compilation, this_ptr, "statementlist", NULL, 507, &intermediate, &_0); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, ZEND_STRL("extended"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&extended, &_1); @@ -3793,11 +3793,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSource) ZEPHIR_INIT_NVAR(&localBlock); array_init(&localBlock); } - ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 506, &localBlock); + ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 507, &localBlock); zephir_check_call_status(); } else { if (Z_TYPE_P(&block) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 506, &block); + ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 507, &block); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&blockCompilation, &block); @@ -3838,11 +3838,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSource) ZEPHIR_INIT_NVAR(&localBlock); array_init(&localBlock); } - ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 506, &localBlock); + ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 507, &localBlock); zephir_check_call_status(); } else { if (Z_TYPE_P(&block) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 506, &block); + ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 507, &block); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&blockCompilation, &block); @@ -4036,7 +4036,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) zephir_array_fetch_string(&_2$$5, &filter, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2368); ZEPHIR_INIT_VAR(&_3$$5); ZEPHIR_CONCAT_SVSV(&_3$$5, "Unknown filter type in ", &_1$$5, " on line ", &_2$$5); - ZEPHIR_CALL_METHOD(NULL, &_0$$5, "__construct", NULL, 505, &_3$$5); + ZEPHIR_CALL_METHOD(NULL, &_0$$5, "__construct", NULL, 506, &_3$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$5, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2368); ZEPHIR_MM_RESTORE(); @@ -4074,7 +4074,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) ZEPHIR_UNREF(&funcArguments); zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 504, &funcArguments); + ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 505, &funcArguments); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&arguments, &left); @@ -4089,7 +4089,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) zephir_array_fast_append(&_7$$9, &funcArguments); ZEPHIR_INIT_VAR(&_8$$9); ZVAL_STRING(&_8$$9, "compileFilter"); - ZEPHIR_CALL_METHOD(&code, this_ptr, "fireextensionevent", NULL, 508, &_8$$9, &_7$$9); + ZEPHIR_CALL_METHOD(&code, this_ptr, "fireextensionevent", NULL, 509, &_8$$9, &_7$$9); zephir_check_call_status(); if (Z_TYPE_P(&code) == IS_STRING) { RETURN_CCTOR(&code); @@ -4120,7 +4120,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) zephir_array_fetch_string(&_12$$11, &filter, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2462); ZEPHIR_INIT_VAR(&_13$$11); ZEPHIR_CONCAT_SVSVSV(&_13$$11, "Invalid definition for user filter '", &name, "' in ", &_11$$11, " on line ", &_12$$11); - ZEPHIR_CALL_METHOD(NULL, &_10$$11, "__construct", NULL, 505, &_13$$11); + ZEPHIR_CALL_METHOD(NULL, &_10$$11, "__construct", NULL, 506, &_13$$11); zephir_check_call_status(); zephir_throw_exception_debug(&_10$$11, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2462); ZEPHIR_MM_RESTORE(); @@ -4245,7 +4245,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) zephir_array_fetch_string(&_22, &filter, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2529); ZEPHIR_INIT_VAR(&_23); ZEPHIR_CONCAT_SVSVSV(&_23, "Unknown filter \"", &name, "\" in ", &_21, " on line ", &_22); - ZEPHIR_CALL_METHOD(NULL, &_20, "__construct", NULL, 505, &_23); + ZEPHIR_CALL_METHOD(NULL, &_20, "__construct", NULL, 506, &_23); zephir_check_call_status(); zephir_throw_exception_debug(&_20, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2529); ZEPHIR_MM_RESTORE(); @@ -4416,7 +4416,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) zephir_array_fetch_string(&_6$$7, &statement, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2577); ZEPHIR_INIT_NVAR(&_7$$7); ZEPHIR_CONCAT_SVSV(&_7$$7, "Invalid statement in ", &_5$$7, " on line ", &_6$$7); - ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", &_8, 505, &_7$$7, &statement); + ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", &_8, 506, &_7$$7, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_4$$7, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2579); ZEPHIR_MM_RESTORE(); @@ -4428,7 +4428,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) zephir_array_fast_append(&_9$$8, &statement); ZEPHIR_INIT_NVAR(&_10$$8); ZVAL_STRING(&_10$$8, "compileStatement"); - ZEPHIR_CALL_METHOD(&tempCompilation, this_ptr, "fireextensionevent", &_11, 508, &_10$$8, &_9$$8); + ZEPHIR_CALL_METHOD(&tempCompilation, this_ptr, "fireextensionevent", &_11, 509, &_10$$8, &_9$$8); zephir_check_call_status(); if (Z_TYPE_P(&tempCompilation) == IS_STRING) { zephir_concat_self(&compilation, &tempCompilation); @@ -4533,7 +4533,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) } else { ZVAL_BOOL(&_34$$24, 0); } - ZEPHIR_CALL_METHOD(&_33$$24, this_ptr, "statementlist", &_35, 506, &blockStatements, &_34$$24); + ZEPHIR_CALL_METHOD(&_33$$24, this_ptr, "statementlist", &_35, 507, &blockStatements, &_34$$24); zephir_check_call_status(); zephir_concat_self(&compilation, &_33$$24); } @@ -4643,7 +4643,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) zephir_array_fetch_string(&_58$$37, &statement, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2807); ZEPHIR_INIT_NVAR(&_59$$37); ZEPHIR_CONCAT_SVSVSV(&_59$$37, "Unknown statement ", &type, " in ", &_57$$37, " on line ", &_58$$37); - ZEPHIR_CALL_METHOD(NULL, &_56$$37, "__construct", &_8, 505, &_59$$37); + ZEPHIR_CALL_METHOD(NULL, &_56$$37, "__construct", &_8, 506, &_59$$37); zephir_check_call_status(); zephir_throw_exception_debug(&_56$$37, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2807); ZEPHIR_MM_RESTORE(); @@ -4673,7 +4673,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) zephir_array_fetch_string(&_62$$40, &statement, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2577); ZEPHIR_INIT_NVAR(&_63$$40); ZEPHIR_CONCAT_SVSV(&_63$$40, "Invalid statement in ", &_61$$40, " on line ", &_62$$40); - ZEPHIR_CALL_METHOD(NULL, &_60$$40, "__construct", &_8, 505, &_63$$40, &statement); + ZEPHIR_CALL_METHOD(NULL, &_60$$40, "__construct", &_8, 506, &_63$$40, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_60$$40, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2579); ZEPHIR_MM_RESTORE(); @@ -4685,7 +4685,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) zephir_array_fast_append(&_64$$41, &statement); ZEPHIR_INIT_NVAR(&_65$$41); ZVAL_STRING(&_65$$41, "compileStatement"); - ZEPHIR_CALL_METHOD(&tempCompilation, this_ptr, "fireextensionevent", &_11, 508, &_65$$41, &_64$$41); + ZEPHIR_CALL_METHOD(&tempCompilation, this_ptr, "fireextensionevent", &_11, 509, &_65$$41, &_64$$41); zephir_check_call_status(); if (Z_TYPE_P(&tempCompilation) == IS_STRING) { zephir_concat_self(&compilation, &tempCompilation); @@ -4790,7 +4790,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) } else { ZVAL_BOOL(&_81$$57, 0); } - ZEPHIR_CALL_METHOD(&_80$$57, this_ptr, "statementlist", &_35, 506, &blockStatements, &_81$$57); + ZEPHIR_CALL_METHOD(&_80$$57, this_ptr, "statementlist", &_35, 507, &blockStatements, &_81$$57); zephir_check_call_status(); zephir_concat_self(&compilation, &_80$$57); } @@ -4900,7 +4900,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) zephir_array_fetch_string(&_96$$70, &statement, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2807); ZEPHIR_INIT_NVAR(&_97$$70); ZEPHIR_CONCAT_SVSVSV(&_97$$70, "Unknown statement ", &type, " in ", &_95$$70, " on line ", &_96$$70); - ZEPHIR_CALL_METHOD(NULL, &_94$$70, "__construct", &_8, 505, &_97$$70); + ZEPHIR_CALL_METHOD(NULL, &_94$$70, "__construct", &_8, 506, &_97$$70); zephir_check_call_status(); zephir_throw_exception_debug(&_94$$70, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2807); ZEPHIR_MM_RESTORE(); @@ -4993,7 +4993,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementListOrExtends) ZEPHIR_INIT_NVAR(&statement); } if (isStatementList) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "statementlist", NULL, 506, statements); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "statementlist", NULL, 507, statements); zephir_check_call_status(); RETURN_MM(); } @@ -5043,7 +5043,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, isTagFactory) _0$$6 = Z_TYPE_P(&_1$$6) == IS_ARRAY; } if (_0$$6) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "istagfactory", NULL, 507, &left); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "istagfactory", NULL, 508, &left); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/mvc/view/simple.zep.c b/ext/phalcon/mvc/view/simple.zep.c index 477af5d9695..245d2ba7dbe 100644 --- a/ext/phalcon/mvc/view/simple.zep.c +++ b/ext/phalcon/mvc/view/simple.zep.c @@ -431,12 +431,12 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, partial) } else { ZEPHIR_CPY_WRT(&mergedParams, params); } - ZEPHIR_CALL_METHOD(NULL, this_ptr, "internalrender", NULL, 511, &partialPath, &mergedParams); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "internalrender", NULL, 0, &partialPath, &mergedParams); zephir_check_call_status(); if (Z_TYPE_P(params) == IS_ARRAY) { zephir_update_property_zval(this_ptr, ZEND_STRL("viewParams"), &viewParams); } - ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 490); + ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 491); zephir_check_call_status(); zephir_read_property(&_2, this_ptr, ZEND_STRL("content"), PH_NOISY_CC | PH_READONLY); zend_print_zval(&_2, 0); @@ -541,9 +541,9 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, render) ZEPHIR_CPY_WRT(&viewParams, &_1); ZEPHIR_INIT_VAR(&mergedParams); zephir_fast_array_merge(&mergedParams, &viewParams, ¶ms); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "internalrender", NULL, 511, &path, &mergedParams); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "internalrender", NULL, 0, &path, &mergedParams); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 490); + ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 491); zephir_check_call_status(); RETURN_MM_MEMBER(getThis(), "content"); } @@ -854,7 +854,7 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, loadTemplateEngines) if (ZEPHIR_IS_EMPTY(®isteredEngines)) { ZEPHIR_INIT_VAR(&_2$$4); object_init_ex(&_2$$4, phalcon_mvc_view_engine_php_ce); - ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 493, this_ptr, &di); + ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 494, this_ptr, &di); zephir_check_call_status(); zephir_array_update_string(&engines, SL(".phtml"), &_2$$4, PH_COPY | PH_SEPARATE); } else { diff --git a/ext/phalcon/paginator/adapter/nativearray.zep.c b/ext/phalcon/paginator/adapter/nativearray.zep.c index b9133bcc5f9..76c1d313e13 100644 --- a/ext/phalcon/paginator/adapter/nativearray.zep.c +++ b/ext/phalcon/paginator/adapter/nativearray.zep.c @@ -113,7 +113,7 @@ PHP_METHOD(Phalcon_Paginator_Adapter_NativeArray, paginate) } ZVAL_LONG(&_0, (show * ((pageNumber - 1)))); ZVAL_LONG(&_4, show); - ZEPHIR_CALL_FUNCTION(&_5, "array_slice", NULL, 502, &items, &_0, &_4); + ZEPHIR_CALL_FUNCTION(&_5, "array_slice", NULL, 503, &items, &_0, &_4); zephir_check_call_status(); ZEPHIR_CPY_WRT(&items, &_5); if (pageNumber < totalPages) { diff --git a/ext/phalcon/support/debug.zep.c b/ext/phalcon/support/debug.zep.c index e2ded4b6243..b2bd622f040 100644 --- a/ext/phalcon/support/debug.zep.c +++ b/ext/phalcon/support/debug.zep.c @@ -407,7 +407,7 @@ PHP_METHOD(Phalcon_Support_Debug, onUncaughtException) ZEPHIR_CALL_FUNCTION(&obLevel, "ob_get_level", NULL, 0); zephir_check_call_status(); if (ZEPHIR_GT_LONG(&obLevel, 0)) { - ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 490); + ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 491); zephir_check_call_status(); } zephir_read_static_property_ce(&_0, phalcon_support_debug_ce, SL("isActive"), PH_NOISY_CC | PH_READONLY); diff --git a/ext/phalcon/support/helper/arr/first.zep.c b/ext/phalcon/support/helper/arr/first.zep.c index 873b5108310..21bc2e5e7d8 100644 --- a/ext/phalcon/support/helper/arr/first.zep.c +++ b/ext/phalcon/support/helper/arr/first.zep.c @@ -77,7 +77,7 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_First, __invoke) ZEPHIR_CALL_METHOD(&filtered, this_ptr, "tofilter", NULL, 0, &collection, method); zephir_check_call_status(); ZEPHIR_MAKE_REF(&filtered); - ZEPHIR_RETURN_CALL_FUNCTION("reset", NULL, 478, &filtered); + ZEPHIR_RETURN_CALL_FUNCTION("reset", NULL, 479, &filtered); ZEPHIR_UNREF(&filtered); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/support/helper/arr/sliceleft.zep.c b/ext/phalcon/support/helper/arr/sliceleft.zep.c index 5f5fc99b78b..20715d10a30 100644 --- a/ext/phalcon/support/helper/arr/sliceleft.zep.c +++ b/ext/phalcon/support/helper/arr/sliceleft.zep.c @@ -75,7 +75,7 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_SliceLeft, __invoke) ZVAL_LONG(&_0, 0); ZVAL_LONG(&_1, elements); - ZEPHIR_RETURN_CALL_FUNCTION("array_slice", NULL, 502, &collection, &_0, &_1); + ZEPHIR_RETURN_CALL_FUNCTION("array_slice", NULL, 503, &collection, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/support/helper/arr/sliceright.zep.c b/ext/phalcon/support/helper/arr/sliceright.zep.c index 817a09a8b75..f0aeb8bcc0a 100644 --- a/ext/phalcon/support/helper/arr/sliceright.zep.c +++ b/ext/phalcon/support/helper/arr/sliceright.zep.c @@ -73,7 +73,7 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_SliceRight, __invoke) ZVAL_LONG(&_0, elements); - ZEPHIR_RETURN_CALL_FUNCTION("array_slice", NULL, 502, &collection, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("array_slice", NULL, 503, &collection, &_0); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/support/helper/str/concat.zep.c b/ext/phalcon/support/helper/str/concat.zep.c index e41f42810ed..ae07e1e4147 100644 --- a/ext/phalcon/support/helper/str/concat.zep.c +++ b/ext/phalcon/support/helper/str/concat.zep.c @@ -81,15 +81,15 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Concat, __invoke) return; } ZEPHIR_MAKE_REF(&arguments); - ZEPHIR_CALL_FUNCTION(&delimiter, "reset", NULL, 478, &arguments); + ZEPHIR_CALL_FUNCTION(&delimiter, "reset", NULL, 479, &arguments); ZEPHIR_UNREF(&arguments); zephir_check_call_status(); ZVAL_LONG(&_0, 1); - ZEPHIR_CALL_FUNCTION(&_1, "array_slice", NULL, 502, &arguments, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "array_slice", NULL, 503, &arguments, &_0); zephir_check_call_status(); ZEPHIR_CPY_WRT(&arguments, &_1); ZEPHIR_MAKE_REF(&arguments); - ZEPHIR_CALL_FUNCTION(&first, "reset", NULL, 478, &arguments); + ZEPHIR_CALL_FUNCTION(&first, "reset", NULL, 479, &arguments); ZEPHIR_UNREF(&arguments); zephir_check_call_status(); ZEPHIR_MAKE_REF(&arguments); diff --git a/ext/phalcon/support/version.zep.c b/ext/phalcon/support/version.zep.c index 9130f154632..b5d2950e5b0 100644 --- a/ext/phalcon/support/version.zep.c +++ b/ext/phalcon/support/version.zep.c @@ -117,7 +117,7 @@ PHP_METHOD(Phalcon_Support_Version, getVersion) ZVAL_LONG(&_0, 3); zephir_array_fast_append(return_value, &_0); ZEPHIR_INIT_NVAR(&_0); - ZVAL_LONG(&_0, 0); + ZVAL_LONG(&_0, 1); zephir_array_fast_append(return_value, &_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 4); diff --git a/ext/phalcon/tag.zep.c b/ext/phalcon/tag.zep.c index 5adbe3808e1..1c7ad8ad758 100644 --- a/ext/phalcon/tag.zep.c +++ b/ext/phalcon/tag.zep.c @@ -1852,7 +1852,7 @@ PHP_METHOD(Phalcon_Tag, preload) zephir_fast_str_replace(&_5$$5, &_6$$5, &_7$$5, &href); ZEPHIR_INIT_VAR(&_8$$5); ZVAL_STRING(&_8$$5, "preload"); - ZEPHIR_CALL_METHOD(NULL, &link, "__construct", NULL, 500, &_8$$5, &_5$$5, &attributes); + ZEPHIR_CALL_METHOD(NULL, &link, "__construct", NULL, 501, &_8$$5, &_5$$5, &attributes); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_8$$5); object_init_ex(&_8$$5, phalcon_html_link_serializer_header_ce); @@ -1864,7 +1864,7 @@ PHP_METHOD(Phalcon_Tag, preload) ZEPHIR_INIT_VAR(&_10$$5); zephir_create_array(&_10$$5, 1, 0); zephir_array_fast_append(&_10$$5, &link); - ZEPHIR_CALL_METHOD(&_9$$5, &_8$$5, "serialize", NULL, 501, &_10$$5); + ZEPHIR_CALL_METHOD(&_9$$5, &_8$$5, "serialize", NULL, 502, &_10$$5); zephir_check_call_status(); ZEPHIR_INIT_VAR(&header); ZEPHIR_CONCAT_SV(&header, "Link: ", &_9$$5); diff --git a/ext/php_phalcon.h b/ext/php_phalcon.h index 1303ea7fa80..dac2812e9d1 100644 --- a/ext/php_phalcon.h +++ b/ext/php_phalcon.h @@ -11,7 +11,7 @@ #include "kernel/globals.h" #define PHP_PHALCON_NAME "phalcon" -#define PHP_PHALCON_VERSION "5.3.0" +#define PHP_PHALCON_VERSION "5.3.1" #define PHP_PHALCON_EXTNAME "phalcon" #define PHP_PHALCON_AUTHOR "Phalcon Team and contributors" #define PHP_PHALCON_ZEPVERSION "0.17.0-9f99da6" diff --git a/package.xml b/package.xml index 318bf02ba63..76032c0e340 100644 --- a/package.xml +++ b/package.xml @@ -22,11 +22,11 @@ nikos@phalcon.io yes - 2023-08-15 + 2023-09-12 - 5.3.0 - 5.3.0 + 5.3.1 + 5.3.1 stable @@ -36,25 +36,10 @@ Full changelog can be found at: https://github.com/phalcon/cphalcon/blob/master/CHANGELOG-5.0.md - ### Added - - - Added `Phalcon\Mvc\Model::appendMessagedFrom` for code consistency and to add messages from another model [#16391](https://github.com/phalcon/cphalcon/issues/16391) - - Added `Phalcon\Autoload\Loader::isRegistered` for debugging purposes [#16391](https://github.com/phalcon/cphalcon/issues/16391) - - Added `Phalcon\Mvc\Model\Metadata::initializeMetadata` [#16393] (https://github.com/phalcon/cphalcon/issues/16393) - - Added `Phalcon\Mvc\Model\Metadata::getMetaDataUniqueKey` [#16393] (https://github.com/phalcon/cphalcon/issues/16393) - - Added `Phalcon\Mvc\Model\Metadata::getColumnMapUniqueKey` [#16393] (https://github.com/phalcon/cphalcon/issues/16393) - - Added `Phalcon\Encryption\Security\JWT\Builder::addHeader()` to allow adding custom headers [#16396](https://github.com/phalcon/cphalcon/issues/16396) - - ### Changed - - - Refactored `Phalcon\Mvc\Model::doLowUpdate` and `Phalcon\Mvc\Model::postSaveRelatedRecords` for better code logic and a clearer separation of behaviour, although it lead to partially repeated code. [#16391](https://github.com/phalcon/cphalcon/issues/16391) - - Cleaned `Phalcon\Mvc\Model\Metadata::initialize` [#16393] (https://github.com/phalcon/cphalcon/issues/16393) - ### Fixed - - - Parse multipart/form-data from PUT request [#16271](https://github.com/phalcon/cphalcon/issues/16271) - - Set Dynamic Update by default system-wide [#16343](https://github.com/phalcon/cphalcon/issues/16343) - - Fixed memory leak in Micro application [#16404](https://github.com/phalcon/cphalcon/pull/16404) + - Fixed infinite save loop in `Phalcon\Mvc\Model::save()` [#16395](https://github.com/phalcon/cphalcon/issues/16395) + - Fixed undefined column with columnMap and model caching [#16420](https://github.com/phalcon/cphalcon/issues/16420) + - Fixed memory leak in `Phalcon\Mvc\Router::handle()` [#16431](https://github.com/phalcon/cphalcon/pull/16431) diff --git a/phalcon/Di/Di.zep b/phalcon/Di/Di.zep index 649aff7a865..24eb64f1904 100644 --- a/phalcon/Di/Di.zep +++ b/phalcon/Di/Di.zep @@ -168,7 +168,7 @@ class Di implements DiInterface */ public function get(string! name, parameters = null) -> var { - var service, eventsManager, isShared, instance = null; + var service, isShared, instance = null; /** * If the service is shared and it already has a cached instance then @@ -182,14 +182,12 @@ class Di implements DiInterface } } - let eventsManager = this->eventsManager; - /** * Allows for custom creation of instances through the * "di:beforeServiceResolve" event. */ - if typeof eventsManager == "object" { - let instance = eventsManager->fire( + if this->eventsManager !== null { + let instance = this->eventsManager->fire( "di:beforeServiceResolve", this, [ @@ -199,7 +197,7 @@ class Di implements DiInterface ); } - if typeof instance != "object" { + if instance === null { if service !== null { // The service is registered in the DI. try { @@ -237,7 +235,7 @@ class Di implements DiInterface * Pass the DI to the instance if it implements * \Phalcon\Di\InjectionAwareInterface */ - if typeof instance == "object" { + if typeof instance === "object" { if instance instanceof InjectionAwareInterface { instance->setDI(this); } @@ -251,8 +249,8 @@ class Di implements DiInterface * Allows for post creation instance configuration through the * "di:afterServiceResolve" event. */ - if typeof eventsManager == "object" { - eventsManager->fire( + if this->eventsManager !== null { + this->eventsManager->fire( "di:afterServiceResolve", this, [ diff --git a/phalcon/Di/Service.zep b/phalcon/Di/Service.zep index 71610f64b6c..d55b27bd307 100644 --- a/phalcon/Di/Service.zep +++ b/phalcon/Di/Service.zep @@ -72,11 +72,9 @@ class Service implements ServiceInterface */ public function getParameter(int position) { - var definition, arguments, parameter; + var arguments, parameter; - let definition = this->definition; - - if unlikely typeof definition !== "array" { + if unlikely typeof this->definition !== "array" { throw new Exception( "Definition must be an array to obtain its parameters" ); @@ -85,7 +83,7 @@ class Service implements ServiceInterface /** * Update the parameter */ - if fetch arguments, definition["arguments"] { + if fetch arguments, this->definition["arguments"] { if fetch parameter, arguments[position] { return parameter; } @@ -118,18 +116,13 @@ class Service implements ServiceInterface public function resolve(parameters = null, container = null) -> var { bool found; - var shared, definition, sharedInstance, instance, builder; - - let shared = this->shared; + var definition, instance, builder; /** * Check if the service is shared */ - if shared { - let sharedInstance = this->sharedInstance; - if sharedInstance !== null { - return sharedInstance; - } + if this->shared && this->sharedInstance !== null { + return this->sharedInstance; } let found = true, @@ -163,7 +156,7 @@ class Service implements ServiceInterface /** * Bounds the closure to the current DI */ - if typeof container == "object" { + if container !== null { let definition = Closure::bind(definition, container); } @@ -182,7 +175,7 @@ class Service implements ServiceInterface /** * Array definitions require a 'className' parameter */ - if typeof definition == "array" { + if typeof definition === "array" { let builder = new Builder(), instance = builder->build( container, @@ -205,7 +198,7 @@ class Service implements ServiceInterface /** * Update the shared instance if the service is shared */ - if shared { + if this->shared { let this->sharedInstance = instance; } @@ -227,11 +220,9 @@ class Service implements ServiceInterface */ public function setParameter(int position, array! parameter) -> { - var definition, arguments; - - let definition = this->definition; + var arguments; - if unlikely typeof definition !== "array" { + if unlikely typeof this->definition !== "array" { throw new Exception( "Definition must be an array to update its parameters" ); @@ -240,7 +231,7 @@ class Service implements ServiceInterface /** * Update the parameter */ - if fetch arguments, definition["arguments"] { + if fetch arguments, this->definition["arguments"] { let arguments[position] = parameter; } else { let arguments = [position: parameter]; @@ -249,12 +240,7 @@ class Service implements ServiceInterface /** * Re-update the arguments */ - let definition["arguments"] = arguments; - - /** - * Re-update the definition - */ - let this->definition = definition; + let this->definition["arguments"] = arguments; return this; } diff --git a/phalcon/Mvc/Model.zep b/phalcon/Mvc/Model.zep index fa7096ebbad..e5f5bf9b9ac 100644 --- a/phalcon/Mvc/Model.zep +++ b/phalcon/Mvc/Model.zep @@ -41,6 +41,8 @@ use Phalcon\Mvc\Model\TransactionInterface; use Phalcon\Mvc\Model\ValidationFailed; use Phalcon\Mvc\ModelInterface; use Phalcon\Filter\Validation\ValidationInterface; +use Phalcon\Support\Collection; +use Phalcon\Support\Collection\CollectionInterface; use Serializable; /** @@ -2579,12 +2581,35 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, * $robot->save(); *``` */ + public function save() -> bool + { + var visited; + let visited = new Collection(); + return this->doSave(visited); + } + + /** + * Inserted or updates model instance, expects a visited list of objects. + * + * @param CollectionInterface $visited + * + * @return bool + */ + public function doSave( visited) -> bool { var metaData, schema, writeConnection, readConnection, source, table, - identityField, exists, success, relatedToSave; + identityField, exists, success, relatedToSave, objId; bool hasRelatedToSave; + let objId = spl_object_id(this); + + if true === visited->has(objId) { + return true; + } + + visited->set(objId, this); + let metaData = this->getModelsMetaData(); /** @@ -2610,7 +2635,7 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, let hasRelatedToSave = count(relatedToSave) > 0; if hasRelatedToSave { - if this->preSaveRelatedRecords(writeConnection, relatedToSave) === false { + if this->preSaveRelatedRecords(writeConnection, relatedToSave, visited) === false { return false; } } @@ -2695,7 +2720,7 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, /** * Change the dirty state to persistent */ - if success { + if true === success { let this->dirtyState = self::DIRTY_STATE_PERSISTENT; } @@ -2711,7 +2736,8 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, */ let success = this->postSaveRelatedRecords( writeConnection, - relatedToSave + relatedToSave, + visited ); } } @@ -4964,9 +4990,11 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, * Saves related records that must be stored prior to save the master record * * @param ModelInterface[] related + * @param CollectionInterface visited * @return bool */ - protected function preSaveRelatedRecords( connection, related) -> bool + + protected function preSaveRelatedRecords( connection, related, visited) -> bool { var className, manager, type, relation, columns, referencedFields, nesting, name, record; @@ -5006,7 +5034,6 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, "Only objects can be stored as part of belongs-to relations in '" . get_class(this) . "' Relation " . name ); } - let columns = relation->getFields(), referencedFields = relation->getReferencedFields(); // let columns = relation->getFields(), @@ -5023,7 +5050,7 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, * If dynamic update is enabled, saving the record must not take any action * Only save if the model is dirty to prevent circular relations causing an infinite loop */ - if record->dirtyState !== Model::DIRTY_STATE_PERSISTENT && !record->save() { + if record->dirtyState !== Model::DIRTY_STATE_PERSISTENT && !record->doSave(visited) { /** * Get the validation messages generated by the * referenced model @@ -5072,9 +5099,10 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, * Save the related records assigned in the has-one/has-many relations * * @param ModelInterface[] related + * @param CollectionInterface visited * @return bool */ - protected function postSaveRelatedRecords( connection, related) -> bool + protected function postSaveRelatedRecords( connection, related, visited) -> bool { var nesting, className, manager, relation, name, record, columns, referencedModel, referencedFields, relatedRecords, value, @@ -5157,7 +5185,7 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, /** * Save the record and get messages */ - if !recordAfter->save() { + if !recordAfter->doSave(visited) { /** * Get the validation messages generated by the * referenced model @@ -5221,7 +5249,7 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, /** * Save the record and get messages */ - if !intermediateModel->save() { + if !intermediateModel->doSave(visited) { /** * Get the validation messages generated by the referenced model */ @@ -5244,7 +5272,7 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, /** * Save the record and get messages */ - if !recordAfter->save() { + if !recordAfter->doSave(visited) { /** * Get the validation messages generated by the * referenced model diff --git a/phalcon/Mvc/Model/MetaData.zep b/phalcon/Mvc/Model/MetaData.zep index b8fc27009b8..554c48b8774 100644 --- a/phalcon/Mvc/Model/MetaData.zep +++ b/phalcon/Mvc/Model/MetaData.zep @@ -832,7 +832,7 @@ abstract class MetaData implements InjectionAwareInterface, MetaDataInterface } if true === isset(this->columnMap[key]) { - return false; + return true; } /** @@ -845,7 +845,7 @@ abstract class MetaData implements InjectionAwareInterface, MetaDataInterface if data !== null { let this->columnMap[key] = data; - return false; + return true; } /** diff --git a/phalcon/Mvc/Router.zep b/phalcon/Mvc/Router.zep index a17d14d5efb..23b189d57d8 100644 --- a/phalcon/Mvc/Router.zep +++ b/phalcon/Mvc/Router.zep @@ -701,8 +701,7 @@ class Router extends AbstractInjectionAware implements RouterInterface, EventsAw let handledUri = "/"; } - let request = null, - currentHostName = null, + let currentHostName = null, routeFound = false, parts = [], params = [], @@ -711,11 +710,22 @@ class Router extends AbstractInjectionAware implements RouterInterface, EventsAw this->matchedRoute = null; let eventsManager = this->eventsManager; - if eventsManager !== null { eventsManager->fire("router:beforeCheckRoutes", this); } + /** + * Retrieve the request service from the container + */ + let container = this->container; + if container === null { + throw new Exception( + "A dependency injection container is required to access the 'request' service" + ); + } + + let request = container->get("request"); + /** * Routes are traversed in reversed order */ @@ -728,20 +738,6 @@ class Router extends AbstractInjectionAware implements RouterInterface, EventsAw */ let methods = route->getHttpMethods(); if methods !== null { - /** - * Retrieve the request service from the container - */ - if request === null { - let container = this->container; - if container === null { - throw new Exception( - "A dependency injection container is required to access the 'request' service" - ); - } - - let request = container->getShared("request"); - } - /** * Check if the current method is allowed by the route */ @@ -755,20 +751,6 @@ class Router extends AbstractInjectionAware implements RouterInterface, EventsAw */ let hostname = route->getHostName(); if hostname !== null { - /** - * Retrieve the request service from the container - */ - if request === null { - let container = this->container; - if container === null { - throw new Exception( - "A dependency injection container is required to access the 'request' service" - ); - } - - let request = container->getShared("request"); - } - /** * Check if the current hostname is the same as the route */ diff --git a/phalcon/Mvc/Router/Route.zep b/phalcon/Mvc/Router/Route.zep index c6c84699d36..8168fbeaf1f 100644 --- a/phalcon/Mvc/Router/Route.zep +++ b/phalcon/Mvc/Router/Route.zep @@ -43,9 +43,9 @@ class Route implements RouteInterface protected hostname = null; /** - * @var string|null + * @var string */ - protected id = null; + protected id = ""; /** * @var array|string @@ -94,8 +94,8 @@ class Route implements RouteInterface let uniqueId = self::uniqueId; // TODO: Add a function that increase static members - let routeId = uniqueId, - this->id = routeId, + let routeId = uniqueId, + this->id = (string) routeId, self::uniqueId = uniqueId + 1; } @@ -383,9 +383,9 @@ class Route implements RouteInterface } /** - * @return string | null + * @return string */ - public function getId() -> string | null + public function getId() -> string { return this->id; } diff --git a/phalcon/Support/Version.zep b/phalcon/Support/Version.zep index fb1d4e71b61..baed6ae8210 100644 --- a/phalcon/Support/Version.zep +++ b/phalcon/Support/Version.zep @@ -77,7 +77,7 @@ class Version */ protected function getVersion() -> array { - return [5, 3, 0, 4, 0]; + return [5, 3, 1, 4, 0]; } /** diff --git a/tests/_data/fixtures/Traits/DiTrait.php b/tests/_data/fixtures/Traits/DiTrait.php index 6d4aa2c8f9e..2cb2cf95623 100644 --- a/tests/_data/fixtures/Traits/DiTrait.php +++ b/tests/_data/fixtures/Traits/DiTrait.php @@ -35,9 +35,11 @@ use Phalcon\Http\Request; use Phalcon\Http\Response; use Phalcon\Mvc\Model\Manager as ModelsManager; +use Phalcon\Mvc\Model\Metadata\Apcu as MetadataApcu; use Phalcon\Mvc\Model\Metadata\Memory as MetadataMemory; use Phalcon\Mvc\Model\Metadata\Libmemcached as MetadataMemcached; use Phalcon\Mvc\Model\Metadata\Redis as MetadataRedis; +use Phalcon\Mvc\Model\Metadata\Stream as MetadataStream; use Phalcon\Mvc\View; use Phalcon\Mvc\View\Simple; use Phalcon\Session\Adapter\Libmemcached as SessionLibmemcached; @@ -57,6 +59,7 @@ use function getOptionsRedis; use function getOptionsSessionStream; use function getOptionsSqlite; +use function outputDir; /** * Trait DiTrait @@ -174,6 +177,11 @@ protected function newService(string $service, $options = null) return (new Filter\FilterFactory())->newInstance(); case 'metadataMemory': return new MetadataMemory(); + case 'metadataApcu': + return new MetadataApcu( + new AdapterFactory(new SerializerFactory()), + [] + ); case 'metadataLibmemcached': return new MetadataMemcached( new AdapterFactory(new SerializerFactory()), @@ -184,6 +192,11 @@ protected function newService(string $service, $options = null) new AdapterFactory(new SerializerFactory()), getOptionsRedis() ); + case 'metadataStream': + return new MetadataStream( + new AdapterFactory(new SerializerFactory()), + ['options' => ['storageDir' => outputDir()] ], + ); case 'modelsCacheLibmemcached': return new StorageLibmemcached( new SerializerFactory(), diff --git a/tests/_support/Page/Http.php b/tests/_support/Page/Http.php new file mode 100644 index 00000000000..7735ae09a56 --- /dev/null +++ b/tests/_support/Page/Http.php @@ -0,0 +1,93 @@ +Money Doesn\'t Grow On Trees'; + public const TEST_DOMAIN = 'phalcon.io'; + public const TEST_IP_IPV6 = '2a00:8640:1::224:36ff:feef:1d89'; + public const TEST_IP_ONE = '10.4.6.1'; + public const TEST_IP_TWO = '10.4.6.2'; + public const TEST_IP_THREE = '10.4.6.3'; + public const TEST_IP_MULTI = '10.4.6.4,10.4.6.5'; + public const TEST_URI = 'https://phalcon.io'; + public const TEST_USER_AGENT = 'Chrome/Other 1.0.0'; +} diff --git a/tests/database/Mvc/Model/MetaData/GetAttributesCest.php b/tests/database/Mvc/Model/MetaData/GetAttributesCest.php index 3cab1d38bef..4095f2a8b12 100644 --- a/tests/database/Mvc/Model/MetaData/GetAttributesCest.php +++ b/tests/database/Mvc/Model/MetaData/GetAttributesCest.php @@ -13,6 +13,7 @@ namespace Phalcon\Tests\Database\Mvc\Model\MetaData; +use Codeception\Example; use DatabaseTester; use Phalcon\Mvc\Model\MetaData; use Phalcon\Tests\Fixtures\Traits\DiTrait; @@ -34,6 +35,11 @@ public function _before(DatabaseTester $I) /** * Tests Phalcon\Mvc\Model\MetaData :: getAttributes() * + * @dataProvider getExamples + * + * @param DatabaseTester $I + * @param Example $example + * * @author Phalcon Team * @since 2020-02-01 * @@ -41,10 +47,22 @@ public function _before(DatabaseTester $I) * @group pgsql * @group sqlite */ - public function mvcModelMetadataGetAttributes(DatabaseTester $I) - { + public function mvcModelMetadataGetAttributes( + DatabaseTester $I, + Example $example + ) { $I->wantToTest('Mvc\Model\MetaData - getAttributes()'); + $service = $example['service']; + + $adapter = $this->newService($service); + $connection = $I->getConnection(); + $adapter->setDi($this->container); + + $adapter->reset(); + + $this->container->setShared('modelsMetadata', $adapter); + /** @var MetaData $metadata */ $metadata = $this->container->get('modelsMetadata'); @@ -59,5 +77,39 @@ public function mvcModelMetadataGetAttributes(DatabaseTester $I) ]; $actual = $metadata->getAttributes($model); $I->assertEquals($expected, $actual); + + $adapter = $this->newService($service); + $this->container->setShared('modelsMetadata', $adapter); + $adapter->setDi($this->container); + + $I->assertNotEquals($adapter, $metadata); + + $actual = $adapter->getAttributes($model); + $I->assertEquals($expected, $actual); + } + + /** + * @return array[] + */ + private function getExamples(): array + { + return [ + [ + 'service' => 'metadataMemory', + 'className' => 'Memory', + ], + [ + 'service' => 'metadataApcu', + 'className' => 'Apcu', + ], + [ + 'service' => 'metadataRedis', + 'className' => 'Redis', + ], + [ + 'service' => 'metadataLibmemcached', + 'className' => 'Libmemcached', + ], + ]; } } diff --git a/tests/database/Mvc/Model/MetaData/GetColumnMapCest.php b/tests/database/Mvc/Model/MetaData/GetColumnMapCest.php index 06edf3bff42..3ca01b19f82 100644 --- a/tests/database/Mvc/Model/MetaData/GetColumnMapCest.php +++ b/tests/database/Mvc/Model/MetaData/GetColumnMapCest.php @@ -13,6 +13,7 @@ namespace Phalcon\Tests\Database\Mvc\Model\MetaData; +use Codeception\Example; use DatabaseTester; use Phalcon\Mvc\Model\MetaData; use Phalcon\Storage\Exception; @@ -47,7 +48,10 @@ public function _before(DatabaseTester $I): void /** * Tests Phalcon\Mvc\Model\MetaData :: getColumnMap() * - * @param DatabaseTester $I + * @dataProvider getExamples + * + * @param DatabaseTester $I + * @param Example $example * * @author Phalcon Team * @since 2020-02-01 @@ -56,10 +60,22 @@ public function _before(DatabaseTester $I): void * @group pgsql * @group sqlite */ - public function mvcModelMetadataGetColumnMap(DatabaseTester $I) - { + public function mvcModelMetadataGetColumnMap( + DatabaseTester $I, + Example $example + ) { $I->wantToTest('Mvc\Model\MetaData - getColumnMap()'); + $service = $example['service']; + + $adapter = $this->newService($service); + $adapter->setDi($this->container); + $connection = $I->getConnection(); + + $adapter->reset(); + + $this->container->setShared('modelsMetadata', $adapter); + /** @var MetaData $metadata */ $metadata = $this->container->get('modelsMetadata'); $model = new Invoices(); @@ -77,5 +93,45 @@ public function mvcModelMetadataGetColumnMap(DatabaseTester $I) ]; $I->assertEquals($expected, $metadata->getColumnMap($model)); + + $I->assertTrue($adapter->isEmpty()); + + /** + * Double check it can get from cache systems and not memory + */ + $adapter = $this->newService($service); + $this->container->setShared('modelsMetadata', $adapter); + $adapter->setDi($this->container); + + $I->assertNotEquals($adapter, $metadata); + + $I->assertTrue($adapter->isEmpty()); + + $I->assertEquals($expected, $adapter->getColumnMap($model)); + } + + /** + * @return array[] + */ + private function getExamples(): array + { + return [ + [ + 'service' => 'metadataMemory', + 'className' => 'Memory', + ], + [ + 'service' => 'metadataApcu', + 'className' => 'Apcu', + ], + [ + 'service' => 'metadataRedis', + 'className' => 'Redis', + ], + [ + 'service' => 'metadataLibmemcached', + 'className' => 'Libmemcached', + ], + ]; } } diff --git a/tests/database/Mvc/Model/MetaData/GetDataTypesCest.php b/tests/database/Mvc/Model/MetaData/GetDataTypesCest.php index 2319a5452a8..bfb3034b357 100644 --- a/tests/database/Mvc/Model/MetaData/GetDataTypesCest.php +++ b/tests/database/Mvc/Model/MetaData/GetDataTypesCest.php @@ -13,6 +13,7 @@ namespace Phalcon\Tests\Database\Mvc\Model\MetaData; +use Codeception\Example; use DatabaseTester; use Phalcon\Mvc\Model\MetaData; use Phalcon\Tests\Fixtures\Traits\DiTrait; @@ -34,6 +35,11 @@ public function _before(DatabaseTester $I) /** * Tests Phalcon\Mvc\Model\MetaData :: getDataTypes() * + * @dataProvider getExamples + * + * @param DatabaseTester $I + * @param Example $example + * * @author Phalcon Team * @since 2020-02-01 * @@ -41,10 +47,23 @@ public function _before(DatabaseTester $I) * @group pgsql * @group sqlite */ - public function mvcModelMetadataGetDataTypes(DatabaseTester $I) - { + public function mvcModelMetadataGetDataTypes( + DatabaseTester $I, + Example $example + ) { $I->wantToTest('Mvc\Model\MetaData - getDataTypes()'); + $service = $example['service']; + + $adapter = $this->newService($service); + $adapter->setDi($this->container); + $connection = $I->getConnection(); + + $adapter->reset(); + $I->assertTrue($adapter->isEmpty()); + + $this->container->setShared('modelsMetadata', $adapter); + /** @var MetaData $metadata */ $metadata = $this->container->get('modelsMetadata'); @@ -52,6 +71,22 @@ public function mvcModelMetadataGetDataTypes(DatabaseTester $I) $expected = $this->getTypes($I); $actual = $metadata->getDataTypes($model); $I->assertEquals($expected, $actual); + + $I->assertFalse($adapter->isEmpty()); + + /** + * Double check it can get from cache systems and not memory + */ + $adapter = $this->newService($service); + $this->container->setShared('modelsMetadata', $adapter); + $adapter->setDi($this->container); + + $I->assertNotEquals($adapter, $metadata); + + $I->assertTrue($adapter->isEmpty()); + + $actual = $adapter->getDataTypes($model); + $I->assertEquals($expected, $actual); } private function getTypes(DatabaseTester $I) @@ -87,4 +122,29 @@ private function getTypes(DatabaseTester $I) ]; } } + + /** + * @return array[] + */ + private function getExamples(): array + { + return [ + [ + 'service' => 'metadataMemory', + 'className' => 'Memory', + ], + [ + 'service' => 'metadataApcu', + 'className' => 'Apcu', + ], + [ + 'service' => 'metadataRedis', + 'className' => 'Redis', + ], + [ + 'service' => 'metadataLibmemcached', + 'className' => 'Libmemcached', + ], + ]; + } } diff --git a/tests/database/Mvc/Model/MetaData/GetIdentityFieldCest.php b/tests/database/Mvc/Model/MetaData/GetIdentityFieldCest.php index b6a2fc00c53..67691e20614 100644 --- a/tests/database/Mvc/Model/MetaData/GetIdentityFieldCest.php +++ b/tests/database/Mvc/Model/MetaData/GetIdentityFieldCest.php @@ -13,6 +13,7 @@ namespace Phalcon\Tests\Database\Mvc\Model\MetaData; +use Codeception\Example; use DatabaseTester; use Phalcon\Mvc\Model\MetaData; use Phalcon\Tests\Fixtures\Traits\DiTrait; @@ -34,6 +35,11 @@ public function _before(DatabaseTester $I) /** * Tests Phalcon\Mvc\Model\MetaData :: getIdentityField() * + * @dataProvider getExamples + * + * @param DatabaseTester $I + * @param Example $example + * * @author Phalcon Team * @since 2020-02-01 * @@ -41,10 +47,23 @@ public function _before(DatabaseTester $I) * @group pgsql * @group sqlite */ - public function mvcModelMetadataGetIdentityField(DatabaseTester $I) - { + public function mvcModelMetadataGetIdentityField( + DatabaseTester $I, + Example $example + ) { $I->wantToTest('Mvc\Model\MetaData - getIdentityField()'); + $service = $example['service']; + + $adapter = $this->newService($service); + $adapter->setDi($this->container); + $connection = $I->getConnection(); + + $adapter->reset(); + $I->assertTrue($adapter->isEmpty()); + + $this->container->setShared('modelsMetadata', $adapter); + /** @var MetaData $metadata */ $metadata = $this->container->get('modelsMetadata'); @@ -52,5 +71,48 @@ public function mvcModelMetadataGetIdentityField(DatabaseTester $I) $expected = 'inv_id'; $actual = $metadata->getIdentityField($model); $I->assertEquals($expected, $actual); + + $I->assertFalse($adapter->isEmpty()); + + /** + * Double check it can get from cache systems and not memory + */ + $adapter = $this->newService($service); + $this->container->setShared('modelsMetadata', $adapter); + $adapter->setDi($this->container); + + $I->assertNotEquals($adapter, $metadata); + + $I->assertTrue($adapter->isEmpty()); + + $model = new Invoices(); + $expected = 'inv_id'; + $actual = $adapter->getIdentityField($model); + $I->assertEquals($expected, $actual); + } + + /** + * @return array[] + */ + private function getExamples(): array + { + return [ + [ + 'service' => 'metadataMemory', + 'className' => 'Memory', + ], + [ + 'service' => 'metadataApcu', + 'className' => 'Apcu', + ], + [ + 'service' => 'metadataRedis', + 'className' => 'Redis', + ], + [ + 'service' => 'metadataLibmemcached', + 'className' => 'Libmemcached', + ], + ]; } } diff --git a/tests/database/Mvc/Model/MetaData/GetNonPrimaryKeyAttributesCest.php b/tests/database/Mvc/Model/MetaData/GetNonPrimaryKeyAttributesCest.php index 41dc846e050..c501c829631 100644 --- a/tests/database/Mvc/Model/MetaData/GetNonPrimaryKeyAttributesCest.php +++ b/tests/database/Mvc/Model/MetaData/GetNonPrimaryKeyAttributesCest.php @@ -13,6 +13,7 @@ namespace Phalcon\Tests\Database\Mvc\Model\MetaData; +use Codeception\Example; use DatabaseTester; use Phalcon\Mvc\Model\MetaData; use Phalcon\Tests\Fixtures\Traits\DiTrait; @@ -34,6 +35,11 @@ public function _before(DatabaseTester $I) /** * Tests Phalcon\Mvc\Model\MetaData :: getNonPrimaryKeyAttributes() * + * @dataProvider getExamples + * + * @param DatabaseTester $I + * @param Example $example + * * @author Phalcon Team * @since 2020-02-01 * @@ -41,10 +47,23 @@ public function _before(DatabaseTester $I) * @group pgsql * @group sqlite */ - public function mvcModelMetadataGetNonPrimaryKeyAttributes(DatabaseTester $I) - { + public function mvcModelMetadataGetNonPrimaryKeyAttributes( + DatabaseTester $I, + Example $example + ) { $I->wantToTest('Mvc\Model\MetaData - getNonPrimaryKeyAttributes()'); + + $service = $example['service']; + + $adapter = $this->newService($service); + $adapter->setDi($this->container); + $connection = $I->getConnection(); + + $adapter->reset(); + + $this->container->setShared('modelsMetadata', $adapter); + /** @var MetaData $metadata */ $metadata = $this->container->get('modelsMetadata'); @@ -56,8 +75,48 @@ public function mvcModelMetadataGetNonPrimaryKeyAttributes(DatabaseTester $I) 'inv_total', 'inv_created_at', ]; - $actual = $metadata->getNonPrimaryKeyAttributes($model); + $actual = $metadata->getNonPrimaryKeyAttributes($model); $I->assertEquals($expected, $actual); + + $I->assertFalse($adapter->isEmpty()); + + /** + * Double check it can get from cache systems and not memory + */ + $adapter = $this->newService($service); + $this->container->setShared('modelsMetadata', $adapter); + $adapter->setDi($this->container); + + $I->assertNotEquals($adapter, $metadata); + + $I->assertTrue($adapter->isEmpty()); + $actual = $adapter->getNonPrimaryKeyAttributes($model); + $I->assertEquals($expected, $actual); + } + + /** + * @return array[] + */ + private function getExamples(): array + { + return [ + [ + 'service' => 'metadataMemory', + 'className' => 'Memory', + ], + [ + 'service' => 'metadataApcu', + 'className' => 'Apcu', + ], + [ + 'service' => 'metadataRedis', + 'className' => 'Redis', + ], + [ + 'service' => 'metadataLibmemcached', + 'className' => 'Libmemcached', + ], + ]; } } diff --git a/tests/database/Mvc/Model/MetaData/GetNotNullAttributesCest.php b/tests/database/Mvc/Model/MetaData/GetNotNullAttributesCest.php index f7a682fc5b1..25275b458f9 100644 --- a/tests/database/Mvc/Model/MetaData/GetNotNullAttributesCest.php +++ b/tests/database/Mvc/Model/MetaData/GetNotNullAttributesCest.php @@ -13,6 +13,7 @@ namespace Phalcon\Tests\Database\Mvc\Model\MetaData; +use Codeception\Example; use DatabaseTester; use Phalcon\Mvc\Model\MetaData; use Phalcon\Tests\Fixtures\Traits\DiTrait; @@ -34,6 +35,11 @@ public function _before(DatabaseTester $I) /** * Tests Phalcon\Mvc\Model\MetaData :: getNotNullAttributes() * + * @dataProvider getExamples + * + * @param DatabaseTester $I + * @param Example $example + * * @author Phalcon Team * @since 2020-02-01 * @@ -41,10 +47,20 @@ public function _before(DatabaseTester $I) * @group pgsql * @group sqlite */ - public function mvcModelMetadataGetNotNullAttributes(DatabaseTester $I) - { + public function mvcModelMetadataGetNotNullAttributes( + DatabaseTester $I, + Example $example + ) { $I->wantToTest('Mvc\Model\MetaData - getNotNullAttributes()'); + $service = $example['service']; + + $adapter = $this->newService($service); + $adapter->setDi($this->container); + $connection = $I->getConnection(); + + $adapter->reset(); + /** @var MetaData $metadata */ $metadata = $this->container->get('modelsMetadata'); @@ -54,5 +70,45 @@ public function mvcModelMetadataGetNotNullAttributes(DatabaseTester $I) ]; $actual = $metadata->getNotNullAttributes($model); $I->assertEquals($expected, $actual); + + $I->assertFalse($metadata->isEmpty()); + + /** + * Double check it can get from cache systems and not memory + */ + $adapter = $this->newService($service); + $this->container->setShared('modelsMetadata', $adapter); + $adapter->setDi($this->container); + + $I->assertNotEquals($adapter, $metadata); + + $I->assertTrue($adapter->isEmpty()); + $actual = $adapter->getNotNullAttributes($model); + $I->assertEquals($expected, $actual); + } + + /** + * @return array[] + */ + private function getExamples(): array + { + return [ + [ + 'service' => 'metadataMemory', + 'className' => 'Memory', + ], + [ + 'service' => 'metadataApcu', + 'className' => 'Apcu', + ], + [ + 'service' => 'metadataRedis', + 'className' => 'Redis', + ], + [ + 'service' => 'metadataLibmemcached', + 'className' => 'Libmemcached', + ], + ]; } } diff --git a/tests/database/Mvc/Model/MetaData/GetSetDICest.php b/tests/database/Mvc/Model/MetaData/GetSetDICest.php index 9d5ea4351b6..90a0d6647de 100644 --- a/tests/database/Mvc/Model/MetaData/GetSetDICest.php +++ b/tests/database/Mvc/Model/MetaData/GetSetDICest.php @@ -13,6 +13,7 @@ namespace Phalcon\Tests\Database\Mvc\Model\MetaData; +use Codeception\Example; use DatabaseTester; use Phalcon\Mvc\Model\Exception as ExpectedException; use Phalcon\Mvc\Model\MetaData\Memory; @@ -41,19 +42,26 @@ public function _before(DatabaseTester $I): void /** * Tests Phalcon\Mvc\Model\MetaData :: getDI() / setDI() * - * @param DatabaseTester $I + * @dataProvider getExamples + * + * @param DatabaseTester $I + * @param Example $example * * @author Phalcon Team * @since 2020-02-01 * * @group common */ - public function mvcModelMetadataGetSetDI(DatabaseTester $I) - { + public function mvcModelMetadataGetSetDI( + DatabaseTester $I, + Example $example + ) { $I->wantToTest('Mvc\Model\MetaData - getDI() / setDI()'); - $metadata = new Memory(); - $metadata->setDI($this->container); + $service = $example['service']; + + $metadata = $this->newService($service); + $metadata->setDi($this->container); $I->assertEquals($this->container, $metadata->getDI()); } @@ -81,4 +89,29 @@ function () { } ); } + + /** + * @return array[] + */ + private function getExamples(): array + { + return [ + [ + 'service' => 'metadataMemory', + 'className' => 'Memory', + ], + [ + 'service' => 'metadataApcu', + 'className' => 'Apcu', + ], + [ + 'service' => 'metadataRedis', + 'className' => 'Redis', + ], + [ + 'service' => 'metadataLibmemcached', + 'className' => 'Libmemcached', + ], + ]; + } } diff --git a/tests/database/Mvc/Model/MetaData/HasAttributeCest.php b/tests/database/Mvc/Model/MetaData/HasAttributeCest.php index 0b6e0582872..a541cee7317 100644 --- a/tests/database/Mvc/Model/MetaData/HasAttributeCest.php +++ b/tests/database/Mvc/Model/MetaData/HasAttributeCest.php @@ -13,6 +13,7 @@ namespace Phalcon\Tests\Database\Mvc\Model\MetaData; +use Codeception\Example; use DatabaseTester; use Phalcon\Mvc\Model\MetaData; use Phalcon\Tests\Fixtures\Traits\DiTrait; @@ -31,9 +32,14 @@ public function _before(DatabaseTester $I) $this->setDatabase($I); } - /** + /** * Tests Phalcon\Mvc\Model\MetaData :: hasAttribute() * + * @dataProvider getExamples + * + * @param DatabaseTester $I + * @param Example $example + * * @author Phalcon Team * @since 2018-11-13 * @@ -41,10 +47,21 @@ public function _before(DatabaseTester $I) * @group pgsql * @group sqlite */ - public function mvcModelMetadataHasAttribute(DatabaseTester $I) - { + public function mvcModelMetadataHasAttribute( + DatabaseTester $I, + Example $example + ) { $I->wantToTest('Mvc\Model\MetaData - hasAttribute()'); + $service = $example['service']; + + $adapter = $this->newService($service); + $adapter->setDi($this->container); + $connection = $I->getConnection(); + + $adapter->reset(); + + $this->container->setShared('modelsMetadata', $adapter); /** @var MetaData $metadata */ $metadata = $this->container->get('modelsMetadata'); @@ -57,5 +74,51 @@ public function mvcModelMetadataHasAttribute(DatabaseTester $I) $I->assertTrue($metadata->hasAttribute($model, 'inv_created_at')); $I->assertFalse($metadata->hasAttribute($model, 'unknown')); + $I->assertFalse($adapter->isEmpty()); + + /** + * Double check it can get from cache systems and not memory + */ + $adapter = $this->newService($service); + $this->container->setShared('modelsMetadata', $adapter); + $adapter->setDi($this->container); + + $I->assertNotEquals($adapter, $metadata); + + $I->assertTrue($adapter->isEmpty()); + + $I->assertTrue($adapter->hasAttribute($model, 'inv_id')); + $I->assertTrue($adapter->hasAttribute($model, 'inv_cst_id')); + $I->assertTrue($adapter->hasAttribute($model, 'inv_status_flag')); + $I->assertTrue($adapter->hasAttribute($model, 'inv_title')); + $I->assertTrue($adapter->hasAttribute($model, 'inv_total')); + $I->assertTrue($adapter->hasAttribute($model, 'inv_created_at')); + + $I->assertFalse($adapter->hasAttribute($model, 'unknown')); + } + + /** + * @return array[] + */ + private function getExamples(): array + { + return [ + [ + 'service' => 'metadataMemory', + 'className' => 'Memory', + ], + [ + 'service' => 'metadataApcu', + 'className' => 'Apcu', + ], + [ + 'service' => 'metadataRedis', + 'className' => 'Redis', + ], + [ + 'service' => 'metadataLibmemcached', + 'className' => 'Libmemcached', + ], + ]; } } diff --git a/tests/database/Mvc/Model/SaveCest.php b/tests/database/Mvc/Model/SaveCest.php index 3bf55a34f72..9f4915db4c6 100644 --- a/tests/database/Mvc/Model/SaveCest.php +++ b/tests/database/Mvc/Model/SaveCest.php @@ -644,6 +644,35 @@ public function mvcModelSaveWithRelatedManyAndBelongsRecordsProperty(DatabaseTes $I->assertEquals($expected, $actual); } + /** + * Tests Phalcon\Mvc\Model\ :: save() Infinite Loop + * + * @author Phalcon Team + * @since 2023-08-09 + * @issue https://github.com/phalcon/cphalcon/issues/16395 + * + * @group mysql + * @group sqlite + */ + public function infiniteSaveLoop(DatabaseTester $I) + { + $I->wantToTest('Mvc\Model - save() infinite Save loop'); + + /** @var \PDO $connection */ + $connection = $I->getConnection(); + $invoicesMigration = new InvoicesMigration($connection); + $invoicesMigration->insert(77, 1, 0, uniqid('inv-', true)); + + $customersMigration = new CustomersMigration($connection); + $customersMigration->insert(1, 1, 'test_firstName_1', 'test_lastName_1'); + + $customer = Customers::findFirst(1); + $invoice = Invoices::findFirst(77); + $invoice->customer = $customer; + $customer->invoices = [$invoice]; + $customer->save(); + } + /** * @return \string[][] */ diff --git a/tests/integration/Mvc/Router/HandleCest.php b/tests/integration/Mvc/Router/HandleCest.php index 72c6f372c87..6090ae79733 100644 --- a/tests/integration/Mvc/Router/HandleCest.php +++ b/tests/integration/Mvc/Router/HandleCest.php @@ -34,6 +34,7 @@ public function mvcRouterHandle(IntegrationTester $I) $I->wantToTest('Mvc\Router - handle()'); $router = new Router(); + $router->setDI(new FactoryDefault()); $router->add( '/admin/invoices/list', @@ -77,6 +78,7 @@ public function mvcRouterHandleWithPlaceholders(IntegrationTester $I) * Regular placeholders */ $router = new Router(false); + $router->setDI(new FactoryDefault()); $router->add( '/:module/:namespace/:controller/:action/:params/:int', [ @@ -227,6 +229,7 @@ public function mvcRouterHandleShortSyntax(IntegrationTester $I) $I->wantToTest('Mvc\Router - handle() - short syntax'); $router = new Router(false); + $router->setDI(new FactoryDefault()); $router->add("/about", "About::content"); $router->handle('/about'); diff --git a/tests/integration/Mvc/Router/Refactor/GroupCest.php b/tests/integration/Mvc/Router/Refactor/GroupCest.php index 2ecf383b5d0..a2f1f5f5afa 100644 --- a/tests/integration/Mvc/Router/Refactor/GroupCest.php +++ b/tests/integration/Mvc/Router/Refactor/GroupCest.php @@ -15,6 +15,7 @@ use Codeception\Example; use IntegrationTester; +use Phalcon\Di\FactoryDefault; use Phalcon\Mvc\Router; use Phalcon\Mvc\Router\Group; use Phalcon\Mvc\Router\Route; @@ -38,6 +39,7 @@ public function testGroups(IntegrationTester $I, Example $example) Route::reset(); $router = new Router(false); + $router->setDI(new FactoryDefault()); $blog = new Group( [ @@ -143,7 +145,6 @@ public function testHostnameRouteGroup(IntegrationTester $I, Example $example) $container = $this->getDi(); $router = new Router(false); - $router->setDI($container); $router->add( diff --git a/tests/unit/Assets/Collection/GetRealTargetPathCest.php b/tests/unit/Assets/Collection/GetRealTargetPathCest.php index fb676bb8a33..ab188610e23 100644 --- a/tests/unit/Assets/Collection/GetRealTargetPathCest.php +++ b/tests/unit/Assets/Collection/GetRealTargetPathCest.php @@ -50,7 +50,8 @@ public function assetsCollectionGetRealTargetPath(UnitTester $I) } /** - * Tests Phalcon\Assets\Collection :: getRealTargetPath() - file does not exist + * Tests Phalcon\Assets\Collection :: getRealTargetPath() - file does not + * exist * * @param UnitTester $I * diff --git a/tests/unit/Autoload/Loader/GetAddSetDirectoriesCest.php b/tests/unit/Autoload/Loader/GetAddSetDirectoriesCest.php index d1c6136dd02..c463dd4fc37 100644 --- a/tests/unit/Autoload/Loader/GetAddSetDirectoriesCest.php +++ b/tests/unit/Autoload/Loader/GetAddSetDirectoriesCest.php @@ -24,7 +24,8 @@ class GetAddSetDirectoriesCest use LoaderTrait; /** - * Tests Phalcon\Autoload\Loader :: getDirectories()/addDirectory()/setDirectories() + * Tests Phalcon\Autoload\Loader :: + * getDirectories()/addDirectory()/setDirectories() * * @param UnitTester $I * diff --git a/tests/unit/Events/Manager/AttachCest.php b/tests/unit/Events/Manager/AttachCest.php index feda9397858..e2d109191b5 100644 --- a/tests/unit/Events/Manager/AttachCest.php +++ b/tests/unit/Events/Manager/AttachCest.php @@ -62,7 +62,8 @@ public function eventsManagerAttachByNameAfterDetatchAll(UnitTester $I) $eventsManager->attach('log', $first); $logListeners = $component->getEventsManager() - ->getListeners('log'); + ->getListeners('log') + ; $I->assertCount(1, $logListeners); $expected = OneListener::class; @@ -73,7 +74,8 @@ public function eventsManagerAttachByNameAfterDetatchAll(UnitTester $I) ->attach('log', $second) ; $logListeners = $component->getEventsManager() - ->getListeners('log'); + ->getListeners('log') + ; $I->assertCount(2, $logListeners); $expected = OneListener::class; @@ -88,14 +90,16 @@ public function eventsManagerAttachByNameAfterDetatchAll(UnitTester $I) ->detachAll('log') ; $logListeners = $component->getEventsManager() - ->getListeners('log'); + ->getListeners('log') + ; $I->assertEmpty($logListeners); $component->getEventsManager() ->attach('log', $second) ; $logListeners = $component->getEventsManager() - ->getListeners('log'); + ->getListeners('log') + ; $I->assertCount(1, $logListeners); $expected = TwoListener::class; diff --git a/tests/unit/Events/Manager/FireCest.php b/tests/unit/Events/Manager/FireCest.php index 45777b8fdd9..467647b4e32 100644 --- a/tests/unit/Events/Manager/FireCest.php +++ b/tests/unit/Events/Manager/FireCest.php @@ -55,7 +55,8 @@ public function eventsManagerFire(UnitTester $I) $expected = ['three', 'two', 'one']; $actual = $component->getEventsManager() - ->getResponses(); + ->getResponses() + ; $I->assertSame($expected, $actual); } @@ -90,7 +91,8 @@ public function eventsManagerFireWithPriorities(UnitTester $I) $expected = ['one', 'two', 'three']; $actual = $component->getEventsManager() - ->getResponses(); + ->getResponses() + ; $I->assertSame($expected, $actual); } diff --git a/tests/unit/Events/Manager/GetListenersCest.php b/tests/unit/Events/Manager/GetListenersCest.php index face833acb3..da648934a28 100644 --- a/tests/unit/Events/Manager/GetListenersCest.php +++ b/tests/unit/Events/Manager/GetListenersCest.php @@ -43,7 +43,8 @@ public function eventsManagerGetListeners(UnitTester $I) $eventsManager->attach('log', $first); $eventsManager->attach('log', $second); $logListeners = $component->getEventsManager() - ->getListeners('log'); + ->getListeners('log') + ; $I->assertCount(2, $logListeners); $expected = OneListener::class; diff --git a/tests/unit/Events/Manager/GetResponsesCest.php b/tests/unit/Events/Manager/GetResponsesCest.php index f1d75ff5336..1b03bc5f6a4 100644 --- a/tests/unit/Events/Manager/GetResponsesCest.php +++ b/tests/unit/Events/Manager/GetResponsesCest.php @@ -53,7 +53,8 @@ public function eventsManagerGetResponses(UnitTester $I) $expected = ['one']; $actual = $component->getEventsManager() - ->getResponses(); + ->getResponses() + ; $I->assertSame($expected, $actual); } } diff --git a/tests/unit/Events/Manager/IsValidHandlerCest.php b/tests/unit/Events/Manager/IsValidHandlerCest.php index 9ebc16e8f93..1e20f834c7a 100644 --- a/tests/unit/Events/Manager/IsValidHandlerCest.php +++ b/tests/unit/Events/Manager/IsValidHandlerCest.php @@ -55,7 +55,7 @@ private function getExamples(): array [ 'string', false, - 'handler' + 'handler', ], [ 'integer', @@ -70,12 +70,12 @@ private function getExamples(): array [ 'callable - method', true, - [$objectHandler, 'hasListeners'] + [$objectHandler, 'hasListeners'], ], [ 'closure', true, - $closureHandler + $closureHandler, ], ]; } diff --git a/tests/unit/Filter/Filter/SanitizeMultipleCest.php b/tests/unit/Filter/Filter/SanitizeMultipleCest.php index 417fc6b81ba..05781abe58f 100644 --- a/tests/unit/Filter/Filter/SanitizeMultipleCest.php +++ b/tests/unit/Filter/Filter/SanitizeMultipleCest.php @@ -32,8 +32,8 @@ class SanitizeMultipleCest * @param UnitTester $I * @param Example $example * - * @author Phalcon Team - * @since 2021-10-23 + * @author Phalcon Team + * @since 2021-10-23 */ public function filterFilterSanitize(UnitTester $I, Example $example) { @@ -47,7 +47,7 @@ public function filterFilterSanitize(UnitTester $I, Example $example) $filters = $example['filters']; $noRecursive = $example['noRecursive']; - $actual = $filter->sanitize($source, $filters, $noRecursive); + $actual = $filter->sanitize($source, $filters, $noRecursive); $I->assertSame($expected, $actual); } @@ -117,7 +117,7 @@ public function filterFilterSanitizeCustomFilters(UnitTester $I, Example $exampl $filter->set($name, $testFilter); } - $actual = $filter->sanitize($source, array_keys($filters), $noRecursive); + $actual = $filter->sanitize($source, array_keys($filters), $noRecursive); $I->assertSame($expected, $actual); } @@ -129,49 +129,49 @@ private function getFilterSanitizeExamples(): array { return [ [ - 'label' => 'null value', - 'source' => null, - 'filters' => [ + 'label' => 'null value', + 'source' => null, + 'filters' => [ 'string', 'trim', ], 'noRecursive' => false, - 'expected' => null, + 'expected' => null, ], [ - 'label' => 'string with filters', - 'source' => ' lol<<< ', - 'filters' => [ + 'label' => 'string with filters', + 'source' => ' lol<<< ', + 'filters' => [ 'string', 'trim', ], 'noRecursive' => false, - 'expected' => 'lol<<<', + 'expected' => 'lol<<<', ], [ - 'label' => 'array with filters', - 'source' => [' 1 ', ' 2', '3 '], - 'filters' => 'trim', + 'label' => 'array with filters', + 'source' => [' 1 ', ' 2', '3 '], + 'filters' => 'trim', 'noRecursive' => false, - 'expected' => ['1', '2', '3'], + 'expected' => ['1', '2', '3'], ], [ - 'label' => 'array with multiple filters', - 'source' => [' 1 ', '

2

', '

3

'], - 'filters' => ['striptags', 'trim'], + 'label' => 'array with multiple filters', + 'source' => [' 1 ', '

2

', '

3

'], + 'filters' => ['striptags', 'trim'], 'noRecursive' => false, - 'expected' => ['1', '2', '3'], + 'expected' => ['1', '2', '3'], ], [ - 'label' => 'multiple filters and more parameters', - 'source' => ' mary had a little lamb ', - 'filters' => [ + 'label' => 'multiple filters and more parameters', + 'source' => ' mary had a little lamb ', + 'filters' => [ 'trim', 'replace' => [' ', '-'], 'remove' => ['mary'], ], 'noRecursive' => false, - 'expected' => '-had-a-little-lamb', + 'expected' => '-had-a-little-lamb', ], ]; } @@ -183,24 +183,24 @@ private function getFilterSanitizeCustomFiltersExamples(): array { return [ [ - 'label' => 'no recursive array value with multiple sanitizers', - 'source' => [4, 2, 0], - 'filters' => [ - 'sum' => fn ($input) => array_sum($input), - 'half' => fn ($input) => $input / 2, + 'label' => 'no recursive array value with multiple sanitizers', + 'source' => [4, 2, 0], + 'filters' => [ + 'sum' => fn($input) => array_sum($input), + 'half' => fn($input) => $input / 2, ], 'noRecursive' => true, - 'expected' => 3, + 'expected' => 3, ], [ - 'label' => 'recursive array value with multiple sanitizers', - 'source' => [4, 2, 0], - 'filters' => [ - 'double' => fn ($input) => $input * 2, - 'inverse' => fn ($input) => 0 - $input, + 'label' => 'recursive array value with multiple sanitizers', + 'source' => [4, 2, 0], + 'filters' => [ + 'double' => fn($input) => $input * 2, + 'inverse' => fn($input) => 0 - $input, ], 'noRecursive' => false, - 'expected' => [-8, -4, 0], + 'expected' => [-8, -4, 0], ], ]; } diff --git a/tests/unit/Filter/SanitizeCest.php b/tests/unit/Filter/SanitizeCest.php index 6dcd42c9809..458c57a549d 100644 --- a/tests/unit/Filter/SanitizeCest.php +++ b/tests/unit/Filter/SanitizeCest.php @@ -377,8 +377,10 @@ private function getExamples(): array 'class' => 'email', 'label' => 'email()', 'method' => 'email', - 'source' => ["!(first.guy) - @*my-domain**##.com.rx//"], + 'source' => [ + "!(first.guy) + @*my-domain**##.com.rx//", + ], 'expected' => "!first.guy@*my-domain**##.com.rx", ], [ diff --git a/tests/unit/Html/Escaper/AttributesCest.php b/tests/unit/Html/Escaper/AttributesCest.php index 256d16e8ca6..356b98c2019 100644 --- a/tests/unit/Html/Escaper/AttributesCest.php +++ b/tests/unit/Html/Escaper/AttributesCest.php @@ -39,13 +39,14 @@ class AttributesCest */ public function escaperAttributes(UnitTester $I, Example $example) { - $I->wantToTest('Escaper - attributes()'); - - $escaper = new Escaper(); - $text = $example['text']; $flags = $example['htmlQuoteType']; + $I->wantToTest( + 'Escaper - attributes() - ' . $flags + ); + + $escaper = new Escaper(); $escaper->setFlags($flags); $expected = $example['expected']; diff --git a/tests/unit/Html/Escaper/GetSetFlagsCest.php b/tests/unit/Html/Escaper/GetSetFlagsCest.php index f2912fabc56..95a39aa6a1b 100644 --- a/tests/unit/Html/Escaper/GetSetFlagsCest.php +++ b/tests/unit/Html/Escaper/GetSetFlagsCest.php @@ -45,6 +45,10 @@ public function escaperGetSetFlags(UnitTester $I) $actual = $escaper->getFlags(); $I->assertSame($expected, $actual); + $expected = 'That's right'; + $actual = $escaper->attributes("That's right"); + $I->assertSame($expected, $actual); + $escaper->setFlags(ENT_HTML401); $expected = ENT_HTML401; diff --git a/tests/unit/Html/Helper/Link/UnderscoreInvokeCest.php b/tests/unit/Html/Helper/Link/UnderscoreInvokeCest.php index a6c2bd5c84f..8141df070c2 100644 --- a/tests/unit/Html/Helper/Link/UnderscoreInvokeCest.php +++ b/tests/unit/Html/Helper/Link/UnderscoreInvokeCest.php @@ -93,7 +93,7 @@ private function getExamples(): array 'add' => [ 'https://phalcon.io/assets/base.css' => [ 'rel' => 'stylesheet', - 'media' => 'screen' + 'media' => 'screen', ], ], 'indent' => ' ', diff --git a/tests/unit/Html/Link/EvolvableLink/WithoutRelCest.php b/tests/unit/Html/Link/EvolvableLink/WithoutRelCest.php index e08fe82a19d..6799baee3ea 100644 --- a/tests/unit/Html/Link/EvolvableLink/WithoutRelCest.php +++ b/tests/unit/Html/Link/EvolvableLink/WithoutRelCest.php @@ -42,7 +42,8 @@ public function linkEvolvableLinkWithoutRel(UnitTester $I) $newInstance = $link ->withRel('citation') - ->withRel('canonical'); + ->withRel('canonical') + ; $I->assertNotSame($link, $newInstance); diff --git a/tests/unit/Html/Link/Link/ConstructCest.php b/tests/unit/Html/Link/Link/ConstructCest.php index 08a8f1ac844..f211754b761 100644 --- a/tests/unit/Html/Link/Link/ConstructCest.php +++ b/tests/unit/Html/Link/Link/ConstructCest.php @@ -13,8 +13,8 @@ namespace Phalcon\Tests\Unit\Html\Link\Link; -use Phalcon\Html\Link\Link; use Phalcon\Html\Link\Interfaces\LinkInterface; +use Phalcon\Html\Link\Link; use UnitTester; /** diff --git a/tests/unit/Html/Link/LinkProvider/ConstructCest.php b/tests/unit/Html/Link/LinkProvider/ConstructCest.php index 905378fb057..8e04e2c5679 100644 --- a/tests/unit/Html/Link/LinkProvider/ConstructCest.php +++ b/tests/unit/Html/Link/LinkProvider/ConstructCest.php @@ -13,9 +13,9 @@ namespace Phalcon\Tests\Unit\Html\Link\LinkProvider; +use Phalcon\Html\Link\Interfaces\LinkProviderInterface; use Phalcon\Html\Link\Link; use Phalcon\Html\Link\LinkProvider; -use Phalcon\Html\Link\Interfaces\LinkProviderInterface; use UnitTester; /** diff --git a/tests/unit/Image/Adapter/Gd/RenderCest.php b/tests/unit/Image/Adapter/Gd/RenderCest.php index 66922c57e79..1196326a53a 100644 --- a/tests/unit/Image/Adapter/Gd/RenderCest.php +++ b/tests/unit/Image/Adapter/Gd/RenderCest.php @@ -38,7 +38,7 @@ public function imageAdapterGdRender(UnitTester $I) 'png' => [8802, '30787c3c1e181818'], 'wbmp' => [31761, '00c78ffe78030200'], 'webp' => [483066, '270640183c3c7c7c'], - 'xyz' => [8802, '30787c3c1e181818'] // unknown defaults to png, + 'xyz' => [8802, '30787c3c1e181818'], // unknown defaults to png, ]; foreach ($this->getImages() as $type => $imagePath) { diff --git a/tests/unit/Image/Adapter/Imagick/GetImageCest.php b/tests/unit/Image/Adapter/Imagick/GetImageCest.php index aed8fe0a49c..3b05c5f1edc 100644 --- a/tests/unit/Image/Adapter/Imagick/GetImageCest.php +++ b/tests/unit/Image/Adapter/Imagick/GetImageCest.php @@ -37,7 +37,7 @@ public function imageAdapterImagickGetImage(UnitTester $I) dataDir('assets/images/example-jpg.jpg') ); - $class = \Imagick::class; + $class = \Imagick::class; $actual = $image->getImage(); $I->assertInstanceOf($class, $actual); } diff --git a/tests/unit/Image/Adapter/Imagick/SetResourceLimitCest.php b/tests/unit/Image/Adapter/Imagick/SetResourceLimitCest.php index 6c3a41979c9..9ce3a6a9e46 100644 --- a/tests/unit/Image/Adapter/Imagick/SetResourceLimitCest.php +++ b/tests/unit/Image/Adapter/Imagick/SetResourceLimitCest.php @@ -22,7 +22,8 @@ class SetResourceLimitCest { /** - * Unit Tests Phalcon\Image\Adapter\Imagick :: setResourceLimit() - exception + * Unit Tests Phalcon\Image\Adapter\Imagick :: setResourceLimit() - + * exception * * @author Phalcon Team * @since 2022-08-02 diff --git a/tests/unit/Logger/Adapter/Noop/AddCest.php b/tests/unit/Logger/Adapter/Noop/AddCest.php index a062b9af467..cc5f4842d8d 100644 --- a/tests/unit/Logger/Adapter/Noop/AddCest.php +++ b/tests/unit/Logger/Adapter/Noop/AddCest.php @@ -16,8 +16,8 @@ use DateTimeImmutable; use DateTimeZone; use Phalcon\Logger\Adapter\Noop; +use Phalcon\Logger\Enum; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; use function date_default_timezone_get; @@ -45,21 +45,21 @@ public function loggerAdapterNoopAdd(UnitTester $I) $item1 = new Item( 'Message 1', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); $item2 = new Item( 'Message 2', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); $item3 = new Item( 'Message 3', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); diff --git a/tests/unit/Logger/Adapter/Noop/ProcessCest.php b/tests/unit/Logger/Adapter/Noop/ProcessCest.php index ccde5c11976..b7fb8ad99cb 100644 --- a/tests/unit/Logger/Adapter/Noop/ProcessCest.php +++ b/tests/unit/Logger/Adapter/Noop/ProcessCest.php @@ -16,8 +16,8 @@ use DateTimeImmutable; use DateTimeZone; use Phalcon\Logger\Adapter\Noop; +use Phalcon\Logger\Enum; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; use function date_default_timezone_get; @@ -43,7 +43,7 @@ public function loggerAdapterNoopProcess(UnitTester $I) $item = new Item( 'Message 1', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); diff --git a/tests/unit/Logger/Adapter/Stream/AddCest.php b/tests/unit/Logger/Adapter/Stream/AddCest.php index 4281111d9ec..043a3d27398 100644 --- a/tests/unit/Logger/Adapter/Stream/AddCest.php +++ b/tests/unit/Logger/Adapter/Stream/AddCest.php @@ -16,8 +16,8 @@ use DateTimeImmutable; use DateTimeZone; use Phalcon\Logger\Adapter\Stream; +use Phalcon\Logger\Enum; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; use function date_default_timezone_get; @@ -45,19 +45,19 @@ public function loggerAdapterStreamAdd(UnitTester $I) $item1 = new Item( 'Message 1', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); $item2 = new Item( 'Message 2', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); $item3 = new Item( 'Message 3', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); diff --git a/tests/unit/Logger/Adapter/Stream/CloseCest.php b/tests/unit/Logger/Adapter/Stream/CloseCest.php index dc8846ea7d0..0f96f2c12db 100644 --- a/tests/unit/Logger/Adapter/Stream/CloseCest.php +++ b/tests/unit/Logger/Adapter/Stream/CloseCest.php @@ -16,9 +16,9 @@ use DateTimeImmutable; use DateTimeZone; use Phalcon\Logger\Adapter\Stream; +use Phalcon\Logger\Enum; use Phalcon\Logger\Exception; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; use function date_default_timezone_get; @@ -45,7 +45,7 @@ public function loggerAdapterStreamClose(UnitTester $I) $item = new Item( 'Message 1', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); $adapter->process($item); diff --git a/tests/unit/Logger/Adapter/Stream/ProcessCest.php b/tests/unit/Logger/Adapter/Stream/ProcessCest.php index 2d6996a4bb3..4498d170f34 100644 --- a/tests/unit/Logger/Adapter/Stream/ProcessCest.php +++ b/tests/unit/Logger/Adapter/Stream/ProcessCest.php @@ -18,8 +18,8 @@ use DateTimeZone; use LogicException; use Phalcon\Logger\Adapter\Stream; +use Phalcon\Logger\Enum; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; use function date_default_timezone_get; @@ -47,7 +47,7 @@ public function loggerAdapterStreamProcess(UnitTester $I) $item = new Item( 'Message 1', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); $adapter->process($item); @@ -97,7 +97,7 @@ function () use ($outputPath, $fileName) { $item = new Item( 'Message 1', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); $adapter->process($item); diff --git a/tests/unit/Logger/Adapter/Syslog/AddCest.php b/tests/unit/Logger/Adapter/Syslog/AddCest.php index 9ee1e5b86a1..3bbc6de20a7 100644 --- a/tests/unit/Logger/Adapter/Syslog/AddCest.php +++ b/tests/unit/Logger/Adapter/Syslog/AddCest.php @@ -21,10 +21,9 @@ use DateTimeImmutable; use DateTimeZone; use Phalcon\Logger\Adapter\Syslog; +use Phalcon\Logger\Enum; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; - use function date_default_timezone_get; class AddCest @@ -51,21 +50,21 @@ public function loggerAdapterSyslogAdd(UnitTester $I) $item1 = new Item( 'Message 1', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); $item2 = new Item( 'Message 2', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); $item3 = new Item( 'Message 3', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); diff --git a/tests/unit/Logger/Adapter/Syslog/ProcessCest.php b/tests/unit/Logger/Adapter/Syslog/ProcessCest.php index bcc78579449..f4cf7c80806 100644 --- a/tests/unit/Logger/Adapter/Syslog/ProcessCest.php +++ b/tests/unit/Logger/Adapter/Syslog/ProcessCest.php @@ -18,8 +18,8 @@ use DateTimeZone; use LogicException; use Phalcon\Logger\Adapter\Syslog; +use Phalcon\Logger\Enum; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; use function date_default_timezone_get; @@ -46,7 +46,7 @@ public function loggerAdapterSyslogProcess(UnitTester $I) $item = new Item( 'Message 1', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); @@ -88,7 +88,7 @@ function () use ($fileName) { $item = new Item( 'Message 1', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); $adapter->process($item); diff --git a/tests/unit/Logger/Formatter/Json/FormatCest.php b/tests/unit/Logger/Formatter/Json/FormatCest.php index 53b5114f544..8fd1777ba1c 100644 --- a/tests/unit/Logger/Formatter/Json/FormatCest.php +++ b/tests/unit/Logger/Formatter/Json/FormatCest.php @@ -16,9 +16,9 @@ use DateTimeImmutable; use DateTimeZone; use Exception; +use Phalcon\Logger\Enum; use Phalcon\Logger\Formatter\Json; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; use function date_default_timezone_get; @@ -45,7 +45,7 @@ public function loggerFormatterJsonFormat(UnitTester $I) $item = new Item( 'log message', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); @@ -80,7 +80,7 @@ public function loggerFormatterJsonFormatCustom(UnitTester $I) $item = new Item( 'log message', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); diff --git a/tests/unit/Logger/Formatter/Line/FormatCest.php b/tests/unit/Logger/Formatter/Line/FormatCest.php index 59e1c549993..f215037f5e8 100644 --- a/tests/unit/Logger/Formatter/Line/FormatCest.php +++ b/tests/unit/Logger/Formatter/Line/FormatCest.php @@ -16,12 +16,13 @@ use DateTimeImmutable; use DateTimeZone; use Exception; +use Phalcon\Logger\Enum; use Phalcon\Logger\Formatter\Line; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; use function date_default_timezone_get; +use function uniqid; class FormatCest { @@ -44,7 +45,7 @@ public function loggerFormatterLineFormat(UnitTester $I) $item = new Item( 'log message', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); @@ -52,11 +53,8 @@ public function loggerFormatterLineFormat(UnitTester $I) '[%s][debug] log message', $datetime->format('c') ); - - $I->assertSame( - $expected, - $formatter->format($item) - ); + $actual = $formatter->format($item); + $I->assertSame($expected, $actual); } /** @@ -78,7 +76,7 @@ public function loggerFormatterLineFormatCustom(UnitTester $I) $item = new Item( 'log message', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); @@ -86,11 +84,8 @@ public function loggerFormatterLineFormatCustom(UnitTester $I) 'log message-[debug]-%s', $datetime->format('c') ); - - $I->assertSame( - $expected, - $formatter->format($item) - ); + $actual = $formatter->format($item); + $I->assertSame($expected, $actual); } /** @@ -116,15 +111,66 @@ public function loggerFormatterLineFormatCustomWithMilliseconds(UnitTester $I) $item = new Item( 'log message', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); $result = $formatter->format($item); $parts = explode('-', $result); $parts = explode('.', $parts[2]); - $I->assertCount(2, $parts); - $I->assertGreaterThan(0, (int) $parts[0]); - $I->assertGreaterThan(0, (int) $parts[1]); + + $expected = 2; + $actual = $parts; + $I->assertCount($expected, $actual); + + $expected = 0; + $actual = (int) $parts[0]; + $I->assertGreaterThan($expected, $actual); + + $expected = 0; + $actual = (int) $parts[1]; + $I->assertGreaterThan($expected, $actual); + } + + /** + * Tests Phalcon\Logger\Formatter\Line :: format() - custom interpolator + * + * @param UnitTester $I + * + * @throws Exception + * @since 2022-09-11 + * @author Phalcon Team + */ + public function loggerFormatterLineFormatCustomInterpolator(UnitTester $I) + { + $I->wantToTest('Logger\Formatter\Line - format() - custom - interpolator'); + + $formatter = new Line( + '%message%-[%level%]-%date%-%server%:%user%', + 'U.u' + ); + + $timezone = date_default_timezone_get(); + $datetime = new DateTimeImmutable('now', new DateTimeZone($timezone)); + $context = [ + 'server' => uniqid('srv-'), + 'user' => uniqid('usr-'), + ]; + $item = new Item( + 'log message', + 'debug', + Enum::DEBUG, + $datetime, + $context + ); + + $expected = sprintf( + 'log message-[debug]-%s-%s:%s', + $datetime->format('U.u'), + $context['server'], + $context['user'] + ); + $actual = $formatter->format($item); + $I->assertSame($expected, $actual); } } diff --git a/tests/unit/Logger/Item/GetContextCest.php b/tests/unit/Logger/Item/GetContextCest.php index 36b4ab753ab..5ca7ffc7308 100644 --- a/tests/unit/Logger/Item/GetContextCest.php +++ b/tests/unit/Logger/Item/GetContextCest.php @@ -15,8 +15,8 @@ use DateTimeImmutable; use DateTimeZone; +use Phalcon\Logger\Enum; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; use function date_default_timezone_get; @@ -41,7 +41,7 @@ public function loggerItemGetContext(UnitTester $I) $item = new Item( 'log message', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime, $context ); diff --git a/tests/unit/Logger/Item/GetDateTimeCest.php b/tests/unit/Logger/Item/GetDateTimeCest.php index 817dd6038b7..e130ae06941 100644 --- a/tests/unit/Logger/Item/GetDateTimeCest.php +++ b/tests/unit/Logger/Item/GetDateTimeCest.php @@ -15,8 +15,8 @@ use DateTimeImmutable; use DateTimeZone; +use Phalcon\Logger\Enum; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; use function date_default_timezone_get; @@ -40,7 +40,7 @@ public function loggerItemGetTime(UnitTester $I) $item = new Item( 'log message', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); diff --git a/tests/unit/Logger/Item/GetLevelCest.php b/tests/unit/Logger/Item/GetLevelCest.php index 7593b7611be..aea53dd2fd5 100644 --- a/tests/unit/Logger/Item/GetLevelCest.php +++ b/tests/unit/Logger/Item/GetLevelCest.php @@ -15,8 +15,8 @@ use DateTimeImmutable; use DateTimeZone; +use Phalcon\Logger\Enum; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; use function date_default_timezone_get; @@ -40,11 +40,11 @@ public function loggerItemGetLevel(UnitTester $I) $item = new Item( 'log message', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); - $expected = Logger::DEBUG; + $expected = Enum::DEBUG; $actual = $item->getLevel(); $I->assertSame($expected, $actual); } diff --git a/tests/unit/Logger/Item/GetLevelNameCest.php b/tests/unit/Logger/Item/GetLevelNameCest.php index f730c26dc57..51b8cb31ad0 100644 --- a/tests/unit/Logger/Item/GetLevelNameCest.php +++ b/tests/unit/Logger/Item/GetLevelNameCest.php @@ -15,8 +15,8 @@ use DateTimeImmutable; use DateTimeZone; +use Phalcon\Logger\Enum; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; use function date_default_timezone_get; @@ -40,7 +40,7 @@ public function loggerItemGetLevelName(UnitTester $I) $item = new Item( 'log message', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); diff --git a/tests/unit/Logger/Item/GetMessageCest.php b/tests/unit/Logger/Item/GetMessageCest.php index 8a3f0d47a37..4f9a8b45154 100644 --- a/tests/unit/Logger/Item/GetMessageCest.php +++ b/tests/unit/Logger/Item/GetMessageCest.php @@ -15,8 +15,8 @@ use DateTimeImmutable; use DateTimeZone; +use Phalcon\Logger\Enum; use Phalcon\Logger\Item; -use Phalcon\Logger\Logger; use UnitTester; use function date_default_timezone_get; @@ -40,7 +40,7 @@ public function loggerItemGetMessage(UnitTester $I) $item = new Item( 'log message', 'debug', - Logger::DEBUG, + Enum::DEBUG, $datetime ); diff --git a/tests/unit/Logger/Logger/ConstructCest.php b/tests/unit/Logger/Logger/ConstructCest.php index 37fb5e98c57..370a9b6f559 100644 --- a/tests/unit/Logger/Logger/ConstructCest.php +++ b/tests/unit/Logger/Logger/ConstructCest.php @@ -14,6 +14,7 @@ namespace Phalcon\Tests\Unit\Logger\Logger; use Phalcon\Logger\Adapter\Stream; +use Phalcon\Logger\Enum; use Phalcon\Logger\Exception; use Phalcon\Logger\Formatter\Json; use Phalcon\Logger\Logger; @@ -50,15 +51,15 @@ public function loggerConstructConstants(UnitTester $I) { $I->wantToTest('Logger - __construct() - constants'); - $I->assertSame(2, Logger::ALERT); - $I->assertSame(1, Logger::CRITICAL); - $I->assertSame(7, Logger::DEBUG); - $I->assertSame(0, Logger::EMERGENCY); - $I->assertSame(3, Logger::ERROR); - $I->assertSame(6, Logger::INFO); - $I->assertSame(5, Logger::NOTICE); - $I->assertSame(4, Logger::WARNING); - $I->assertSame(8, Logger::CUSTOM); + $I->assertSame(2, Enum::ALERT); + $I->assertSame(1, Enum::CRITICAL); + $I->assertSame(7, Enum::DEBUG); + $I->assertSame(0, Enum::EMERGENCY); + $I->assertSame(3, Enum::ERROR); + $I->assertSame(6, Enum::INFO); + $I->assertSame(5, Enum::NOTICE); + $I->assertSame(4, Enum::WARNING); + $I->assertSame(8, Enum::CUSTOM); } /** @@ -89,7 +90,7 @@ public function loggerConstructStreamWithJsonConstants(UnitTester $I) $time = time(); $logger->debug('This is a message'); - $logger->log(Logger::ERROR, 'This is an error'); + $logger->log(Enum::ERROR, 'This is an error'); $logger->error('This is another error'); $I->amInPath($outputPath); diff --git a/tests/unit/Logger/Logger/GetSetLogLevelCest.php b/tests/unit/Logger/Logger/GetSetLogLevelCest.php index b4a7bd300a6..f4349007c50 100644 --- a/tests/unit/Logger/Logger/GetSetLogLevelCest.php +++ b/tests/unit/Logger/Logger/GetSetLogLevelCest.php @@ -13,6 +13,7 @@ namespace Phalcon\Tests\Unit\Logger\Logger; +use Phalcon\Logger\Enum; use Phalcon\Logger\Logger; use UnitTester; @@ -31,14 +32,14 @@ public function loggerGetSetLogLevel(UnitTester $I) $I->wantToTest('Logger - getLogLevel()/setLogLevel()'); $logger = new Logger('my-name'); - $I->assertSame(Logger::CUSTOM, $logger->getLogLevel()); + $I->assertSame(Enum::CUSTOM, $logger->getLogLevel()); - $object = $logger->setLogLevel(Logger::INFO); + $object = $logger->setLogLevel(Enum::INFO); $I->assertInstanceOf(Logger::class, $object); - $I->assertSame(Logger::INFO, $logger->getLogLevel()); + $I->assertSame(Enum::INFO, $logger->getLogLevel()); $logger->setLogLevel(99); - $I->assertSame(Logger::CUSTOM, $logger->getLogLevel()); + $I->assertSame(Enum::CUSTOM, $logger->getLogLevel()); } } diff --git a/tests/unit/Logger/Logger/LevelsCest.php b/tests/unit/Logger/Logger/LevelsCest.php index 9622ff14d62..f6ca69e8479 100644 --- a/tests/unit/Logger/Logger/LevelsCest.php +++ b/tests/unit/Logger/Logger/LevelsCest.php @@ -84,7 +84,8 @@ public function loggerAlert(UnitTester $I, Example $example) $logDateTime = new DateTime($date); $dateTimeAfterLog = new DateTime($logTime); $nInterval = $logDateTime->diff($dateTimeAfterLog) - ->format('%s'); + ->format('%s') + ; $nSecondThreshold = 60; $I->assertLessThan($nSecondThreshold, $nInterval); diff --git a/tests/unit/Logger/Logger/LogCest.php b/tests/unit/Logger/Logger/LogCest.php index 3026f21bfa6..0cfdf8210d7 100644 --- a/tests/unit/Logger/Logger/LogCest.php +++ b/tests/unit/Logger/Logger/LogCest.php @@ -14,12 +14,15 @@ namespace Phalcon\Tests\Unit\Logger\Logger; use Phalcon\Logger\Adapter\Stream; +use Phalcon\Logger\Enum; +use Phalcon\Logger\Formatter\Line; use Phalcon\Logger\Logger; use UnitTester; use function logsDir; use function sprintf; use function strtoupper; +use function uniqid; class LogCest { @@ -47,24 +50,24 @@ public function loggerLog(UnitTester $I) ); $levels = [ - Logger::ALERT => 'alert', - Logger::CRITICAL => 'critical', - Logger::DEBUG => 'debug', - Logger::EMERGENCY => 'emergency', - Logger::ERROR => 'error', - Logger::INFO => 'info', - Logger::NOTICE => 'notice', - Logger::WARNING => 'warning', - Logger::CUSTOM => 'custom', - 'alert' => 'alert', - 'critical' => 'critical', - 'debug' => 'debug', - 'emergency' => 'emergency', - 'error' => 'error', - 'info' => 'info', - 'notice' => 'notice', - 'warning' => 'warning', - 'custom' => 'custom', + Enum::ALERT => 'alert', + Enum::CRITICAL => 'critical', + Enum::DEBUG => 'debug', + Enum::EMERGENCY => 'emergency', + Enum::ERROR => 'error', + Enum::INFO => 'info', + Enum::NOTICE => 'notice', + Enum::WARNING => 'warning', + Enum::CUSTOM => 'custom', + 'alert' => 'alert', + 'critical' => 'critical', + 'debug' => 'debug', + 'emergency' => 'emergency', + 'error' => 'error', + 'info' => 'info', + 'notice' => 'notice', + 'warning' => 'warning', + 'custom' => 'custom', ]; foreach ($levels as $level => $levelName) { @@ -111,30 +114,30 @@ public function loggerLogLogLevel(UnitTester $I) ] ); - $logger->setLogLevel(Logger::ALERT); + $logger->setLogLevel(Enum::ALERT); $levelsYes = [ - Logger::ALERT => 'alert', - Logger::CRITICAL => 'critical', - Logger::EMERGENCY => 'emergency', - 'alert' => 'alert', - 'critical' => 'critical', - 'emergency' => 'emergency', + Enum::ALERT => 'alert', + Enum::CRITICAL => 'critical', + Enum::EMERGENCY => 'emergency', + 'alert' => 'alert', + 'critical' => 'critical', + 'emergency' => 'emergency', ]; $levelsNo = [ - Logger::DEBUG => 'debug', - Logger::ERROR => 'error', - Logger::INFO => 'info', - Logger::NOTICE => 'notice', - Logger::WARNING => 'warning', - Logger::CUSTOM => 'custom', - 'debug' => 'debug', - 'error' => 'error', - 'info' => 'info', - 'notice' => 'notice', - 'warning' => 'warning', - 'custom' => 'custom', + Enum::DEBUG => 'debug', + Enum::ERROR => 'error', + Enum::INFO => 'info', + Enum::NOTICE => 'notice', + Enum::WARNING => 'warning', + Enum::CUSTOM => 'custom', + 'debug' => 'debug', + 'error' => 'error', + 'info' => 'info', + 'notice' => 'notice', + 'warning' => 'warning', + 'custom' => 'custom', ]; foreach ($levelsYes as $level => $levelName) { @@ -169,4 +172,52 @@ public function loggerLogLogLevel(UnitTester $I) $adapter->close(); $I->safeDeleteFile($fileName); } + + /** + * Tests Phalcon\Logger :: log() - interpolator + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2022-09-11 + */ + public function loggerLogLogInterpolator(UnitTester $I) + { + $I->wantToTest('Logger - log() - interpolator'); + + $logPath = logsDir(); + $fileName = $I->getNewFileName('log', 'log'); + $formatter = new Line( + '%message%-[%level%]-%server%:%user%', + 'U.u' + ); + $context = [ + 'server' => uniqid('srv-'), + 'user' => uniqid('usr-'), + ]; + $adapter = new Stream($logPath . $fileName); + $adapter->setFormatter($formatter); + + $logger = new Logger( + 'my-logger', + [ + 'one' => $adapter, + ] + ); + + $logger->log(Enum::DEBUG, 'log message', $context); + + $I->amInPath($logPath); + $I->openFile($fileName); + + $expected = sprintf( + 'log message-[DEBUG]-%s:%s', + $context['server'], + $context['user'] + ); + $I->seeInThisFile($expected); + + $adapter->close(); + $I->safeDeleteFile($fileName); + } } diff --git a/tests/unit/Messages/Messages/JsonSerializeCest.php b/tests/unit/Messages/Messages/JsonSerializeCest.php index ae4692fc79a..1fb9ed1a0fd 100644 --- a/tests/unit/Messages/Messages/JsonSerializeCest.php +++ b/tests/unit/Messages/Messages/JsonSerializeCest.php @@ -88,7 +88,7 @@ public function messagesMessagesJsonSerializeNoJsonSerialize(UnitTester $I): voi $messages = new Messages( [ - $fixture + $fixture, ] ); diff --git a/tests/unit/Support/Helper/File/BasenameCest.php b/tests/unit/Support/Helper/File/BasenameCest.php index 3d04703baef..9a3f00bfddb 100644 --- a/tests/unit/Support/Helper/File/BasenameCest.php +++ b/tests/unit/Support/Helper/File/BasenameCest.php @@ -51,7 +51,8 @@ public function supportHelperFileBasenamePureASCII(UnitTester $I, Example $examp } /** - * Tests Phalcon\Support\Helper\File :: basename() with non-ASCII $uri support + * Tests Phalcon\Support\Helper\File :: basename() with non-ASCII $uri + * support * * @dataProvider getNonAsciiExamples * diff --git a/tests/unit/Support/Helper/Str/InterpolateCest.php b/tests/unit/Support/Helper/Str/InterpolateCest.php index ea17b6b87dd..6006b4e05ca 100644 --- a/tests/unit/Support/Helper/Str/InterpolateCest.php +++ b/tests/unit/Support/Helper/Str/InterpolateCest.php @@ -53,7 +53,7 @@ private function getExamples(): array '%date% is the date', [ 'date' => '2020-09-09', - ] + ], ], [ 'date/level', @@ -61,8 +61,8 @@ private function getExamples(): array '%date% is the date %level% is the level', [ 'date' => '2020-09-09', - 'level' => 'CRITICAL' - ] + 'level' => 'CRITICAL', + ], ], [ 'empty', @@ -70,7 +70,7 @@ private function getExamples(): array 'no format', [ 'date' => '2020-09-09', - ] + ], ], [ 'date', @@ -78,7 +78,7 @@ private function getExamples(): array '%date% is the date', [ 'date' => '2020-09-09', - ] + ], ], [ 'date and context', @@ -87,7 +87,7 @@ private function getExamples(): array [ 'date' => '2020-09-09', 'stub' => 'AAA', - ] + ], ], ]; } diff --git a/tests/unit/Support/Helper/Str/ReduceSlashesCest.php b/tests/unit/Support/Helper/Str/ReduceSlashesCest.php index d903a3ac03c..6f8e95ef1bd 100644 --- a/tests/unit/Support/Helper/Str/ReduceSlashesCest.php +++ b/tests/unit/Support/Helper/Str/ReduceSlashesCest.php @@ -13,6 +13,7 @@ namespace Phalcon\Tests\Unit\Support\Helper\Str; +use Page\Http; use Phalcon\Support\Helper\Str\ReduceSlashes; use UnitTester; @@ -45,8 +46,8 @@ public function supportHelperStrReduceSlashes(UnitTester $I) $actual = $object('http://foo//bar/baz/buz'); $I->assertSame($expected, $actual); - $expected = 'php://memory'; - $actual = $object('php://memory'); + $expected = Http::STREAM_MEMORY; + $actual = $object(Http::STREAM_MEMORY); $I->assertSame($expected, $actual); $expected = 'http/https'; diff --git a/tests/unit/Support/Helper/Str/StartsWithCest.php b/tests/unit/Support/Helper/Str/StartsWithCest.php index 432c880af47..283dab36830 100644 --- a/tests/unit/Support/Helper/Str/StartsWithCest.php +++ b/tests/unit/Support/Helper/Str/StartsWithCest.php @@ -66,7 +66,8 @@ public function supportHelperStrStartsWithEmpty(UnitTester $I) } /** - * Tests Phalcon\Support\Helper\Str :: startsWith() - finding an empty string + * Tests Phalcon\Support\Helper\Str :: startsWith() - finding an empty + * string * * @param UnitTester $I * diff --git a/tests/unit/Support/HelperFactory/NewInstanceCest.php b/tests/unit/Support/HelperFactory/NewInstanceCest.php index ca99c3e7bc4..7ef15e537c6 100644 --- a/tests/unit/Support/HelperFactory/NewInstanceCest.php +++ b/tests/unit/Support/HelperFactory/NewInstanceCest.php @@ -183,6 +183,7 @@ private function getExamples(): array ["random", Random::class], ["reduceSlashes", ReduceSlashes::class], ["startsWith", StartsWith::class], + ["snakeCase", SnakeCase::class], ["suffix", Suffix::class], ["ucwords", Ucwords::class], ["uncamelize", Uncamelize::class], diff --git a/tests/unit/Translate/Adapter/Csv/ConstructCest.php b/tests/unit/Translate/Adapter/Csv/ConstructCest.php index 4dc44bb1524..3980b7cbb5b 100644 --- a/tests/unit/Translate/Adapter/Csv/ConstructCest.php +++ b/tests/unit/Translate/Adapter/Csv/ConstructCest.php @@ -73,7 +73,8 @@ function () { } /** - * Tests Phalcon\Translate\Adapter\Csv :: __construct() - Exception error loading file + * Tests Phalcon\Translate\Adapter\Csv :: __construct() - Exception error + * loading file * * @param UnitTester $I * diff --git a/tests/unit/Translate/Adapter/Csv/HasCest.php b/tests/unit/Translate/Adapter/Csv/HasCest.php index bb597c8d27f..7cf486ef494 100644 --- a/tests/unit/Translate/Adapter/Csv/HasCest.php +++ b/tests/unit/Translate/Adapter/Csv/HasCest.php @@ -42,8 +42,6 @@ public function translateAdapterCsvHas(UnitTester $I) $language = $this->getCsvConfig()['en']; $translator = new Csv(new InterpolatorFactory(), $language); - $actual = $translator->exists('hi'); - $I->assertTrue($actual); $actual = $translator->has('hi'); $I->assertTrue($actual); } diff --git a/tests/unit/Translate/Adapter/Gettext/HasCest.php b/tests/unit/Translate/Adapter/Gettext/HasCest.php index 3c8ac6c8070..98f9a02cff9 100644 --- a/tests/unit/Translate/Adapter/Gettext/HasCest.php +++ b/tests/unit/Translate/Adapter/Gettext/HasCest.php @@ -42,8 +42,6 @@ public function translateAdapterGettextHas(UnitTester $I) $params = $this->getGettextConfig(); $translator = new Gettext(new InterpolatorFactory(), $params); - $actual = $translator->exists('hi'); - $I->assertTrue($actual); $actual = $translator->has('hi'); $I->assertTrue($actual); } diff --git a/tests/unit/Translate/Adapter/Gettext/OffsetExistsCest.php b/tests/unit/Translate/Adapter/Gettext/OffsetExistsCest.php index 85c662e8c0e..e235acb0529 100644 --- a/tests/unit/Translate/Adapter/Gettext/OffsetExistsCest.php +++ b/tests/unit/Translate/Adapter/Gettext/OffsetExistsCest.php @@ -42,6 +42,6 @@ public function translateAdapterGettextOffsetExists(UnitTester $I) $params = $this->getGettextConfig(); $translator = new Gettext(new InterpolatorFactory(), $params); - $I->assertTrue($translator->exists('hi')); + $I->assertTrue($translator->has('hi')); } } diff --git a/tests/unit/Translate/Adapter/NativeArray/HasCest.php b/tests/unit/Translate/Adapter/NativeArray/HasCest.php index 51d0d007d2b..fd978842fa2 100644 --- a/tests/unit/Translate/Adapter/NativeArray/HasCest.php +++ b/tests/unit/Translate/Adapter/NativeArray/HasCest.php @@ -43,8 +43,6 @@ public function translateAdapterNativeArrayHas(UnitTester $I) ] ); - $expected = $translator->exists('hi'); - $I->assertTrue($expected); $expected = $translator->has('hi'); $I->assertTrue($expected); }