diff --git a/ext/config.m4 b/ext/config.m4 index e16cd66697f..0240ecc63a3 100644 --- a/ext/config.m4 +++ b/ext/config.m4 @@ -14,7 +14,6 @@ if test "$PHP_PHALCON" = "yes"; then phalcon/events/eventsawareinterface.zep.c phalcon/validation/validatorinterface.zep.c phalcon/validation/abstractvalidator.zep.c - phalcon/di/abstractinjectionaware.zep.c phalcon/storage/adapter/adapterinterface.zep.c phalcon/di/injectable.zep.c phalcon/factory/abstractfactory.zep.c @@ -41,6 +40,7 @@ if test "$PHP_PHALCON" = "yes"; then phalcon/http/message/abstractmessage.zep.c phalcon/logger/adapter/adapterinterface.zep.c phalcon/logger/formatter/formatterinterface.zep.c + phalcon/mvc/entityinterface.zep.c phalcon/mvc/model/resultsetinterface.zep.c phalcon/paginator/adapter/adapterinterface.zep.c phalcon/translate/adapter/adapterinterface.zep.c @@ -55,6 +55,7 @@ if test "$PHP_PHALCON" = "yes"; then phalcon/image/adapter/adapterinterface.zep.c phalcon/logger/adapter/abstractadapter.zep.c phalcon/logger/formatter/abstractformatter.zep.c + phalcon/mvc/collection/behaviorinterface.zep.c phalcon/mvc/model/behaviorinterface.zep.c phalcon/mvc/model/exception.zep.c phalcon/mvc/view/engine/engineinterface.zep.c @@ -75,7 +76,7 @@ if test "$PHP_PHALCON" = "yes"; then phalcon/flash/abstractflash.zep.c phalcon/http/message/abstractrequest.zep.c phalcon/image/adapter/abstractadapter.zep.c - phalcon/mvc/entityinterface.zep.c + phalcon/mvc/collection/behavior.zep.c phalcon/mvc/model/behavior.zep.c phalcon/mvc/model/metadata/strategyinterface.zep.c phalcon/mvc/model/resultinterface.zep.c @@ -114,6 +115,7 @@ if test "$PHP_PHALCON" = "yes"; then phalcon/http/response/headersinterface.zep.c phalcon/http/responseinterface.zep.c phalcon/messages/messageinterface.zep.c + phalcon/mvc/collectioninterface.zep.c phalcon/mvc/controllerinterface.zep.c phalcon/mvc/dispatcherinterface.zep.c phalcon/mvc/micro/collectioninterface.zep.c @@ -284,7 +286,6 @@ if test "$PHP_PHALCON" = "yes"; then phalcon/forms/manager.zep.c phalcon/helper/arr.zep.c phalcon/helper/exception.zep.c - phalcon/helper/fs.zep.c phalcon/helper/number.zep.c phalcon/helper/str.zep.c phalcon/html/attributes.zep.c @@ -353,6 +354,13 @@ if test "$PHP_PHALCON" = "yes"; then phalcon/messages/messages.zep.c phalcon/mvc/application.zep.c phalcon/mvc/application/exception.zep.c + phalcon/mvc/collection.zep.c + phalcon/mvc/collection/behavior/softdelete.zep.c + phalcon/mvc/collection/behavior/timestampable.zep.c + phalcon/mvc/collection/document.zep.c + phalcon/mvc/collection/exception.zep.c + phalcon/mvc/collection/manager.zep.c + phalcon/mvc/collection/managerinterface.zep.c phalcon/mvc/controller.zep.c phalcon/mvc/controller/bindmodelinterface.zep.c phalcon/mvc/dispatcher.zep.c @@ -405,6 +413,7 @@ if test "$PHP_PHALCON" = "yes"; then phalcon/paginator/exception.zep.c phalcon/paginator/paginatorfactory.zep.c phalcon/paginator/repository.zep.c + phalcon/plugin.zep.c phalcon/registry.zep.c phalcon/security.zep.c phalcon/security/exception.zep.c diff --git a/ext/config.w32 b/ext/config.w32 index a94144d6f6f..1d5e169526e 100644 --- a/ext/config.w32 +++ b/ext/config.w32 @@ -14,8 +14,8 @@ if (PHP_PHALCON != "no") { ADD_SOURCES(configure_module_dirname + "/phalcon/mvc/model/query", "scanner.c parser.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/mvc/view/engine/volt", "parser.c scanner.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/url", "utils.c", "phalcon"); - ADD_SOURCES(configure_module_dirname + "/phalcon", "exception.zep.c collection.zep.c config.zep.c di.zep.c cache.zep.c container.zep.c crypt.zep.c debug.zep.c escaper.zep.c kernel.zep.c loader.zep.c logger.zep.c registry.zep.c security.zep.c tag.zep.c text.zep.c url.zep.c validation.zep.c version.zep.c 0__closure.zep.c 1__closure.zep.c 2__closure.zep.c 3__closure.zep.c 4__closure.zep.c", "phalcon"); - ADD_SOURCES(configure_module_dirname + "/phalcon/di", "injectionawareinterface.zep.c abstractinjectionaware.zep.c injectable.zep.c diinterface.zep.c exception.zep.c factorydefault.zep.c serviceinterface.zep.c service.zep.c serviceproviderinterface.zep.c", "phalcon"); + ADD_SOURCES(configure_module_dirname + "/phalcon", "exception.zep.c collection.zep.c config.zep.c di.zep.c cache.zep.c container.zep.c crypt.zep.c debug.zep.c escaper.zep.c kernel.zep.c loader.zep.c logger.zep.c plugin.zep.c registry.zep.c security.zep.c tag.zep.c text.zep.c url.zep.c validation.zep.c version.zep.c 0__closure.zep.c 1__closure.zep.c 2__closure.zep.c 3__closure.zep.c 4__closure.zep.c", "phalcon"); + ADD_SOURCES(configure_module_dirname + "/phalcon/di", "injectionawareinterface.zep.c injectable.zep.c diinterface.zep.c exception.zep.c factorydefault.zep.c serviceinterface.zep.c service.zep.c serviceproviderinterface.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/events", "eventsawareinterface.zep.c eventinterface.zep.c managerinterface.zep.c event.zep.c exception.zep.c manager.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/validation", "validatorinterface.zep.c abstractvalidator.zep.c validatorcompositeinterface.zep.c abstractvalidatorcomposite.zep.c abstractcombinedfieldsvalidator.zep.c validationinterface.zep.c exception.zep.c validatorfactory.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/storage/adapter", "adapterinterface.zep.c abstractadapter.zep.c apcu.zep.c libmemcached.zep.c memory.zep.c redis.zep.c stream.zep.c", "phalcon"); @@ -35,13 +35,14 @@ if (PHP_PHALCON != "no") { ADD_SOURCES(configure_module_dirname + "/phalcon/firewall/adapter", "adapterinterface.zep.c abstractadapter.zep.c acl.zep.c annotations.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/logger/adapter", "adapterinterface.zep.c abstractadapter.zep.c noop.zep.c stream.zep.c syslog.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/logger/formatter", "formatterinterface.zep.c abstractformatter.zep.c json.zep.c line.zep.c syslog.zep.c", "phalcon"); + ADD_SOURCES(configure_module_dirname + "/phalcon/mvc", "entityinterface.zep.c viewbaseinterface.zep.c routerinterface.zep.c collectioninterface.zep.c controllerinterface.zep.c dispatcherinterface.zep.c modelinterface.zep.c router.zep.c viewinterface.zep.c application.zep.c collection.zep.c controller.zep.c dispatcher.zep.c micro.zep.c model.zep.c moduledefinitioninterface.zep.c view.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/paginator/adapter", "adapterinterface.zep.c abstractadapter.zep.c model.zep.c nativearray.zep.c querybuilder.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/translate/adapter", "adapterinterface.zep.c abstractadapter.zep.c csv.zep.c gettext.zep.c nativearray.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/db/adapter/pdo", "abstractpdo.zep.c mysql.zep.c postgresql.zep.c sqlite.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/flash", "flashinterface.zep.c abstractflash.zep.c direct.zep.c exception.zep.c session.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/image/adapter", "adapterinterface.zep.c abstractadapter.zep.c gd.zep.c imagick.zep.c", "phalcon"); + ADD_SOURCES(configure_module_dirname + "/phalcon/mvc/collection", "behaviorinterface.zep.c behavior.zep.c document.zep.c exception.zep.c manager.zep.c managerinterface.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/mvc/view/engine", "engineinterface.zep.c abstractengine.zep.c php.zep.c volt.zep.c", "phalcon"); - ADD_SOURCES(configure_module_dirname + "/phalcon/mvc", "viewbaseinterface.zep.c entityinterface.zep.c routerinterface.zep.c controllerinterface.zep.c dispatcherinterface.zep.c modelinterface.zep.c router.zep.c viewinterface.zep.c application.zep.c controller.zep.c dispatcher.zep.c micro.zep.c model.zep.c moduledefinitioninterface.zep.c view.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/acl/adapter", "adapterinterface.zep.c abstractadapter.zep.c memory.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/application", "abstractapplication.zep.c exception.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/domain/payload", "readableinterface.zep.c writeableinterface.zep.c payloadinterface.zep.c payload.zep.c payloadfactory.zep.c status.zep.c", "phalcon"); @@ -89,7 +90,7 @@ if (PHP_PHALCON != "no") { ADD_SOURCES(configure_module_dirname + "/phalcon/firewall/adapter/micro", "acl.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/firewall", "exception.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/forms", "exception.zep.c form.zep.c manager.zep.c", "phalcon"); - ADD_SOURCES(configure_module_dirname + "/phalcon/helper", "arr.zep.c exception.zep.c fs.zep.c number.zep.c str.zep.c", "phalcon"); + ADD_SOURCES(configure_module_dirname + "/phalcon/helper", "arr.zep.c exception.zep.c number.zep.c str.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/html", "attributes.zep.c breadcrumbs.zep.c exception.zep.c tag.zep.c tagfactory.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/http/cookie", "exception.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/http/message/exception", "invalidargumentexception.zep.c", "phalcon"); @@ -99,6 +100,7 @@ if (PHP_PHALCON != "no") { ADD_SOURCES(configure_module_dirname + "/phalcon/loader", "exception.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/logger", "adapterfactory.zep.c exception.zep.c item.zep.c loggerfactory.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/mvc/application", "exception.zep.c", "phalcon"); + ADD_SOURCES(configure_module_dirname + "/phalcon/mvc/collection/behavior", "softdelete.zep.c timestampable.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/mvc/controller", "bindmodelinterface.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/mvc/dispatcher", "exception.zep.c", "phalcon"); ADD_SOURCES(configure_module_dirname + "/phalcon/mvc/model/behavior", "softdelete.zep.c timestampable.zep.c", "phalcon"); diff --git a/ext/phalcon.c b/ext/phalcon.c index efa72b564be..462f60c0ece 100644 --- a/ext/phalcon.c +++ b/ext/phalcon.c @@ -40,6 +40,7 @@ zend_class_entry *phalcon_db_dialectinterface_ce; zend_class_entry *phalcon_firewall_adapter_adapterinterface_ce; zend_class_entry *phalcon_logger_adapter_adapterinterface_ce; zend_class_entry *phalcon_logger_formatter_formatterinterface_ce; +zend_class_entry *phalcon_mvc_entityinterface_ce; zend_class_entry *phalcon_mvc_model_resultsetinterface_ce; zend_class_entry *phalcon_paginator_adapter_adapterinterface_ce; zend_class_entry *phalcon_translate_adapter_adapterinterface_ce; @@ -47,6 +48,7 @@ zend_class_entry *phalcon_assets_filterinterface_ce; zend_class_entry *phalcon_di_diinterface_ce; zend_class_entry *phalcon_flash_flashinterface_ce; zend_class_entry *phalcon_image_adapter_adapterinterface_ce; +zend_class_entry *phalcon_mvc_collection_behaviorinterface_ce; zend_class_entry *phalcon_mvc_model_behaviorinterface_ce; zend_class_entry *phalcon_mvc_view_engine_engineinterface_ce; zend_class_entry *phalcon_mvc_viewbaseinterface_ce; @@ -54,7 +56,6 @@ zend_class_entry *phalcon_validation_validatorcompositeinterface_ce; zend_class_entry *phalcon_acl_adapter_adapterinterface_ce; zend_class_entry *phalcon_domain_payload_readableinterface_ce; zend_class_entry *phalcon_domain_payload_writeableinterface_ce; -zend_class_entry *phalcon_mvc_entityinterface_ce; zend_class_entry *phalcon_mvc_model_metadata_strategyinterface_ce; zend_class_entry *phalcon_mvc_model_resultinterface_ce; zend_class_entry *phalcon_mvc_routerinterface_ce; @@ -84,6 +85,7 @@ zend_class_entry *phalcon_http_response_cookiesinterface_ce; zend_class_entry *phalcon_http_response_headersinterface_ce; zend_class_entry *phalcon_http_responseinterface_ce; zend_class_entry *phalcon_messages_messageinterface_ce; +zend_class_entry *phalcon_mvc_collectioninterface_ce; zend_class_entry *phalcon_mvc_controllerinterface_ce; zend_class_entry *phalcon_mvc_dispatcherinterface_ce; zend_class_entry *phalcon_mvc_micro_collectioninterface_ce; @@ -109,13 +111,13 @@ zend_class_entry *phalcon_acl_roleaware_ce; zend_class_entry *phalcon_cli_router_routeinterface_ce; zend_class_entry *phalcon_cli_routerinterface_ce; zend_class_entry *phalcon_di_serviceproviderinterface_ce; +zend_class_entry *phalcon_mvc_collection_managerinterface_ce; zend_class_entry *phalcon_mvc_controller_bindmodelinterface_ce; zend_class_entry *phalcon_mvc_micro_middlewareinterface_ce; zend_class_entry *phalcon_mvc_model_binder_bindableinterface_ce; zend_class_entry *phalcon_mvc_moduledefinitioninterface_ce; zend_class_entry *phalcon_exception_ce; zend_class_entry *phalcon_validation_abstractvalidator_ce; -zend_class_entry *phalcon_di_abstractinjectionaware_ce; zend_class_entry *phalcon_di_injectable_ce; zend_class_entry *phalcon_factory_abstractfactory_ce; zend_class_entry *phalcon_forms_element_abstractelement_ce; @@ -149,6 +151,7 @@ zend_class_entry *phalcon_dispatcher_exception_ce; zend_class_entry *phalcon_flash_abstractflash_ce; zend_class_entry *phalcon_http_message_abstractrequest_ce; zend_class_entry *phalcon_image_adapter_abstractadapter_ce; +zend_class_entry *phalcon_mvc_collection_behavior_ce; zend_class_entry *phalcon_mvc_model_behavior_ce; zend_class_entry *phalcon_mvc_model_resultset_ce; zend_class_entry *phalcon_mvc_view_engine_abstractengine_ce; @@ -308,7 +311,6 @@ zend_class_entry *phalcon_forms_form_ce; zend_class_entry *phalcon_forms_manager_ce; zend_class_entry *phalcon_helper_arr_ce; zend_class_entry *phalcon_helper_exception_ce; -zend_class_entry *phalcon_helper_fs_ce; zend_class_entry *phalcon_helper_number_ce; zend_class_entry *phalcon_helper_str_ce; zend_class_entry *phalcon_html_attributes_ce; @@ -377,6 +379,12 @@ zend_class_entry *phalcon_messages_message_ce; zend_class_entry *phalcon_messages_messages_ce; zend_class_entry *phalcon_mvc_application_ce; zend_class_entry *phalcon_mvc_application_exception_ce; +zend_class_entry *phalcon_mvc_collection_behavior_softdelete_ce; +zend_class_entry *phalcon_mvc_collection_behavior_timestampable_ce; +zend_class_entry *phalcon_mvc_collection_ce; +zend_class_entry *phalcon_mvc_collection_document_ce; +zend_class_entry *phalcon_mvc_collection_exception_ce; +zend_class_entry *phalcon_mvc_collection_manager_ce; zend_class_entry *phalcon_mvc_controller_ce; zend_class_entry *phalcon_mvc_dispatcher_ce; zend_class_entry *phalcon_mvc_dispatcher_exception_ce; @@ -425,6 +433,7 @@ zend_class_entry *phalcon_paginator_adapter_querybuilder_ce; zend_class_entry *phalcon_paginator_exception_ce; zend_class_entry *phalcon_paginator_paginatorfactory_ce; zend_class_entry *phalcon_paginator_repository_ce; +zend_class_entry *phalcon_plugin_ce; zend_class_entry *phalcon_registry_ce; zend_class_entry *phalcon_security_ce; zend_class_entry *phalcon_security_exception_ce; @@ -540,6 +549,7 @@ static PHP_MINIT_FUNCTION(phalcon) ZEPHIR_INIT(Phalcon_Firewall_Adapter_AdapterInterface); ZEPHIR_INIT(Phalcon_Logger_Adapter_AdapterInterface); ZEPHIR_INIT(Phalcon_Logger_Formatter_FormatterInterface); + ZEPHIR_INIT(Phalcon_Mvc_EntityInterface); ZEPHIR_INIT(Phalcon_Mvc_Model_ResultsetInterface); ZEPHIR_INIT(Phalcon_Paginator_Adapter_AdapterInterface); ZEPHIR_INIT(Phalcon_Translate_Adapter_AdapterInterface); @@ -547,6 +557,7 @@ static PHP_MINIT_FUNCTION(phalcon) ZEPHIR_INIT(Phalcon_Di_DiInterface); ZEPHIR_INIT(Phalcon_Flash_FlashInterface); ZEPHIR_INIT(Phalcon_Image_Adapter_AdapterInterface); + ZEPHIR_INIT(Phalcon_Mvc_Collection_BehaviorInterface); ZEPHIR_INIT(Phalcon_Mvc_Model_BehaviorInterface); ZEPHIR_INIT(Phalcon_Mvc_ViewBaseInterface); ZEPHIR_INIT(Phalcon_Mvc_View_Engine_EngineInterface); @@ -554,7 +565,6 @@ static PHP_MINIT_FUNCTION(phalcon) ZEPHIR_INIT(Phalcon_Acl_Adapter_AdapterInterface); ZEPHIR_INIT(Phalcon_Domain_Payload_ReadableInterface); ZEPHIR_INIT(Phalcon_Domain_Payload_WriteableInterface); - ZEPHIR_INIT(Phalcon_Mvc_EntityInterface); ZEPHIR_INIT(Phalcon_Mvc_Model_MetaData_StrategyInterface); ZEPHIR_INIT(Phalcon_Mvc_Model_ResultInterface); ZEPHIR_INIT(Phalcon_Mvc_RouterInterface); @@ -584,6 +594,7 @@ static PHP_MINIT_FUNCTION(phalcon) ZEPHIR_INIT(Phalcon_Http_Response_CookiesInterface); ZEPHIR_INIT(Phalcon_Http_Response_HeadersInterface); ZEPHIR_INIT(Phalcon_Messages_MessageInterface); + ZEPHIR_INIT(Phalcon_Mvc_CollectionInterface); ZEPHIR_INIT(Phalcon_Mvc_ControllerInterface); ZEPHIR_INIT(Phalcon_Mvc_DispatcherInterface); ZEPHIR_INIT(Phalcon_Mvc_Micro_CollectionInterface); @@ -609,13 +620,13 @@ static PHP_MINIT_FUNCTION(phalcon) ZEPHIR_INIT(Phalcon_Cli_RouterInterface); ZEPHIR_INIT(Phalcon_Cli_Router_RouteInterface); ZEPHIR_INIT(Phalcon_Di_ServiceProviderInterface); + ZEPHIR_INIT(Phalcon_Mvc_Collection_ManagerInterface); ZEPHIR_INIT(Phalcon_Mvc_Controller_BindModelInterface); ZEPHIR_INIT(Phalcon_Mvc_Micro_MiddlewareInterface); ZEPHIR_INIT(Phalcon_Mvc_Model_Binder_BindableInterface); ZEPHIR_INIT(Phalcon_Mvc_ModuleDefinitionInterface); ZEPHIR_INIT(Phalcon_Exception); ZEPHIR_INIT(Phalcon_Validation_AbstractValidator); - ZEPHIR_INIT(Phalcon_Di_AbstractInjectionAware); ZEPHIR_INIT(Phalcon_Di_Injectable); ZEPHIR_INIT(Phalcon_Factory_AbstractFactory); ZEPHIR_INIT(Phalcon_Forms_Element_AbstractElement); @@ -649,6 +660,7 @@ static PHP_MINIT_FUNCTION(phalcon) ZEPHIR_INIT(Phalcon_Flash_AbstractFlash); ZEPHIR_INIT(Phalcon_Http_Message_AbstractRequest); ZEPHIR_INIT(Phalcon_Image_Adapter_AbstractAdapter); + ZEPHIR_INIT(Phalcon_Mvc_Collection_Behavior); ZEPHIR_INIT(Phalcon_Mvc_Model_Behavior); ZEPHIR_INIT(Phalcon_Mvc_Model_Resultset); ZEPHIR_INIT(Phalcon_Mvc_View_Engine_AbstractEngine); @@ -803,7 +815,6 @@ static PHP_MINIT_FUNCTION(phalcon) ZEPHIR_INIT(Phalcon_Forms_Manager); ZEPHIR_INIT(Phalcon_Helper_Arr); ZEPHIR_INIT(Phalcon_Helper_Exception); - ZEPHIR_INIT(Phalcon_Helper_Fs); ZEPHIR_INIT(Phalcon_Helper_Number); ZEPHIR_INIT(Phalcon_Helper_Str); ZEPHIR_INIT(Phalcon_Html_Attributes); @@ -872,6 +883,12 @@ static PHP_MINIT_FUNCTION(phalcon) ZEPHIR_INIT(Phalcon_Messages_Messages); ZEPHIR_INIT(Phalcon_Mvc_Application); ZEPHIR_INIT(Phalcon_Mvc_Application_Exception); + ZEPHIR_INIT(Phalcon_Mvc_Collection); + ZEPHIR_INIT(Phalcon_Mvc_Collection_Behavior_SoftDelete); + ZEPHIR_INIT(Phalcon_Mvc_Collection_Behavior_Timestampable); + ZEPHIR_INIT(Phalcon_Mvc_Collection_Document); + ZEPHIR_INIT(Phalcon_Mvc_Collection_Exception); + ZEPHIR_INIT(Phalcon_Mvc_Collection_Manager); ZEPHIR_INIT(Phalcon_Mvc_Controller); ZEPHIR_INIT(Phalcon_Mvc_Dispatcher); ZEPHIR_INIT(Phalcon_Mvc_Dispatcher_Exception); @@ -920,6 +937,7 @@ static PHP_MINIT_FUNCTION(phalcon) ZEPHIR_INIT(Phalcon_Paginator_Exception); ZEPHIR_INIT(Phalcon_Paginator_PaginatorFactory); ZEPHIR_INIT(Phalcon_Paginator_Repository); + ZEPHIR_INIT(Phalcon_Plugin); ZEPHIR_INIT(Phalcon_Registry); ZEPHIR_INIT(Phalcon_Security); ZEPHIR_INIT(Phalcon_Security_Exception); diff --git a/ext/phalcon.h b/ext/phalcon.h index 49495d4c156..4341ec838c9 100644 --- a/ext/phalcon.h +++ b/ext/phalcon.h @@ -9,7 +9,6 @@ #include "phalcon/events/eventsawareinterface.zep.h" #include "phalcon/validation/validatorinterface.zep.h" #include "phalcon/validation/abstractvalidator.zep.h" -#include "phalcon/di/abstractinjectionaware.zep.h" #include "phalcon/storage/adapter/adapterinterface.zep.h" #include "phalcon/di/injectable.zep.h" #include "phalcon/factory/abstractfactory.zep.h" @@ -36,6 +35,7 @@ #include "phalcon/http/message/abstractmessage.zep.h" #include "phalcon/logger/adapter/adapterinterface.zep.h" #include "phalcon/logger/formatter/formatterinterface.zep.h" +#include "phalcon/mvc/entityinterface.zep.h" #include "phalcon/mvc/model/resultsetinterface.zep.h" #include "phalcon/paginator/adapter/adapterinterface.zep.h" #include "phalcon/translate/adapter/adapterinterface.zep.h" @@ -50,6 +50,7 @@ #include "phalcon/image/adapter/adapterinterface.zep.h" #include "phalcon/logger/adapter/abstractadapter.zep.h" #include "phalcon/logger/formatter/abstractformatter.zep.h" +#include "phalcon/mvc/collection/behaviorinterface.zep.h" #include "phalcon/mvc/model/behaviorinterface.zep.h" #include "phalcon/mvc/model/exception.zep.h" #include "phalcon/mvc/view/engine/engineinterface.zep.h" @@ -70,7 +71,7 @@ #include "phalcon/flash/abstractflash.zep.h" #include "phalcon/http/message/abstractrequest.zep.h" #include "phalcon/image/adapter/abstractadapter.zep.h" -#include "phalcon/mvc/entityinterface.zep.h" +#include "phalcon/mvc/collection/behavior.zep.h" #include "phalcon/mvc/model/behavior.zep.h" #include "phalcon/mvc/model/metadata/strategyinterface.zep.h" #include "phalcon/mvc/model/resultinterface.zep.h" @@ -109,6 +110,7 @@ #include "phalcon/http/response/headersinterface.zep.h" #include "phalcon/http/responseinterface.zep.h" #include "phalcon/messages/messageinterface.zep.h" +#include "phalcon/mvc/collectioninterface.zep.h" #include "phalcon/mvc/controllerinterface.zep.h" #include "phalcon/mvc/dispatcherinterface.zep.h" #include "phalcon/mvc/micro/collectioninterface.zep.h" @@ -279,7 +281,6 @@ #include "phalcon/forms/manager.zep.h" #include "phalcon/helper/arr.zep.h" #include "phalcon/helper/exception.zep.h" -#include "phalcon/helper/fs.zep.h" #include "phalcon/helper/number.zep.h" #include "phalcon/helper/str.zep.h" #include "phalcon/html/attributes.zep.h" @@ -348,6 +349,13 @@ #include "phalcon/messages/messages.zep.h" #include "phalcon/mvc/application.zep.h" #include "phalcon/mvc/application/exception.zep.h" +#include "phalcon/mvc/collection.zep.h" +#include "phalcon/mvc/collection/behavior/softdelete.zep.h" +#include "phalcon/mvc/collection/behavior/timestampable.zep.h" +#include "phalcon/mvc/collection/document.zep.h" +#include "phalcon/mvc/collection/exception.zep.h" +#include "phalcon/mvc/collection/manager.zep.h" +#include "phalcon/mvc/collection/managerinterface.zep.h" #include "phalcon/mvc/controller.zep.h" #include "phalcon/mvc/controller/bindmodelinterface.zep.h" #include "phalcon/mvc/dispatcher.zep.h" @@ -400,6 +408,7 @@ #include "phalcon/paginator/exception.zep.h" #include "phalcon/paginator/paginatorfactory.zep.h" #include "phalcon/paginator/repository.zep.h" +#include "phalcon/plugin.zep.h" #include "phalcon/registry.zep.h" #include "phalcon/security.zep.h" #include "phalcon/security/exception.zep.h" diff --git a/ext/phalcon/assets/manager.zep.c b/ext/phalcon/assets/manager.zep.c index 2f7f15087ae..6681b926dc9 100644 --- a/ext/phalcon/assets/manager.zep.c +++ b/ext/phalcon/assets/manager.zep.c @@ -38,10 +38,15 @@ */ ZEPHIR_INIT_CLASS(Phalcon_Assets_Manager) { - ZEPHIR_REGISTER_CLASS_EX(Phalcon\\Assets, Manager, phalcon, assets_manager, phalcon_di_abstractinjectionaware_ce, phalcon_assets_manager_method_entry, 0); + ZEPHIR_REGISTER_CLASS(Phalcon\\Assets, Manager, phalcon, assets_manager, phalcon_assets_manager_method_entry, 0); zend_declare_property_null(phalcon_assets_manager_ce, SL("collections"), ZEND_ACC_PROTECTED TSRMLS_CC); + /** + * @var DiInterface + */ + zend_declare_property_null(phalcon_assets_manager_ce, SL("container"), ZEND_ACC_PROTECTED TSRMLS_CC); + /** * Options configure * @var array @@ -53,6 +58,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Assets_Manager) { */ zend_declare_property_bool(phalcon_assets_manager_ce, SL("implicitOutput"), 1, ZEND_ACC_PROTECTED TSRMLS_CC); + zend_class_implements(phalcon_assets_manager_ce TSRMLS_CC, 1, phalcon_di_injectionawareinterface_ce); return SUCCESS; } @@ -573,7 +579,7 @@ PHP_METHOD(Phalcon_Assets_Manager, collectionAssetsByType) { ZEPHIR_INIT_VAR(&filtered); array_init(&filtered); - zephir_is_iterable(&assets, 0, "phalcon/Assets/Manager.zep", 239); + zephir_is_iterable(&assets, 0, "phalcon/Assets/Manager.zep", 244); if (Z_TYPE_P(&assets) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&assets), _0) { @@ -582,7 +588,7 @@ PHP_METHOD(Phalcon_Assets_Manager, collectionAssetsByType) { ZEPHIR_CALL_METHOD(&_2$$3, &asset, "gettype", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_EQUAL(&_2$$3, &type)) { - zephir_array_append(&filtered, &asset, PH_SEPARATE, "phalcon/Assets/Manager.zep", 235); + zephir_array_append(&filtered, &asset, PH_SEPARATE, "phalcon/Assets/Manager.zep", 240); } } ZEND_HASH_FOREACH_END(); } else { @@ -599,7 +605,7 @@ PHP_METHOD(Phalcon_Assets_Manager, collectionAssetsByType) { ZEPHIR_CALL_METHOD(&_3$$5, &asset, "gettype", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_EQUAL(&_3$$5, &type)) { - zephir_array_append(&filtered, &asset, PH_SEPARATE, "phalcon/Assets/Manager.zep", 235); + zephir_array_append(&filtered, &asset, PH_SEPARATE, "phalcon/Assets/Manager.zep", 240); } ZEPHIR_CALL_METHOD(NULL, &assets, "next", NULL, 0); zephir_check_call_status(); @@ -686,7 +692,7 @@ PHP_METHOD(Phalcon_Assets_Manager, get) { ZEPHIR_OBS_VAR(&collection); zephir_read_property(&_0, this_ptr, SL("collections"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!(zephir_array_isset_fetch(&collection, &_0, &id, 0 TSRMLS_CC)))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "The collection does not exist in the manager", "phalcon/Assets/Manager.zep", 269); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "The collection does not exist in the manager", "phalcon/Assets/Manager.zep", 274); return; } RETURN_CCTOR(&collection); @@ -731,6 +737,18 @@ PHP_METHOD(Phalcon_Assets_Manager, getCss) { } +/** + * Returns the internal dependency injector + */ +PHP_METHOD(Phalcon_Assets_Manager, getDI) { + + zval *this_ptr = getThis(); + + + RETURN_MEMBER(getThis(), "container"); + +} + /** * Returns the CSS collection of assets */ @@ -937,7 +955,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { ZEPHIR_CONCAT_SVS(&_3$$10, "Path '", &completeTargetPath, "' is not a valid target path (1)"); ZEPHIR_CALL_METHOD(NULL, &_2$$10, "__construct", NULL, 5, &_3$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$10, "phalcon/Assets/Manager.zep", 432 TSRMLS_CC); + zephir_throw_exception_debug(&_2$$10, "phalcon/Assets/Manager.zep", 445 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -950,13 +968,13 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { ZEPHIR_CONCAT_SVS(&_6$$11, "Path '", &completeTargetPath, "' is not a valid target path (2), is dir."); ZEPHIR_CALL_METHOD(NULL, &_5$$11, "__construct", NULL, 5, &_6$$11); zephir_check_call_status(); - zephir_throw_exception_debug(&_5$$11, "phalcon/Assets/Manager.zep", 438 TSRMLS_CC); + zephir_throw_exception_debug(&_5$$11, "phalcon/Assets/Manager.zep", 451 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } } } - zephir_is_iterable(&assets, 0, "phalcon/Assets/Manager.zep", 696); + zephir_is_iterable(&assets, 0, "phalcon/Assets/Manager.zep", 709); if (Z_TYPE_P(&assets) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&assets), _7) { @@ -980,7 +998,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { ZEPHIR_CONCAT_SVS(&_10$$15, "Asset '", &sourcePath, "' does not have a valid source path"); ZEPHIR_CALL_METHOD(NULL, &_9$$15, "__construct", NULL, 5, &_10$$15); zephir_check_call_status(); - zephir_throw_exception_debug(&_9$$15, "phalcon/Assets/Manager.zep", 476 TSRMLS_CC); + zephir_throw_exception_debug(&_9$$15, "phalcon/Assets/Manager.zep", 489 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -998,7 +1016,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { ZEPHIR_CONCAT_SVS(&_12$$17, "Asset '", &sourcePath, "' does not have a valid target path"); ZEPHIR_CALL_METHOD(NULL, &_11$$17, "__construct", NULL, 5, &_12$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_11$$17, "phalcon/Assets/Manager.zep", 502 TSRMLS_CC); + zephir_throw_exception_debug(&_11$$17, "phalcon/Assets/Manager.zep", 515 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1010,7 +1028,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { ZEPHIR_CONCAT_SVS(&_14$$19, "Asset '", &targetPath, "' have the same source and target paths"); ZEPHIR_CALL_METHOD(NULL, &_13$$19, "__construct", NULL, 5, &_14$$19); zephir_check_call_status(); - zephir_throw_exception_debug(&_13$$19, "phalcon/Assets/Manager.zep", 512 TSRMLS_CC); + zephir_throw_exception_debug(&_13$$19, "phalcon/Assets/Manager.zep", 525 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1080,7 +1098,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { zephir_array_fast_append(&_27$$28, &prefixedPath); ZEPHIR_CPY_WRT(¶meters, &_27$$28); } - zephir_array_append(¶meters, &local, PH_SEPARATE, "phalcon/Assets/Manager.zep", 558); + zephir_array_append(¶meters, &local, PH_SEPARATE, "phalcon/Assets/Manager.zep", 571); ZEPHIR_INIT_NVAR(&html); ZEPHIR_CALL_USER_FUNC_ARRAY(&html, callback, ¶meters); zephir_check_call_status(); @@ -1097,14 +1115,14 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { ZEPHIR_CALL_METHOD(&mustFilter, &asset, "getfilter", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_TRUE(&mustFilter)) { - zephir_is_iterable(&filters, 0, "phalcon/Assets/Manager.zep", 611); + zephir_is_iterable(&filters, 0, "phalcon/Assets/Manager.zep", 624); if (Z_TYPE_P(&filters) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&filters), _28$$32) { ZEPHIR_INIT_NVAR(&filter); ZVAL_COPY(&filter, _28$$32); if (UNEXPECTED(Z_TYPE_P(&filter) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 597); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 610); return; } ZEPHIR_CALL_METHOD(&filteredContent, &filter, "filter", NULL, 0, &content); @@ -1123,7 +1141,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { ZEPHIR_CALL_METHOD(&filter, &filters, "current", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&filter) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 597); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 610); return; } ZEPHIR_CALL_METHOD(&filteredContent, &filter, "filter", NULL, 0, &content); @@ -1212,7 +1230,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { zephir_array_fast_append(&_39$$49, &prefixedPath); ZEPHIR_CPY_WRT(¶meters, &_39$$49); } - zephir_array_append(¶meters, &local, PH_SEPARATE, "phalcon/Assets/Manager.zep", 678); + zephir_array_append(¶meters, &local, PH_SEPARATE, "phalcon/Assets/Manager.zep", 691); ZEPHIR_INIT_NVAR(&html); ZEPHIR_CALL_USER_FUNC_ARRAY(&html, callback, ¶meters); zephir_check_call_status(); @@ -1252,7 +1270,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { ZEPHIR_CONCAT_SVS(&_41$$55, "Asset '", &sourcePath, "' does not have a valid source path"); ZEPHIR_CALL_METHOD(NULL, &_40$$55, "__construct", NULL, 5, &_41$$55); zephir_check_call_status(); - zephir_throw_exception_debug(&_40$$55, "phalcon/Assets/Manager.zep", 476 TSRMLS_CC); + zephir_throw_exception_debug(&_40$$55, "phalcon/Assets/Manager.zep", 489 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1270,7 +1288,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { ZEPHIR_CONCAT_SVS(&_43$$57, "Asset '", &sourcePath, "' does not have a valid target path"); ZEPHIR_CALL_METHOD(NULL, &_42$$57, "__construct", NULL, 5, &_43$$57); zephir_check_call_status(); - zephir_throw_exception_debug(&_42$$57, "phalcon/Assets/Manager.zep", 502 TSRMLS_CC); + zephir_throw_exception_debug(&_42$$57, "phalcon/Assets/Manager.zep", 515 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1282,7 +1300,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { ZEPHIR_CONCAT_SVS(&_45$$59, "Asset '", &targetPath, "' have the same source and target paths"); ZEPHIR_CALL_METHOD(NULL, &_44$$59, "__construct", NULL, 5, &_45$$59); zephir_check_call_status(); - zephir_throw_exception_debug(&_44$$59, "phalcon/Assets/Manager.zep", 512 TSRMLS_CC); + zephir_throw_exception_debug(&_44$$59, "phalcon/Assets/Manager.zep", 525 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1351,7 +1369,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { zephir_array_fast_append(&_55$$68, &prefixedPath); ZEPHIR_CPY_WRT(¶meters, &_55$$68); } - zephir_array_append(¶meters, &local, PH_SEPARATE, "phalcon/Assets/Manager.zep", 558); + zephir_array_append(¶meters, &local, PH_SEPARATE, "phalcon/Assets/Manager.zep", 571); ZEPHIR_INIT_NVAR(&html); ZEPHIR_CALL_USER_FUNC_ARRAY(&html, callback, ¶meters); zephir_check_call_status(); @@ -1368,14 +1386,14 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { ZEPHIR_CALL_METHOD(&mustFilter, &asset, "getfilter", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_TRUE(&mustFilter)) { - zephir_is_iterable(&filters, 0, "phalcon/Assets/Manager.zep", 611); + zephir_is_iterable(&filters, 0, "phalcon/Assets/Manager.zep", 624); if (Z_TYPE_P(&filters) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&filters), _56$$72) { ZEPHIR_INIT_NVAR(&filter); ZVAL_COPY(&filter, _56$$72); if (UNEXPECTED(Z_TYPE_P(&filter) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 597); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 610); return; } ZEPHIR_CALL_METHOD(&filteredContent, &filter, "filter", NULL, 0, &content); @@ -1394,7 +1412,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { ZEPHIR_CALL_METHOD(&filter, &filters, "current", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&filter) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 597); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 610); return; } ZEPHIR_CALL_METHOD(&filteredContent, &filter, "filter", NULL, 0, &content); @@ -1483,7 +1501,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { zephir_array_fast_append(&_67$$89, &prefixedPath); ZEPHIR_CPY_WRT(¶meters, &_67$$89); } - zephir_array_append(¶meters, &local, PH_SEPARATE, "phalcon/Assets/Manager.zep", 678); + zephir_array_append(¶meters, &local, PH_SEPARATE, "phalcon/Assets/Manager.zep", 691); ZEPHIR_INIT_NVAR(&html); ZEPHIR_CALL_USER_FUNC_ARRAY(&html, callback, ¶meters); zephir_check_call_status(); @@ -1546,7 +1564,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) { zephir_array_fast_append(&_72$$97, &prefixedPath); ZEPHIR_CPY_WRT(¶meters, &_72$$97); } - zephir_array_append(¶meters, &local, PH_SEPARATE, "phalcon/Assets/Manager.zep", 740); + zephir_array_append(¶meters, &local, PH_SEPARATE, "phalcon/Assets/Manager.zep", 753); ZEPHIR_INIT_NVAR(&html); ZEPHIR_CALL_USER_FUNC_ARRAY(&html, callback, ¶meters); zephir_check_call_status(); @@ -1710,7 +1728,7 @@ PHP_METHOD(Phalcon_Assets_Manager, outputInline) { ZEPHIR_CALL_METHOD(&join, collection, "getjoin", NULL, 0); zephir_check_call_status(); if (zephir_fast_count_int(&codes TSRMLS_CC)) { - zephir_is_iterable(&codes, 0, "phalcon/Assets/Manager.zep", 832); + zephir_is_iterable(&codes, 0, "phalcon/Assets/Manager.zep", 845); if (Z_TYPE_P(&codes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&codes), _0$$3) { @@ -1720,14 +1738,14 @@ PHP_METHOD(Phalcon_Assets_Manager, outputInline) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(&content, &code, "getcontent", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&filters, 0, "phalcon/Assets/Manager.zep", 823); + zephir_is_iterable(&filters, 0, "phalcon/Assets/Manager.zep", 836); if (Z_TYPE_P(&filters) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&filters), _2$$4) { ZEPHIR_INIT_NVAR(&filter); ZVAL_COPY(&filter, _2$$4); if (UNEXPECTED(Z_TYPE_P(&filter) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 813); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 826); return; } ZEPHIR_CALL_METHOD(&_4$$5, &filter, "filter", NULL, 0, &content); @@ -1746,7 +1764,7 @@ PHP_METHOD(Phalcon_Assets_Manager, outputInline) { ZEPHIR_CALL_METHOD(&filter, &filters, "current", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&filter) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 813); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 826); return; } ZEPHIR_CALL_METHOD(&_5$$7, &filter, "filter", NULL, 0, &content); @@ -1787,14 +1805,14 @@ PHP_METHOD(Phalcon_Assets_Manager, outputInline) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(&content, &code, "getcontent", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&filters, 0, "phalcon/Assets/Manager.zep", 823); + zephir_is_iterable(&filters, 0, "phalcon/Assets/Manager.zep", 836); if (Z_TYPE_P(&filters) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&filters), _13$$11) { ZEPHIR_INIT_NVAR(&filter); ZVAL_COPY(&filter, _13$$11); if (UNEXPECTED(Z_TYPE_P(&filter) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 813); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 826); return; } ZEPHIR_CALL_METHOD(&_15$$12, &filter, "filter", NULL, 0, &content); @@ -1813,7 +1831,7 @@ PHP_METHOD(Phalcon_Assets_Manager, outputInline) { ZEPHIR_CALL_METHOD(&filter, &filters, "current", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&filter) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 813); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "Filter is invalid", "phalcon/Assets/Manager.zep", 826); return; } ZEPHIR_CALL_METHOD(&_16$$14, &filter, "filter", NULL, 0, &content); @@ -2066,6 +2084,24 @@ PHP_METHOD(Phalcon_Assets_Manager, set) { } +/** + * Sets the dependency injector + */ +PHP_METHOD(Phalcon_Assets_Manager, setDI) { + + zval *container, container_sub; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&container_sub); + + zephir_fetch_params_without_memory_grow(1, 0, &container); + + + + zephir_update_property_zval(this_ptr, SL("container"), container); + +} + /** * Sets the manager options */ diff --git a/ext/phalcon/assets/manager.zep.h b/ext/phalcon/assets/manager.zep.h index 0ccb7942c27..0de4836bed8 100644 --- a/ext/phalcon/assets/manager.zep.h +++ b/ext/phalcon/assets/manager.zep.h @@ -18,6 +18,7 @@ PHP_METHOD(Phalcon_Assets_Manager, exists); PHP_METHOD(Phalcon_Assets_Manager, get); PHP_METHOD(Phalcon_Assets_Manager, getCollections); PHP_METHOD(Phalcon_Assets_Manager, getCss); +PHP_METHOD(Phalcon_Assets_Manager, getDI); PHP_METHOD(Phalcon_Assets_Manager, getJs); PHP_METHOD(Phalcon_Assets_Manager, getOptions); PHP_METHOD(Phalcon_Assets_Manager, output); @@ -27,6 +28,7 @@ PHP_METHOD(Phalcon_Assets_Manager, outputInlineCss); PHP_METHOD(Phalcon_Assets_Manager, outputInlineJs); PHP_METHOD(Phalcon_Assets_Manager, outputJs); PHP_METHOD(Phalcon_Assets_Manager, set); +PHP_METHOD(Phalcon_Assets_Manager, setDI); PHP_METHOD(Phalcon_Assets_Manager, setOptions); PHP_METHOD(Phalcon_Assets_Manager, useImplicitOutput); PHP_METHOD(Phalcon_Assets_Manager, getPrefixedPath); @@ -226,6 +228,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_assets_manager_getcss, 0 #endif ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_manager_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_assets_manager_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) +#endif +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_manager_getjs, 0, 0, Phalcon\\Assets\\Collection, 0) #else @@ -320,6 +329,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_assets_manager_set, 0, 2 ZEND_ARG_OBJ_INFO(0, collection, Phalcon\\Assets\\Collection, 0) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_assets_manager_setdi, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_manager_setoptions, 0, 1, Phalcon\\Assets\\Manager, 0) #else @@ -369,6 +382,7 @@ ZEPHIR_INIT_FUNCS(phalcon_assets_manager_method_entry) { PHP_ME(Phalcon_Assets_Manager, get, arginfo_phalcon_assets_manager_get, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Manager, getCollections, arginfo_phalcon_assets_manager_getcollections, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Manager, getCss, arginfo_phalcon_assets_manager_getcss, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Assets_Manager, getDI, arginfo_phalcon_assets_manager_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Manager, getJs, arginfo_phalcon_assets_manager_getjs, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Manager, getOptions, arginfo_phalcon_assets_manager_getoptions, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Manager, output, arginfo_phalcon_assets_manager_output, ZEND_ACC_PUBLIC) @@ -378,6 +392,7 @@ ZEPHIR_INIT_FUNCS(phalcon_assets_manager_method_entry) { PHP_ME(Phalcon_Assets_Manager, outputInlineJs, arginfo_phalcon_assets_manager_outputinlinejs, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Manager, outputJs, arginfo_phalcon_assets_manager_outputjs, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Manager, set, arginfo_phalcon_assets_manager_set, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Assets_Manager, setDI, arginfo_phalcon_assets_manager_setdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Manager, setOptions, arginfo_phalcon_assets_manager_setoptions, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Manager, useImplicitOutput, arginfo_phalcon_assets_manager_useimplicitoutput, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Manager, getPrefixedPath, arginfo_phalcon_assets_manager_getprefixedpath, ZEND_ACC_PRIVATE) diff --git a/ext/phalcon/cli/router.zep.c b/ext/phalcon/cli/router.zep.c index c70d10d8a08..39fede73bd6 100644 --- a/ext/phalcon/cli/router.zep.c +++ b/ext/phalcon/cli/router.zep.c @@ -52,10 +52,12 @@ */ ZEPHIR_INIT_CLASS(Phalcon_Cli_Router) { - ZEPHIR_REGISTER_CLASS_EX(Phalcon\\Cli, Router, phalcon, cli_router, phalcon_di_abstractinjectionaware_ce, phalcon_cli_router_method_entry, 0); + ZEPHIR_REGISTER_CLASS(Phalcon\\Cli, Router, phalcon, cli_router, phalcon_cli_router_method_entry, 0); zend_declare_property_null(phalcon_cli_router_ce, SL("action"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(phalcon_cli_router_ce, SL("container"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(phalcon_cli_router_ce, SL("defaultAction"), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_null(phalcon_cli_router_ce, SL("defaultModule"), ZEND_ACC_PROTECTED TSRMLS_CC); @@ -85,6 +87,8 @@ ZEPHIR_INIT_CLASS(Phalcon_Cli_Router) { zend_declare_property_bool(phalcon_cli_router_ce, SL("wasMatched"), 0, ZEND_ACC_PROTECTED TSRMLS_CC); phalcon_cli_router_ce->create_object = zephir_init_properties_Phalcon_Cli_Router; + + zend_class_implements(phalcon_cli_router_ce TSRMLS_CC, 1, phalcon_di_injectionawareinterface_ce); return SUCCESS; } @@ -130,7 +134,7 @@ PHP_METHOD(Phalcon_Cli_Router, __construct) { ZVAL_STRING(&_2$$3, "#^(?::delimiter)?([a-zA-Z0-9\\_\\-]+)[:delimiter]{0,1}$#"); ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 161, &_2$$3, &_1$$3); zephir_check_call_status(); - zephir_array_append(&routes, &_0$$3, PH_SEPARATE, "phalcon/Cli/Router.zep", 88); + zephir_array_append(&routes, &_0$$3, PH_SEPARATE, "phalcon/Cli/Router.zep", 90); ZEPHIR_INIT_NVAR(&_2$$3); object_init_ex(&_2$$3, phalcon_cli_router_route_ce); ZEPHIR_INIT_VAR(&_3$$3); @@ -142,7 +146,7 @@ PHP_METHOD(Phalcon_Cli_Router, __construct) { ZVAL_STRING(&_4$$3, "#^(?::delimiter)?([a-zA-Z0-9\\_\\-]+):delimiter([a-zA-Z0-9\\.\\_]+)(:delimiter.*)*$#"); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 161, &_4$$3, &_3$$3); zephir_check_call_status(); - zephir_array_append(&routes, &_2$$3, PH_SEPARATE, "phalcon/Cli/Router.zep", 97); + zephir_array_append(&routes, &_2$$3, PH_SEPARATE, "phalcon/Cli/Router.zep", 99); } zephir_update_property_zval(this_ptr, SL("routes"), &routes); ZEPHIR_MM_RESTORE(); @@ -211,6 +215,18 @@ PHP_METHOD(Phalcon_Cli_Router, getActionName) { } +/** + * Returns the internal dependency injector + */ +PHP_METHOD(Phalcon_Cli_Router, getDI) { + + zval *this_ptr = getThis(); + + + RETURN_MEMBER(getThis(), "container"); + +} + /** * Returns the route that matches the handled URI */ @@ -284,7 +300,7 @@ PHP_METHOD(Phalcon_Cli_Router, getRouteById) { zephir_read_property(&_0, this_ptr, SL("routes"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_0, 0, "phalcon/Cli/Router.zep", 177); + zephir_is_iterable(&_0, 0, "phalcon/Cli/Router.zep", 187); if (Z_TYPE_P(&_0) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_0), _1) { @@ -355,7 +371,7 @@ PHP_METHOD(Phalcon_Cli_Router, getRouteByName) { zephir_read_property(&_0, this_ptr, SL("routes"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_0, 0, "phalcon/Cli/Router.zep", 193); + zephir_is_iterable(&_0, 0, "phalcon/Cli/Router.zep", 203); if (Z_TYPE_P(&_0) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_0), _1) { @@ -515,11 +531,11 @@ PHP_METHOD(Phalcon_Cli_Router, handle) { _0$$3 = Z_TYPE_P(arguments) != IS_NULL; } if (UNEXPECTED(_0$$3)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_cli_router_exception_ce, "Arguments must be an array or string", "phalcon/Cli/Router.zep", 232); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_cli_router_exception_ce, "Arguments must be an array or string", "phalcon/Cli/Router.zep", 242); return; } zephir_read_property(&_1$$3, this_ptr, SL("routes"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_1$$3, 0, "phalcon/Cli/Router.zep", 338); + zephir_is_iterable(&_1$$3, 0, "phalcon/Cli/Router.zep", 348); if (Z_TYPE_P(&_1$$3) == IS_ARRAY) { ZEND_HASH_REVERSE_FOREACH_VAL(Z_ARRVAL_P(&_1$$3), _2$$3) { @@ -527,7 +543,7 @@ PHP_METHOD(Phalcon_Cli_Router, handle) { ZVAL_COPY(&route, _2$$3); ZEPHIR_CALL_METHOD(&pattern, &route, "getcompiledpattern", NULL, 0); zephir_check_call_status(); - if (zephir_memnstr_str(&pattern, SL("^"), "phalcon/Cli/Router.zep", 241)) { + if (zephir_memnstr_str(&pattern, SL("^"), "phalcon/Cli/Router.zep", 251)) { ZEPHIR_INIT_NVAR(&routeFound); zephir_preg_match(&routeFound, &pattern, arguments, &matches, 0, 0 , 0 TSRMLS_CC); } else { @@ -539,7 +555,7 @@ PHP_METHOD(Phalcon_Cli_Router, handle) { zephir_check_call_status(); if (Z_TYPE_P(&beforeMatch) != IS_NULL) { if (UNEXPECTED(!(zephir_is_callable(&beforeMatch TSRMLS_CC)))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_cli_router_exception_ce, "Before-Match callback is not callable in matched route", "phalcon/Cli/Router.zep", 260); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_cli_router_exception_ce, "Before-Match callback is not callable in matched route", "phalcon/Cli/Router.zep", 270); return; } ZEPHIR_INIT_NVAR(&_4$$9); @@ -559,7 +575,7 @@ PHP_METHOD(Phalcon_Cli_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/Cli/Router.zep", 325); + zephir_is_iterable(&paths, 0, "phalcon/Cli/Router.zep", 335); if (Z_TYPE_P(&paths) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&paths), _7$$12, _8$$12, _5$$12) { @@ -662,7 +678,7 @@ PHP_METHOD(Phalcon_Cli_Router, handle) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(&pattern, &route, "getcompiledpattern", NULL, 0); zephir_check_call_status(); - if (zephir_memnstr_str(&pattern, SL("^"), "phalcon/Cli/Router.zep", 241)) { + if (zephir_memnstr_str(&pattern, SL("^"), "phalcon/Cli/Router.zep", 251)) { ZEPHIR_INIT_NVAR(&routeFound); zephir_preg_match(&routeFound, &pattern, arguments, &matches, 0, 0 , 0 TSRMLS_CC); } else { @@ -674,7 +690,7 @@ PHP_METHOD(Phalcon_Cli_Router, handle) { zephir_check_call_status(); if (Z_TYPE_P(&beforeMatch) != IS_NULL) { if (UNEXPECTED(!(zephir_is_callable(&beforeMatch TSRMLS_CC)))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_cli_router_exception_ce, "Before-Match callback is not callable in matched route", "phalcon/Cli/Router.zep", 260); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_cli_router_exception_ce, "Before-Match callback is not callable in matched route", "phalcon/Cli/Router.zep", 270); return; } ZEPHIR_INIT_NVAR(&_17$$29); @@ -694,7 +710,7 @@ PHP_METHOD(Phalcon_Cli_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/Cli/Router.zep", 325); + zephir_is_iterable(&paths, 0, "phalcon/Cli/Router.zep", 335); if (Z_TYPE_P(&paths) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&paths), _20$$32, _21$$32, _18$$32) { @@ -992,6 +1008,24 @@ PHP_METHOD(Phalcon_Cli_Router, setDefaultTask) { } +/** + * Sets the dependency injector + */ +PHP_METHOD(Phalcon_Cli_Router, setDI) { + + zval *container, container_sub; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&container_sub); + + zephir_fetch_params_without_memory_grow(1, 0, &container); + + + + zephir_update_property_zval(this_ptr, SL("container"), container); + +} + /** * Checks if the router matches any of the defined routes */ diff --git a/ext/phalcon/cli/router.zep.h b/ext/phalcon/cli/router.zep.h index d3ad257643c..d87011c836f 100644 --- a/ext/phalcon/cli/router.zep.h +++ b/ext/phalcon/cli/router.zep.h @@ -6,6 +6,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Cli_Router); PHP_METHOD(Phalcon_Cli_Router, __construct); PHP_METHOD(Phalcon_Cli_Router, add); PHP_METHOD(Phalcon_Cli_Router, getActionName); +PHP_METHOD(Phalcon_Cli_Router, getDI); PHP_METHOD(Phalcon_Cli_Router, getMatchedRoute); PHP_METHOD(Phalcon_Cli_Router, getMatches); PHP_METHOD(Phalcon_Cli_Router, getModuleName); @@ -19,6 +20,7 @@ PHP_METHOD(Phalcon_Cli_Router, setDefaultAction); PHP_METHOD(Phalcon_Cli_Router, setDefaultModule); PHP_METHOD(Phalcon_Cli_Router, setDefaults); PHP_METHOD(Phalcon_Cli_Router, setDefaultTask); +PHP_METHOD(Phalcon_Cli_Router, setDI); PHP_METHOD(Phalcon_Cli_Router, wasMatched); zend_object *zephir_init_properties_Phalcon_Cli_Router(zend_class_entry *class_type TSRMLS_DC); @@ -50,6 +52,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_cli_router_getactionname #endif ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_cli_router_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_cli_router_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) +#endif +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_cli_router_getmatchedroute, 0, 0, Phalcon\\Cli\\RouteInterface, 0) #else @@ -140,6 +149,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_cli_router_setdefaulttask, 0, 0, 1) #endif ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_cli_router_setdi, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_cli_router_wasmatched, 0, 0, _IS_BOOL, 0) #else @@ -151,6 +164,7 @@ ZEPHIR_INIT_FUNCS(phalcon_cli_router_method_entry) { PHP_ME(Phalcon_Cli_Router, __construct, arginfo_phalcon_cli_router___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Cli_Router, add, arginfo_phalcon_cli_router_add, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Cli_Router, getActionName, arginfo_phalcon_cli_router_getactionname, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Cli_Router, getDI, arginfo_phalcon_cli_router_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Cli_Router, getMatchedRoute, arginfo_phalcon_cli_router_getmatchedroute, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Cli_Router, getMatches, arginfo_phalcon_cli_router_getmatches, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Cli_Router, getModuleName, arginfo_phalcon_cli_router_getmodulename, ZEND_ACC_PUBLIC) @@ -164,6 +178,7 @@ ZEPHIR_INIT_FUNCS(phalcon_cli_router_method_entry) { PHP_ME(Phalcon_Cli_Router, setDefaultModule, arginfo_phalcon_cli_router_setdefaultmodule, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Cli_Router, setDefaults, arginfo_phalcon_cli_router_setdefaults, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Cli_Router, setDefaultTask, arginfo_phalcon_cli_router_setdefaulttask, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Cli_Router, setDI, arginfo_phalcon_cli_router_setdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Cli_Router, wasMatched, arginfo_phalcon_cli_router_wasmatched, ZEND_ACC_PUBLIC) PHP_FE_END }; diff --git a/ext/phalcon/di/abstractinjectionaware.zep.c b/ext/phalcon/di/abstractinjectionaware.zep.c deleted file mode 100644 index 1d6b68f777a..00000000000 --- a/ext/phalcon/di/abstractinjectionaware.zep.c +++ /dev/null @@ -1,75 +0,0 @@ - -#ifdef HAVE_CONFIG_H -#include "../../ext_config.h" -#endif - -#include -#include "../../php_ext.h" -#include "../../ext.h" - -#include -#include -#include - -#include "kernel/main.h" -#include "kernel/object.h" -#include "kernel/memory.h" - - -/** - * This file is part of the Phalcon Framework. - * - * (c) Phalcon Team - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ -/** - * This abstract class offers common access to the DI in a class - */ -ZEPHIR_INIT_CLASS(Phalcon_Di_AbstractInjectionAware) { - - ZEPHIR_REGISTER_CLASS(Phalcon\\Di, AbstractInjectionAware, phalcon, di_abstractinjectionaware, phalcon_di_abstractinjectionaware_method_entry, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); - - /** - * Dependency Injector - * - * @var DiInterface - */ - zend_declare_property_null(phalcon_di_abstractinjectionaware_ce, SL("container"), ZEND_ACC_PROTECTED TSRMLS_CC); - - zend_class_implements(phalcon_di_abstractinjectionaware_ce TSRMLS_CC, 1, phalcon_di_injectionawareinterface_ce); - return SUCCESS; - -} - -/** - * Returns the internal dependency injector - */ -PHP_METHOD(Phalcon_Di_AbstractInjectionAware, getDI) { - - zval *this_ptr = getThis(); - - - RETURN_MEMBER(getThis(), "container"); - -} - -/** - * Sets the dependency injector - */ -PHP_METHOD(Phalcon_Di_AbstractInjectionAware, setDI) { - - zval *container, container_sub; - zval *this_ptr = getThis(); - - ZVAL_UNDEF(&container_sub); - - zephir_fetch_params_without_memory_grow(1, 0, &container); - - - - zephir_update_property_zval(this_ptr, SL("container"), container); - -} - diff --git a/ext/phalcon/di/abstractinjectionaware.zep.h b/ext/phalcon/di/abstractinjectionaware.zep.h deleted file mode 100644 index e3e7d8119ed..00000000000 --- a/ext/phalcon/di/abstractinjectionaware.zep.h +++ /dev/null @@ -1,24 +0,0 @@ - -extern zend_class_entry *phalcon_di_abstractinjectionaware_ce; - -ZEPHIR_INIT_CLASS(Phalcon_Di_AbstractInjectionAware); - -PHP_METHOD(Phalcon_Di_AbstractInjectionAware, getDI); -PHP_METHOD(Phalcon_Di_AbstractInjectionAware, setDI); - -#if PHP_VERSION_ID >= 70200 -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_di_abstractinjectionaware_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_di_abstractinjectionaware_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) -#endif -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_di_abstractinjectionaware_setdi, 0, 0, 1) - ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) -ZEND_END_ARG_INFO() - -ZEPHIR_INIT_FUNCS(phalcon_di_abstractinjectionaware_method_entry) { - PHP_ME(Phalcon_Di_AbstractInjectionAware, getDI, arginfo_phalcon_di_abstractinjectionaware_getdi, ZEND_ACC_PUBLIC) - PHP_ME(Phalcon_Di_AbstractInjectionAware, setDI, arginfo_phalcon_di_abstractinjectionaware_setdi, ZEND_ACC_PUBLIC) - PHP_FE_END -}; diff --git a/ext/phalcon/dispatcher/abstractdispatcher.zep.c b/ext/phalcon/dispatcher/abstractdispatcher.zep.c index 6312ee61a9d..33f674230da 100644 --- a/ext/phalcon/dispatcher/abstractdispatcher.zep.c +++ b/ext/phalcon/dispatcher/abstractdispatcher.zep.c @@ -38,7 +38,7 @@ */ ZEPHIR_INIT_CLASS(Phalcon_Dispatcher_AbstractDispatcher) { - ZEPHIR_REGISTER_CLASS_EX(Phalcon\\Dispatcher, AbstractDispatcher, phalcon, dispatcher_abstractdispatcher, phalcon_di_abstractinjectionaware_ce, phalcon_dispatcher_abstractdispatcher_method_entry, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); + ZEPHIR_REGISTER_CLASS(Phalcon\\Dispatcher, AbstractDispatcher, phalcon, dispatcher_abstractdispatcher, phalcon_dispatcher_abstractdispatcher_method_entry, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); zend_declare_property_null(phalcon_dispatcher_abstractdispatcher_ce, SL("activeHandler"), ZEND_ACC_PROTECTED TSRMLS_CC); @@ -59,6 +59,8 @@ ZEPHIR_INIT_CLASS(Phalcon_Dispatcher_AbstractDispatcher) { */ zend_declare_property_null(phalcon_dispatcher_abstractdispatcher_ce, SL("camelCaseMap"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(phalcon_dispatcher_abstractdispatcher_ce, SL("container"), ZEND_ACC_PROTECTED TSRMLS_CC); + /** * @var string */ @@ -126,6 +128,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Dispatcher_AbstractDispatcher) { phalcon_dispatcher_abstractdispatcher_ce->create_object = zephir_init_properties_Phalcon_Dispatcher_AbstractDispatcher; zend_class_implements(phalcon_dispatcher_abstractdispatcher_ce TSRMLS_CC, 1, phalcon_dispatcher_dispatcherinterface_ce); + zend_class_implements(phalcon_dispatcher_abstractdispatcher_ce TSRMLS_CC, 1, phalcon_di_injectionawareinterface_ce); zend_class_implements(phalcon_dispatcher_abstractdispatcher_ce TSRMLS_CC, 1, phalcon_events_eventsawareinterface_ce); return SUCCESS; @@ -342,7 +345,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, dispatch) { if (ZEPHIR_IS_FALSE_IDENTICAL(&status)) { RETURN_MM_BOOL(0); } - zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 182 TSRMLS_CC); + zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 184 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -416,7 +419,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, dispatch) { if (_23$$15) { continue; } - zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 223 TSRMLS_CC); + zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 225 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -571,7 +574,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, dispatch) { zephir_check_call_status(); continue; } - zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 364 TSRMLS_CC); + zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 366 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -615,7 +618,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, dispatch) { zephir_check_call_status(); continue; } - zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 383 TSRMLS_CC); + zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 385 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -658,7 +661,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, dispatch) { if (_79$$43) { continue; } - zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 425 TSRMLS_CC); + zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 427 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -705,7 +708,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, dispatch) { if (_89$$48) { continue; } - zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 444 TSRMLS_CC); + zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 446 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -777,7 +780,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, dispatch) { if (_105$$59) { continue; } - zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 516 TSRMLS_CC); + zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 518 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -818,7 +821,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, dispatch) { if (_115$$64) { continue; } - zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 532 TSRMLS_CC); + zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 534 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -858,7 +861,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, dispatch) { if (_123$$69) { continue; } - zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 549 TSRMLS_CC); + zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 551 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -892,7 +895,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, dispatch) { if (_130$$73) { continue; } - zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 566 TSRMLS_CC); + zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 568 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -922,7 +925,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, dispatch) { if (ZEPHIR_IS_FALSE_IDENTICAL(&_134$$77)) { RETURN_MM_BOOL(0); } - zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 583 TSRMLS_CC); + zephir_throw_exception_debug(&e, "phalcon/Dispatcher/AbstractDispatcher.zep", 585 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -974,7 +977,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, forward) { zephir_read_property(&_0, this_ptr, SL("isControllerInitialize"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(ZEPHIR_IS_TRUE_IDENTICAL(&_0))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_dispatcher_exception_ce, "Forwarding inside a controller's initialize() method is forbidden", "phalcon/Dispatcher/AbstractDispatcher.zep", 617); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_dispatcher_exception_ce, "Forwarding inside a controller's initialize() method is forbidden", "phalcon/Dispatcher/AbstractDispatcher.zep", 619); return; } zephir_read_property(&_1, this_ptr, SL("namespaceName"), PH_NOISY_CC | PH_READONLY); @@ -1125,6 +1128,18 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getDefaultNamespace) { } +/** + * Returns the internal dependency injector + */ +PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getDI) { + + zval *this_ptr = getThis(); + + + RETURN_MEMBER(getThis(), "container"); + +} + /** * Returns the internal event manager */ @@ -1375,6 +1390,24 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setDefaultNamespace) { } +/** + * Sets the dependency injector + */ +PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setDI) { + + zval *container, container_sub; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&container_sub); + + zephir_fetch_params_without_memory_grow(1, 0, &container); + + + + zephir_update_property_zval(this_ptr, SL("container"), container); + +} + /** * Possible class name that will be located to dispatch the request */ @@ -1402,7 +1435,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getHandlerClass) { ZEPHIR_CPY_WRT(&handlerName, &_0); zephir_read_property(&_0, this_ptr, SL("namespaceName"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&namespaceName, &_0); - if (!(zephir_memnstr_str(&handlerName, SL("\\"), "phalcon/Dispatcher/AbstractDispatcher.zep", 868))) { + if (!(zephir_memnstr_str(&handlerName, SL("\\"), "phalcon/Dispatcher/AbstractDispatcher.zep", 886))) { ZEPHIR_CALL_METHOD(&camelizedClass, this_ptr, "tocamelcase", NULL, 0, &handlerName); zephir_check_call_status(); } else { diff --git a/ext/phalcon/dispatcher/abstractdispatcher.zep.h b/ext/phalcon/dispatcher/abstractdispatcher.zep.h index b847c11fec1..42260688c4e 100644 --- a/ext/phalcon/dispatcher/abstractdispatcher.zep.h +++ b/ext/phalcon/dispatcher/abstractdispatcher.zep.h @@ -11,6 +11,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getActionSuffix); PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getActiveMethod); PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getBoundModels); PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getDefaultNamespace); +PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getDI); PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getEventsManager); PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getHandlerSuffix); PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getModelBinder); @@ -23,6 +24,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, isFinished); PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setActionName); PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setDefaultAction); PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setDefaultNamespace); +PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setDI); PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getHandlerClass); PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setParam); PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setParams); @@ -88,6 +90,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_dispatcher_abstractdispa #endif ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_dispatcher_abstractdispatcher_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_dispatcher_abstractdispatcher_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) +#endif +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_dispatcher_abstractdispatcher_geteventsmanager, 0, 0, Phalcon\\Events\\ManagerInterface, 0) #else @@ -175,6 +184,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_dispatcher_abstractdispatcher_setdefaultn #endif ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_dispatcher_abstractdispatcher_setdi, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_dispatcher_abstractdispatcher_gethandlerclass, 0, 0, IS_STRING, 0) #else @@ -268,6 +281,7 @@ ZEPHIR_INIT_FUNCS(phalcon_dispatcher_abstractdispatcher_method_entry) { PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, getActiveMethod, arginfo_phalcon_dispatcher_abstractdispatcher_getactivemethod, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, getBoundModels, arginfo_phalcon_dispatcher_abstractdispatcher_getboundmodels, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, getDefaultNamespace, arginfo_phalcon_dispatcher_abstractdispatcher_getdefaultnamespace, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, getDI, arginfo_phalcon_dispatcher_abstractdispatcher_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, getEventsManager, arginfo_phalcon_dispatcher_abstractdispatcher_geteventsmanager, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, getHandlerSuffix, arginfo_phalcon_dispatcher_abstractdispatcher_gethandlersuffix, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, getModelBinder, arginfo_phalcon_dispatcher_abstractdispatcher_getmodelbinder, ZEND_ACC_PUBLIC) @@ -280,6 +294,7 @@ ZEPHIR_INIT_FUNCS(phalcon_dispatcher_abstractdispatcher_method_entry) { PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, setActionName, arginfo_phalcon_dispatcher_abstractdispatcher_setactionname, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, setDefaultAction, arginfo_phalcon_dispatcher_abstractdispatcher_setdefaultaction, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, setDefaultNamespace, arginfo_phalcon_dispatcher_abstractdispatcher_setdefaultnamespace, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, setDI, arginfo_phalcon_dispatcher_abstractdispatcher_setdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, getHandlerClass, arginfo_phalcon_dispatcher_abstractdispatcher_gethandlerclass, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, setParam, arginfo_phalcon_dispatcher_abstractdispatcher_setparam, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, setParams, arginfo_phalcon_dispatcher_abstractdispatcher_setparams, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/flash/abstractflash.zep.c b/ext/phalcon/flash/abstractflash.zep.c index 8e6b9657842..529dd61157d 100644 --- a/ext/phalcon/flash/abstractflash.zep.c +++ b/ext/phalcon/flash/abstractflash.zep.c @@ -12,13 +12,13 @@ #include #include "kernel/main.h" -#include "kernel/object.h" -#include "kernel/memory.h" #include "kernel/array.h" +#include "kernel/memory.h" +#include "kernel/object.h" #include "kernel/fcall.h" #include "kernel/operators.h" -#include "kernel/exception.h" #include "ext/spl/spl_exceptions.h" +#include "kernel/exception.h" #include "kernel/concat.h" #include "kernel/string.h" @@ -42,7 +42,7 @@ */ ZEPHIR_INIT_CLASS(Phalcon_Flash_AbstractFlash) { - ZEPHIR_REGISTER_CLASS_EX(Phalcon\\Flash, AbstractFlash, phalcon, flash_abstractflash, phalcon_di_abstractinjectionaware_ce, phalcon_flash_abstractflash_method_entry, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); + ZEPHIR_REGISTER_CLASS(Phalcon\\Flash, AbstractFlash, phalcon, flash_abstractflash, phalcon_flash_abstractflash_method_entry, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); /** * @var bool @@ -64,9 +64,8 @@ ZEPHIR_INIT_CLASS(Phalcon_Flash_AbstractFlash) { */ zend_declare_property_string(phalcon_flash_abstractflash_ce, SL("customTemplate"), "", ZEND_ACC_PROTECTED TSRMLS_CC); - /** - * @var EscaperInterface | null - */ + zend_declare_property_null(phalcon_flash_abstractflash_ce, SL("container"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(phalcon_flash_abstractflash_ce, SL("escaperService"), ZEND_ACC_PROTECTED TSRMLS_CC); /** @@ -74,14 +73,12 @@ ZEPHIR_INIT_CLASS(Phalcon_Flash_AbstractFlash) { */ zend_declare_property_bool(phalcon_flash_abstractflash_ce, SL("implicitFlush"), 1, ZEND_ACC_PROTECTED TSRMLS_CC); - /** - * @var array - */ zend_declare_property_null(phalcon_flash_abstractflash_ce, SL("messages"), ZEND_ACC_PROTECTED TSRMLS_CC); phalcon_flash_abstractflash_ce->create_object = zephir_init_properties_Phalcon_Flash_AbstractFlash; zend_class_implements(phalcon_flash_abstractflash_ce TSRMLS_CC, 1, phalcon_flash_flashinterface_ce); + zend_class_implements(phalcon_flash_abstractflash_ce TSRMLS_CC, 1, phalcon_di_injectionawareinterface_ce); return SUCCESS; } @@ -91,32 +88,35 @@ ZEPHIR_INIT_CLASS(Phalcon_Flash_AbstractFlash) { */ PHP_METHOD(Phalcon_Flash_AbstractFlash, __construct) { - zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zval *escaper = NULL, escaper_sub, __$null; + zval *cssClasses = NULL, cssClasses_sub, __$null, _0$$3; zval *this_ptr = getThis(); - ZVAL_UNDEF(&escaper_sub); + ZVAL_UNDEF(&cssClasses_sub); ZVAL_NULL(&__$null); - ZVAL_UNDEF(&_0); + ZVAL_UNDEF(&_0$$3); ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 0, 1, &escaper); + zephir_fetch_params(1, 0, 1, &cssClasses); - if (!escaper) { - escaper = &escaper_sub; - escaper = &__$null; + if (!cssClasses) { + cssClasses = &cssClasses_sub; + ZEPHIR_CPY_WRT(cssClasses, &__$null); + } else { + ZEPHIR_SEPARATE_PARAM(cssClasses); } - zephir_update_property_zval(this_ptr, SL("escaperService"), escaper); - ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 4, 0 TSRMLS_CC); - add_assoc_stringl_ex(&_0, SL("error"), SL("errorMessage")); - add_assoc_stringl_ex(&_0, SL("notice"), SL("noticeMessage")); - add_assoc_stringl_ex(&_0, SL("success"), SL("successMessage")); - add_assoc_stringl_ex(&_0, SL("warning"), SL("warningMessage")); - zephir_update_property_zval(this_ptr, SL("cssClasses"), &_0); + if (Z_TYPE_P(cssClasses) != IS_ARRAY) { + ZEPHIR_INIT_VAR(&_0$$3); + zephir_create_array(&_0$$3, 4, 0 TSRMLS_CC); + add_assoc_stringl_ex(&_0$$3, SL("error"), SL("errorMessage")); + add_assoc_stringl_ex(&_0$$3, SL("notice"), SL("noticeMessage")); + add_assoc_stringl_ex(&_0$$3, SL("success"), SL("successMessage")); + add_assoc_stringl_ex(&_0$$3, SL("warning"), SL("warningMessage")); + ZEPHIR_CPY_WRT(cssClasses, &_0$$3); + } + zephir_update_property_zval(this_ptr, SL("cssClasses"), cssClasses); ZEPHIR_MM_RESTORE(); } @@ -197,75 +197,62 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, getCustomTemplate) { } +/** + * Returns the internal dependency injector + */ +PHP_METHOD(Phalcon_Flash_AbstractFlash, getDI) { + + zval di; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; + zend_long ZEPHIR_LAST_CALL_STATUS; + zephir_fcall_cache_entry *_0 = NULL; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&di); + + ZEPHIR_MM_GROW(); + + ZEPHIR_OBS_VAR(&di); + zephir_read_property(&di, this_ptr, SL("container"), PH_NOISY_CC); + if (Z_TYPE_P(&di) != IS_OBJECT) { + ZEPHIR_CALL_CE_STATIC(&di, phalcon_di_ce, "getdefault", &_0, 0); + zephir_check_call_status(); + } + RETURN_CCTOR(&di); + +} + /** * Returns the Escaper Service */ PHP_METHOD(Phalcon_Flash_AbstractFlash, getEscaperService) { - zval container, _0, _1, _6, _7, _2$$4, _3$$4, _5$$4, _8$$5, _9$$5, _10$$6, _11$$6, _12$$6; + zval escaper, container, _0$$3, _1$$3; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_4 = NULL; zval *this_ptr = getThis(); + ZVAL_UNDEF(&escaper); ZVAL_UNDEF(&container); - ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&_6); - ZVAL_UNDEF(&_7); - ZVAL_UNDEF(&_2$$4); - ZVAL_UNDEF(&_3$$4); - ZVAL_UNDEF(&_5$$4); - ZVAL_UNDEF(&_8$$5); - ZVAL_UNDEF(&_9$$5); - ZVAL_UNDEF(&_10$$6); - ZVAL_UNDEF(&_11$$6); - ZVAL_UNDEF(&_12$$6); + ZVAL_UNDEF(&_0$$3); + ZVAL_UNDEF(&_1$$3); ZEPHIR_MM_GROW(); - zephir_read_property(&_0, this_ptr, SL("escaperService"), PH_NOISY_CC | PH_READONLY); - if (zephir_is_true(&_0)) { - RETURN_MM_MEMBER(getThis(), "escaperService"); - } - zephir_read_property(&_1, this_ptr, SL("container"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&container, &_1); - if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { - ZEPHIR_INIT_VAR(&_2$$4); - object_init_ex(&_2$$4, phalcon_flash_exception_ce); - ZEPHIR_INIT_VAR(&_5$$4); - ZVAL_STRING(&_5$$4, "the 'escaper' service"); - ZEPHIR_CALL_CE_STATIC(&_3$$4, phalcon_flash_exception_ce, "containerservicenotfound", &_4, 0, &_5$$4); + ZEPHIR_OBS_VAR(&escaper); + zephir_read_property(&escaper, this_ptr, SL("escaperService"), PH_NOISY_CC); + if (Z_TYPE_P(&escaper) != IS_OBJECT) { + ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "getdi", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 5, &_3$$4); + ZEPHIR_CPY_WRT(&container, &_0$$3); + ZEPHIR_INIT_VAR(&_1$$3); + ZVAL_STRING(&_1$$3, "escaper"); + ZEPHIR_CALL_METHOD(&_0$$3, &container, "getshared", NULL, 0, &_1$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$4, "phalcon/Flash/AbstractFlash.zep", 131 TSRMLS_CC); - ZEPHIR_MM_RESTORE(); - return; - } - ZEPHIR_INIT_VAR(&_7); - ZVAL_STRING(&_7, "escaper"); - ZEPHIR_CALL_METHOD(&_6, &container, "has", NULL, 0, &_7); - zephir_check_call_status(); - if (UNEXPECTED(zephir_is_true(&_6))) { - ZEPHIR_INIT_VAR(&_9$$5); - ZVAL_STRING(&_9$$5, "escaper"); - ZEPHIR_CALL_METHOD(&_8$$5, &container, "getshared", NULL, 0, &_9$$5); - zephir_check_call_status(); - RETURN_CCTOR(&_8$$5); - } else { - ZEPHIR_INIT_VAR(&_10$$6); - object_init_ex(&_10$$6, phalcon_flash_exception_ce); - ZEPHIR_INIT_VAR(&_12$$6); - ZVAL_STRING(&_12$$6, "the 'escaper' service"); - ZEPHIR_CALL_CE_STATIC(&_11$$6, phalcon_flash_exception_ce, "containerservicenotfound", &_4, 0, &_12$$6); - zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_10$$6, "__construct", NULL, 5, &_11$$6); - zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$6, "phalcon/Flash/AbstractFlash.zep", 139 TSRMLS_CC); - ZEPHIR_MM_RESTORE(); - return; + ZEPHIR_CPY_WRT(&escaper, &_0$$3); + zephir_update_property_zval(this_ptr, SL("escaperService"), &escaper); } + RETURN_CCTOR(&escaper); } @@ -408,6 +395,25 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, setCustomTemplate) { } +/** + * Sets the dependency injector + */ +PHP_METHOD(Phalcon_Flash_AbstractFlash, setDI) { + + zval *container, container_sub; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&container_sub); + + zephir_fetch_params_without_memory_grow(1, 0, &container); + + + + zephir_update_property_zval(this_ptr, SL("container"), container); + RETURN_THISW(); + +} + /** * Sets the Escaper Service */ @@ -529,7 +535,7 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, outputMessage) { ZEPHIR_INIT_VAR(&content); ZVAL_STRING(&content, ""); } - zephir_is_iterable(message, 0, "phalcon/Flash/AbstractFlash.zep", 279); + zephir_is_iterable(message, 0, "phalcon/Flash/AbstractFlash.zep", 294); if (Z_TYPE_P(message) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(message), _1$$3) { diff --git a/ext/phalcon/flash/abstractflash.zep.h b/ext/phalcon/flash/abstractflash.zep.h index 999cc62195a..0366dc9f588 100644 --- a/ext/phalcon/flash/abstractflash.zep.h +++ b/ext/phalcon/flash/abstractflash.zep.h @@ -8,12 +8,14 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, clear); PHP_METHOD(Phalcon_Flash_AbstractFlash, error); PHP_METHOD(Phalcon_Flash_AbstractFlash, getAutoescape); PHP_METHOD(Phalcon_Flash_AbstractFlash, getCustomTemplate); +PHP_METHOD(Phalcon_Flash_AbstractFlash, getDI); PHP_METHOD(Phalcon_Flash_AbstractFlash, getEscaperService); PHP_METHOD(Phalcon_Flash_AbstractFlash, notice); PHP_METHOD(Phalcon_Flash_AbstractFlash, setAutoescape); PHP_METHOD(Phalcon_Flash_AbstractFlash, setAutomaticHtml); PHP_METHOD(Phalcon_Flash_AbstractFlash, setCssClasses); PHP_METHOD(Phalcon_Flash_AbstractFlash, setCustomTemplate); +PHP_METHOD(Phalcon_Flash_AbstractFlash, setDI); PHP_METHOD(Phalcon_Flash_AbstractFlash, setEscaperService); PHP_METHOD(Phalcon_Flash_AbstractFlash, setImplicitFlush); PHP_METHOD(Phalcon_Flash_AbstractFlash, success); @@ -25,7 +27,7 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, prepareHtmlMessage); zend_object *zephir_init_properties_Phalcon_Flash_AbstractFlash(zend_class_entry *class_type TSRMLS_DC); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_flash_abstractflash___construct, 0, 0, 0) - ZEND_ARG_OBJ_INFO(0, escaper, Phalcon\\Escaper\\EscaperInterface, 1) + ZEND_ARG_INFO(0, cssClasses) ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 70200 @@ -54,6 +56,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_abstractflash_getc #endif ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_flash_abstractflash_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_abstractflash_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) +#endif +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_flash_abstractflash_getescaperservice, 0, 0, Phalcon\\Escaper\\EscaperInterface, 0) #else @@ -74,9 +83,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_abstractflash_noti ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 70200 -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_flash_abstractflash_setautoescape, 0, 1, Phalcon\\Flash\\FlashInterface, 0) +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_flash_abstractflash_setautoescape, 0, 1, Phalcon\\Flash\\Flash, 0) #else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_abstractflash_setautoescape, 0, 1, IS_OBJECT, "Phalcon\\Flash\\FlashInterface", 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_abstractflash_setautoescape, 0, 1, IS_OBJECT, "Phalcon\\Flash\\Flash", 0) #endif #if PHP_VERSION_ID >= 70200 ZEND_ARG_TYPE_INFO(0, autoescape, _IS_BOOL, 0) @@ -117,6 +126,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_abstractflash_setc #endif ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_flash_abstractflash_setdi, 0, 1, Phalcon\\Flash\\FlashInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_abstractflash_setdi, 0, 1, IS_OBJECT, "Phalcon\\Flash\\FlashInterface", 0) +#endif + ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_flash_abstractflash_setescaperservice, 0, 1, Phalcon\\Flash\\FlashInterface, 0) #else @@ -217,12 +234,14 @@ ZEPHIR_INIT_FUNCS(phalcon_flash_abstractflash_method_entry) { PHP_ME(Phalcon_Flash_AbstractFlash, error, arginfo_phalcon_flash_abstractflash_error, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Flash_AbstractFlash, getAutoescape, arginfo_phalcon_flash_abstractflash_getautoescape, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Flash_AbstractFlash, getCustomTemplate, arginfo_phalcon_flash_abstractflash_getcustomtemplate, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Flash_AbstractFlash, getDI, arginfo_phalcon_flash_abstractflash_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Flash_AbstractFlash, getEscaperService, arginfo_phalcon_flash_abstractflash_getescaperservice, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Flash_AbstractFlash, notice, arginfo_phalcon_flash_abstractflash_notice, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Flash_AbstractFlash, setAutoescape, arginfo_phalcon_flash_abstractflash_setautoescape, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Flash_AbstractFlash, setAutomaticHtml, arginfo_phalcon_flash_abstractflash_setautomatichtml, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Flash_AbstractFlash, setCssClasses, arginfo_phalcon_flash_abstractflash_setcssclasses, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Flash_AbstractFlash, setCustomTemplate, arginfo_phalcon_flash_abstractflash_setcustomtemplate, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Flash_AbstractFlash, setDI, arginfo_phalcon_flash_abstractflash_setdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Flash_AbstractFlash, setEscaperService, arginfo_phalcon_flash_abstractflash_setescaperservice, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Flash_AbstractFlash, setImplicitFlush, arginfo_phalcon_flash_abstractflash_setimplicitflush, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Flash_AbstractFlash, success, arginfo_phalcon_flash_abstractflash_success, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/flash/direct.zep.h b/ext/phalcon/flash/direct.zep.h index 5a1be1d1e6d..7dea27806f4 100644 --- a/ext/phalcon/flash/direct.zep.h +++ b/ext/phalcon/flash/direct.zep.h @@ -7,9 +7,9 @@ PHP_METHOD(Phalcon_Flash_Direct, message); PHP_METHOD(Phalcon_Flash_Direct, output); #if PHP_VERSION_ID >= 70200 -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_direct_message, 0, 2, IS_STRING, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_direct_message, 0, 2, IS_STRING, 0) #else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_direct_message, 0, 2, IS_STRING, NULL, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_direct_message, 0, 2, IS_STRING, NULL, 0) #endif #if PHP_VERSION_ID >= 70200 ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0) diff --git a/ext/phalcon/flash/flashinterface.zep.h b/ext/phalcon/flash/flashinterface.zep.h index c33a6601d81..251dce6193e 100644 --- a/ext/phalcon/flash/flashinterface.zep.h +++ b/ext/phalcon/flash/flashinterface.zep.h @@ -15,11 +15,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_flashinterface_err #endif ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 70200 -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_flashinterface_message, 0, 2, IS_STRING, 1) -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_flashinterface_message, 0, 2, IS_STRING, NULL, 1) -#endif +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_flash_flashinterface_message, 0, 0, 2) #if PHP_VERSION_ID >= 70200 ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0) #else diff --git a/ext/phalcon/flash/session.zep.c b/ext/phalcon/flash/session.zep.c index d98fef6e402..f14658a0899 100644 --- a/ext/phalcon/flash/session.zep.c +++ b/ext/phalcon/flash/session.zep.c @@ -174,7 +174,7 @@ PHP_METHOD(Phalcon_Flash_Session, message) { zephir_array_update_multi(&messages, &message TSRMLS_CC, SL("za"), 2, &type); ZEPHIR_CALL_METHOD(NULL, this_ptr, "setsessionmessages", NULL, 0, &messages); zephir_check_call_status(); - RETURN_MM_NULL(); + ZEPHIR_MM_RESTORE(); } @@ -215,7 +215,7 @@ PHP_METHOD(Phalcon_Flash_Session, output) { } ZEPHIR_CALL_METHOD(&messages, this_ptr, "getsessionmessages", NULL, 0, &_0); zephir_check_call_status(); - zephir_is_iterable(&messages, 0, "phalcon/Flash/Session.zep", 90); + zephir_is_iterable(&messages, 0, "phalcon/Flash/Session.zep", 88); if (Z_TYPE_P(&messages) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&messages), _3, _4, _1) { diff --git a/ext/phalcon/flash/session.zep.h b/ext/phalcon/flash/session.zep.h index 20db2c8ab8b..ce45ab059d1 100644 --- a/ext/phalcon/flash/session.zep.h +++ b/ext/phalcon/flash/session.zep.h @@ -32,11 +32,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_session_has, 0, 0, ZEND_ARG_INFO(0, type) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 70200 -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_session_message, 0, 2, IS_STRING, 1) -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_flash_session_message, 0, 2, IS_STRING, NULL, 1) -#endif +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_flash_session_message, 0, 0, 2) #if PHP_VERSION_ID >= 70200 ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0) #else diff --git a/ext/phalcon/helper/fs.zep.c b/ext/phalcon/helper/fs.zep.c deleted file mode 100644 index 4cd8416661c..00000000000 --- a/ext/phalcon/helper/fs.zep.c +++ /dev/null @@ -1,136 +0,0 @@ - -#ifdef HAVE_CONFIG_H -#include "../../ext_config.h" -#endif - -#include -#include "../../php_ext.h" -#include "../../ext.h" - -#include -#include -#include - -#include "kernel/main.h" -#include "kernel/memory.h" -#include "kernel/string.h" -#include "kernel/operators.h" -#include "kernel/concat.h" -#include "kernel/fcall.h" -#include "kernel/array.h" -#include "ext/spl/spl_exceptions.h" -#include "kernel/exception.h" -#include "kernel/object.h" - - -/** - * This file is part of the Phalcon. - * - * (c) Phalcon Team - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -/** - * This class offers file operation helper - */ -ZEPHIR_INIT_CLASS(Phalcon_Helper_Fs) { - - ZEPHIR_REGISTER_CLASS(Phalcon\\Helper, Fs, phalcon, helper_fs, phalcon_helper_fs_method_entry, 0); - - return SUCCESS; - -} - -/** - * Gets the filename from a given path, Same as PHP's basename() but has non-ASCII support. - * PHP's basename() does not properly support streams or filenames beginning with a non-US-ASCII character. - * see https://bugs.php.net/bug.php?id=37738 - * - * @param string $uri - * @param string $suffix - * - * @return string - */ -PHP_METHOD(Phalcon_Helper_Fs, basename) { - - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zend_long ZEPHIR_LAST_CALL_STATUS; - zval *uri_param = NULL, *suffix = NULL, suffix_sub, __$null, filename, matches, _0, _1, _2, _3, _4, _5, _6$$3, _7$$3, _8$$3, _9$$3; - zval uri; - zval *this_ptr = getThis(); - - ZVAL_UNDEF(&uri); - ZVAL_UNDEF(&suffix_sub); - ZVAL_NULL(&__$null); - ZVAL_UNDEF(&filename); - ZVAL_UNDEF(&matches); - ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&_2); - ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_4); - ZVAL_UNDEF(&_5); - ZVAL_UNDEF(&_6$$3); - ZVAL_UNDEF(&_7$$3); - ZVAL_UNDEF(&_8$$3); - ZVAL_UNDEF(&_9$$3); - - ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 1, 1, &uri_param, &suffix); - - if (UNEXPECTED(Z_TYPE_P(uri_param) != IS_STRING && Z_TYPE_P(uri_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'uri' must be of the type string") TSRMLS_CC); - RETURN_MM_NULL(); - } - if (EXPECTED(Z_TYPE_P(uri_param) == IS_STRING)) { - zephir_get_strval(&uri, uri_param); - } else { - ZEPHIR_INIT_VAR(&uri); - ZVAL_EMPTY_STRING(&uri); - } - if (!suffix) { - suffix = &suffix_sub; - suffix = &__$null; - } - - - ZEPHIR_INIT_VAR(&_0); - ZEPHIR_INIT_VAR(&_1); - ZVAL_STRING(&_1, "/"); - zephir_fast_trim(&_0, &uri, &_1, ZEPHIR_TRIM_RIGHT TSRMLS_CC); - zephir_get_strval(&uri, &_0); - ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, "/"); - ZEPHIR_INIT_VAR(&_3); - ZVAL_STRING(&_3, "@"); - ZEPHIR_CALL_FUNCTION(&_4, "preg_quote", NULL, 258, &_2, &_3); - zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_5); - ZEPHIR_CONCAT_SVS(&_5, "@[^", &_4, "]+$@"); - ZEPHIR_INIT_NVAR(&_2); - zephir_preg_match(&_2, &_5, &uri, &matches, 0, 0 , 0 TSRMLS_CC); - if (zephir_is_true(&_2)) { - ZEPHIR_OBS_VAR(&filename); - zephir_array_fetch_long(&filename, &matches, 0, PH_NOISY, "phalcon/Helper/Fs.zep", 36 TSRMLS_CC); - } else { - ZEPHIR_INIT_NVAR(&filename); - ZVAL_STRING(&filename, ""); - } - if (zephir_is_true(suffix)) { - ZEPHIR_INIT_VAR(&_6$$3); - ZVAL_STRING(&_6$$3, "@"); - ZEPHIR_CALL_FUNCTION(&_7$$3, "preg_quote", NULL, 258, suffix, &_6$$3); - zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_8$$3); - ZEPHIR_CONCAT_SVS(&_8$$3, "@", &_7$$3, "$@"); - ZEPHIR_INIT_NVAR(&_6$$3); - ZVAL_STRING(&_6$$3, ""); - ZEPHIR_CALL_FUNCTION(&_9$$3, "preg_replace", NULL, 44, &_8$$3, &_6$$3, &filename); - zephir_check_call_status(); - ZEPHIR_CPY_WRT(&filename, &_9$$3); - } - RETURN_CCTOR(&filename); - -} - diff --git a/ext/phalcon/helper/fs.zep.h b/ext/phalcon/helper/fs.zep.h deleted file mode 100644 index a8d37ce62fa..00000000000 --- a/ext/phalcon/helper/fs.zep.h +++ /dev/null @@ -1,24 +0,0 @@ - -extern zend_class_entry *phalcon_helper_fs_ce; - -ZEPHIR_INIT_CLASS(Phalcon_Helper_Fs); - -PHP_METHOD(Phalcon_Helper_Fs, basename); - -#if PHP_VERSION_ID >= 70200 -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_helper_fs_basename, 0, 1, IS_STRING, 0) -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_helper_fs_basename, 0, 1, IS_STRING, NULL, 0) -#endif -#if PHP_VERSION_ID >= 70200 - ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0) -#else - ZEND_ARG_INFO(0, uri) -#endif - ZEND_ARG_INFO(0, suffix) -ZEND_END_ARG_INFO() - -ZEPHIR_INIT_FUNCS(phalcon_helper_fs_method_entry) { - PHP_ME(Phalcon_Helper_Fs, basename, arginfo_phalcon_helper_fs_basename, ZEND_ACC_FINAL|ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_FE_END -}; diff --git a/ext/phalcon/helper/str.zep.c b/ext/phalcon/helper/str.zep.c index 798af9fda04..cc39afdc624 100644 --- a/ext/phalcon/helper/str.zep.c +++ b/ext/phalcon/helper/str.zep.c @@ -163,12 +163,12 @@ PHP_METHOD(Phalcon_Helper_Str, concat) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_helper_exception_ce, "concat needs at least three parameters", "phalcon/Helper/Str.zep", 80); return; } - ZEPHIR_CALL_CE_STATIC(&delimiter, phalcon_helper_arr_ce, "first", &_0, 259, &arguments); + ZEPHIR_CALL_CE_STATIC(&delimiter, phalcon_helper_arr_ce, "first", &_0, 258, &arguments); zephir_check_call_status(); - ZEPHIR_CALL_CE_STATIC(&_1, phalcon_helper_arr_ce, "sliceright", &_2, 260, &arguments); + ZEPHIR_CALL_CE_STATIC(&_1, phalcon_helper_arr_ce, "sliceright", &_2, 259, &arguments); zephir_check_call_status(); ZEPHIR_CPY_WRT(&arguments, &_1); - ZEPHIR_CALL_CE_STATIC(&first, phalcon_helper_arr_ce, "first", &_0, 259, &arguments); + ZEPHIR_CALL_CE_STATIC(&first, phalcon_helper_arr_ce, "first", &_0, 258, &arguments); zephir_check_call_status(); ZEPHIR_CALL_CE_STATIC(&last, phalcon_helper_arr_ce, "last", &_3, 123, &arguments); zephir_check_call_status(); @@ -178,12 +178,12 @@ PHP_METHOD(Phalcon_Helper_Str, concat) { ZVAL_STRING(&suffix, ""); ZEPHIR_INIT_VAR(&data); array_init(&data); - ZEPHIR_CALL_SELF(&_1, "startswith", &_4, 261, &first, &delimiter); + ZEPHIR_CALL_SELF(&_1, "startswith", &_4, 260, &first, &delimiter); zephir_check_call_status(); if (zephir_is_true(&_1)) { ZEPHIR_CPY_WRT(&prefix, &delimiter); } - ZEPHIR_CALL_SELF(&_5, "endswith", &_6, 262, &last, &delimiter); + ZEPHIR_CALL_SELF(&_5, "endswith", &_6, 261, &last, &delimiter); zephir_check_call_status(); if (zephir_is_true(&_5)) { ZEPHIR_CPY_WRT(&suffix, &delimiter); @@ -353,7 +353,7 @@ PHP_METHOD(Phalcon_Helper_Str, decapitalize) { } if (upperRest) { if ((zephir_function_exists_ex(SL("mb_strtoupper") TSRMLS_CC) == SUCCESS)) { - ZEPHIR_CALL_FUNCTION(&suffix, "mb_strtoupper", NULL, 263, &substr, &encoding); + ZEPHIR_CALL_FUNCTION(&suffix, "mb_strtoupper", NULL, 262, &substr, &encoding); zephir_check_call_status(); } else { ZEPHIR_CALL_METHOD(&suffix, &substr, "upper", NULL, 0); @@ -636,24 +636,24 @@ PHP_METHOD(Phalcon_Helper_Str, dynamic) { } - ZEPHIR_CALL_FUNCTION(&_0, "substr_count", NULL, 264, &text, &leftDelimiter); + ZEPHIR_CALL_FUNCTION(&_0, "substr_count", NULL, 263, &text, &leftDelimiter); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_1, "substr_count", NULL, 264, &text, &rightDelimiter); + ZEPHIR_CALL_FUNCTION(&_1, "substr_count", NULL, 263, &text, &rightDelimiter); zephir_check_call_status(); if (UNEXPECTED(!ZEPHIR_IS_IDENTICAL(&_0, &_1))) { ZEPHIR_INIT_VAR(&_2$$3); object_init_ex(&_2$$3, spl_ce_RuntimeException); ZEPHIR_INIT_VAR(&_3$$3); ZEPHIR_CONCAT_SVS(&_3$$3, "Syntax error in string \"", &text, "\""); - ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 265, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 264, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_2$$3, "phalcon/Helper/Str.zep", 256 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_FUNCTION(&ldS, "preg_quote", NULL, 258, &leftDelimiter); + ZEPHIR_CALL_FUNCTION(&ldS, "preg_quote", NULL, 265, &leftDelimiter); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&rdS, "preg_quote", NULL, 258, &rightDelimiter); + ZEPHIR_CALL_FUNCTION(&rdS, "preg_quote", NULL, 265, &rightDelimiter); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_4); ZEPHIR_CONCAT_SVSVVSVS(&_4, "/", &ldS, "([^", &ldS, &rdS, "]+)", &rdS, "/"); @@ -687,7 +687,7 @@ PHP_METHOD(Phalcon_Helper_Str, dynamic) { zephir_check_call_status(); zephir_array_fetch(&word, &words, &_10$$6, PH_NOISY, "phalcon/Helper/Str.zep", 275 TSRMLS_CC); zephir_array_fetch_long(&_12$$6, &match, 0, PH_NOISY | PH_READONLY, "phalcon/Helper/Str.zep", 276 TSRMLS_CC); - ZEPHIR_CALL_FUNCTION(&sub, "preg_quote", NULL, 258, &_12$$6, &separator); + ZEPHIR_CALL_FUNCTION(&sub, "preg_quote", NULL, 265, &_12$$6, &separator); zephir_check_call_status(); ZEPHIR_INIT_LNVAR(_13$$6); ZEPHIR_CONCAT_SVS(&_13$$6, "/", &sub, "/"); @@ -722,7 +722,7 @@ PHP_METHOD(Phalcon_Helper_Str, dynamic) { zephir_check_call_status(); zephir_array_fetch(&word, &words, &_19$$8, PH_NOISY, "phalcon/Helper/Str.zep", 275 TSRMLS_CC); zephir_array_fetch_long(&_20$$8, &match, 0, PH_NOISY | PH_READONLY, "phalcon/Helper/Str.zep", 276 TSRMLS_CC); - ZEPHIR_CALL_FUNCTION(&sub, "preg_quote", NULL, 258, &_20$$8, &separator); + ZEPHIR_CALL_FUNCTION(&sub, "preg_quote", NULL, 265, &_20$$8, &separator); zephir_check_call_status(); ZEPHIR_INIT_LNVAR(_21$$8); ZEPHIR_CONCAT_SVS(&_21$$8, "/", &sub, "/"); @@ -1256,7 +1256,7 @@ PHP_METHOD(Phalcon_Helper_Str, isUpper) { if ((zephir_function_exists_ex(SL("mb_strtoupper") TSRMLS_CC) == SUCCESS)) { - ZEPHIR_CALL_FUNCTION(&_0$$3, "mb_strtoupper", NULL, 263, &text, &encoding); + ZEPHIR_CALL_FUNCTION(&_0$$3, "mb_strtoupper", NULL, 262, &text, &encoding); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_IDENTICAL(&text, &_0$$3)); } else { @@ -1769,7 +1769,7 @@ PHP_METHOD(Phalcon_Helper_Str, upper) { if ((zephir_function_exists_ex(SL("mb_strtoupper") TSRMLS_CC) == SUCCESS)) { - ZEPHIR_RETURN_CALL_FUNCTION("mb_strtoupper", NULL, 263, &text, &encoding); + ZEPHIR_RETURN_CALL_FUNCTION("mb_strtoupper", NULL, 262, &text, &encoding); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/html/tag.zep.c b/ext/phalcon/html/tag.zep.c index 9f3ccde0925..267806399aa 100644 --- a/ext/phalcon/html/tag.zep.c +++ b/ext/phalcon/html/tag.zep.c @@ -40,7 +40,12 @@ */ ZEPHIR_INIT_CLASS(Phalcon_Html_Tag) { - ZEPHIR_REGISTER_CLASS_EX(Phalcon\\Html, Tag, phalcon, html_tag, phalcon_di_abstractinjectionaware_ce, phalcon_html_tag_method_entry, 0); + ZEPHIR_REGISTER_CLASS(Phalcon\\Html, Tag, phalcon, html_tag, phalcon_html_tag_method_entry, 0); + + /** + * @var DiInterface + */ + zend_declare_property_null(phalcon_html_tag_ce, SL("container"), ZEND_ACC_PROTECTED TSRMLS_CC); /** * @var array @@ -108,6 +113,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Html_Tag) { zephir_declare_class_constant_long(phalcon_html_tag_ce, SL("XHTML5"), 11); + zend_class_implements(phalcon_html_tag_ce TSRMLS_CC, 1, phalcon_di_injectionawareinterface_ce); return SUCCESS; } @@ -694,7 +700,7 @@ PHP_METHOD(Phalcon_Html_Tag, friendlyTitle) { _10$$4 = Z_TYPE_P(&replace) != IS_STRING; } if (UNEXPECTED(_10$$4)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_html_exception_ce, "Parameter replace must be an array or a string", "phalcon/Html/Tag.zep", 335); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_html_exception_ce, "Parameter replace must be an array or a string", "phalcon/Html/Tag.zep", 340); return; } if (Z_TYPE_P(&replace) == IS_STRING) { @@ -748,6 +754,18 @@ PHP_METHOD(Phalcon_Html_Tag, friendlyTitle) { } +/** + * Returns the internal dependency injector + */ +PHP_METHOD(Phalcon_Html_Tag, getDI) { + + zval *this_ptr = getThis(); + + + RETURN_MEMBER(getThis(), "container"); + +} + /** * Get the document type declaration of content. If the docType has not * been set properly, XHTML5 is returned @@ -950,7 +968,7 @@ PHP_METHOD(Phalcon_Html_Tag, getTitle) { if (!(ZEPHIR_IS_EMPTY(&prependTitle))) { ZEPHIR_CALL_FUNCTION(&prependArray$$4, "array_reverse", NULL, 280, &prependTitle); zephir_check_call_status(); - zephir_is_iterable(&prependArray$$4, 0, "phalcon/Html/Tag.zep", 467); + zephir_is_iterable(&prependArray$$4, 0, "phalcon/Html/Tag.zep", 480); if (Z_TYPE_P(&prependArray$$4) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&prependArray$$4), _3$$4) { @@ -958,7 +976,7 @@ PHP_METHOD(Phalcon_Html_Tag, getTitle) { ZVAL_COPY(&item, _3$$4); ZEPHIR_CALL_METHOD(&_5$$5, &escaper, "escapehtml", &_6, 0, &item); zephir_check_call_status(); - zephir_array_append(&items, &_5$$5, PH_SEPARATE, "phalcon/Html/Tag.zep", 465); + zephir_array_append(&items, &_5$$5, PH_SEPARATE, "phalcon/Html/Tag.zep", 478); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &prependArray$$4, "rewind", NULL, 0); @@ -973,7 +991,7 @@ PHP_METHOD(Phalcon_Html_Tag, getTitle) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_7$$6, &escaper, "escapehtml", &_8, 0, &item); zephir_check_call_status(); - zephir_array_append(&items, &_7$$6, PH_SEPARATE, "phalcon/Html/Tag.zep", 465); + zephir_array_append(&items, &_7$$6, PH_SEPARATE, "phalcon/Html/Tag.zep", 478); ZEPHIR_CALL_METHOD(NULL, &prependArray$$4, "next", NULL, 0); zephir_check_call_status(); } @@ -982,13 +1000,13 @@ PHP_METHOD(Phalcon_Html_Tag, getTitle) { } } if (!(ZEPHIR_IS_EMPTY(&title))) { - zephir_array_append(&items, &title, PH_SEPARATE, "phalcon/Html/Tag.zep", 471); + zephir_array_append(&items, &title, PH_SEPARATE, "phalcon/Html/Tag.zep", 484); } if (append) { ZEPHIR_OBS_VAR(&appendTitle); zephir_read_property(&appendTitle, this_ptr, SL("append"), PH_NOISY_CC); if (!(ZEPHIR_IS_EMPTY(&appendTitle))) { - zephir_is_iterable(&appendTitle, 0, "phalcon/Html/Tag.zep", 481); + zephir_is_iterable(&appendTitle, 0, "phalcon/Html/Tag.zep", 494); if (Z_TYPE_P(&appendTitle) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&appendTitle), _9$$9) { @@ -996,7 +1014,7 @@ PHP_METHOD(Phalcon_Html_Tag, getTitle) { ZVAL_COPY(&item, _9$$9); ZEPHIR_CALL_METHOD(&_11$$10, &escaper, "escapehtml", &_12, 0, &item); zephir_check_call_status(); - zephir_array_append(&items, &_11$$10, PH_SEPARATE, "phalcon/Html/Tag.zep", 479); + zephir_array_append(&items, &_11$$10, PH_SEPARATE, "phalcon/Html/Tag.zep", 492); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &appendTitle, "rewind", NULL, 0); @@ -1011,7 +1029,7 @@ PHP_METHOD(Phalcon_Html_Tag, getTitle) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_13$$11, &escaper, "escapehtml", &_14, 0, &item); zephir_check_call_status(); - zephir_array_append(&items, &_13$$11, PH_SEPARATE, "phalcon/Html/Tag.zep", 479); + zephir_array_append(&items, &_13$$11, PH_SEPARATE, "phalcon/Html/Tag.zep", 492); ZEPHIR_CALL_METHOD(NULL, &appendTitle, "next", NULL, 0); zephir_check_call_status(); } @@ -2416,7 +2434,7 @@ PHP_METHOD(Phalcon_Html_Tag, javascript) { zephir_read_property(&_3, this_ptr, SL("docType"), PH_NOISY_CC | PH_READONLY); _7 = ZEPHIR_GE_LONG(&_3, 5); if (_7) { - zephir_array_fetch_string(&_8, ¶meters, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Html/Tag.zep", 1005 TSRMLS_CC); + zephir_array_fetch_string(&_8, ¶meters, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Html/Tag.zep", 1018 TSRMLS_CC); ZEPHIR_SINIT_VAR(_9); ZVAL_STRING(&_9, "text/javascript"); _7 = ZEPHIR_IS_EQUAL(&_9, &_8); @@ -2849,7 +2867,7 @@ PHP_METHOD(Phalcon_Html_Tag, select) { _4 = !ZEPHIR_IS_STRING_IDENTICAL(data, "object"); } if (UNEXPECTED(_4)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_html_exception_ce, "The dataset must be either an array or a ResultsetInterface", "phalcon/Html/Tag.zep", 1204); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_html_exception_ce, "The dataset must be either an array or a ResultsetInterface", "phalcon/Html/Tag.zep", 1217); return; } if (Z_TYPE_P(data) == IS_OBJECT) { @@ -2866,7 +2884,7 @@ PHP_METHOD(Phalcon_Html_Tag, select) { if (_7$$4) { zephir_array_unset_string(¶meters, SL("using"), PH_SEPARATE); } else { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_html_exception_ce, "The 'using' parameter is not a valid array", "phalcon/Html/Tag.zep", 1222); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_html_exception_ce, "The 'using' parameter is not a valid array", "phalcon/Html/Tag.zep", 1235); return; } } @@ -2925,7 +2943,7 @@ PHP_METHOD(Phalcon_Html_Tag, select) { zephir_check_call_status(); zephir_concat_self(&output, &_15$$11 TSRMLS_CC); } else { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_html_exception_ce, "Invalid data provided to SELECT helper", "phalcon/Html/Tag.zep", 1263); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_html_exception_ce, "Invalid data provided to SELECT helper", "phalcon/Html/Tag.zep", 1276); return; } zephir_concat_self_str(&output, SL("") TSRMLS_CC); @@ -2980,7 +2998,7 @@ PHP_METHOD(Phalcon_Html_Tag, setAttribute) { _0$$3 = Z_TYPE_P(value) == IS_OBJECT; } if (UNEXPECTED(_0$$3)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_html_exception_ce, "Only scalar values can be assigned to UI components", "phalcon/Html/Tag.zep", 1292); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_html_exception_ce, "Only scalar values can be assigned to UI components", "phalcon/Html/Tag.zep", 1305); return; } } @@ -3043,6 +3061,24 @@ PHP_METHOD(Phalcon_Html_Tag, setAttributes) { } +/** + * Sets the dependency injector + */ +PHP_METHOD(Phalcon_Html_Tag, setDI) { + + zval *container, container_sub; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&container_sub); + + zephir_fetch_params_without_memory_grow(1, 0, &container); + + + + zephir_update_property_zval(this_ptr, SL("container"), container); + +} + /** * Set the document type of content */ @@ -3381,10 +3417,10 @@ PHP_METHOD(Phalcon_Html_Tag, textArea) { zephir_array_update_string(¶meters, SL("name"), &_3, PH_COPY | PH_SEPARATE); if (zephir_array_isset_string(¶meters, SL("value"))) { ZEPHIR_OBS_VAR(&content); - zephir_array_fetch_string(&content, ¶meters, SL("value"), PH_NOISY, "phalcon/Html/Tag.zep", 1488 TSRMLS_CC); + zephir_array_fetch_string(&content, ¶meters, SL("value"), PH_NOISY, "phalcon/Html/Tag.zep", 1509 TSRMLS_CC); zephir_array_unset_string(¶meters, SL("value"), PH_SEPARATE); } else { - zephir_array_fetch_string(&_4$$4, ¶meters, SL("id"), PH_NOISY | PH_READONLY, "phalcon/Html/Tag.zep", 1492 TSRMLS_CC); + zephir_array_fetch_string(&_4$$4, ¶meters, SL("id"), PH_NOISY | PH_READONLY, "phalcon/Html/Tag.zep", 1513 TSRMLS_CC); ZEPHIR_CALL_METHOD(&content, this_ptr, "getvalue", NULL, 0, &_4$$4, ¶meters); zephir_check_call_status(); } @@ -3450,7 +3486,7 @@ PHP_METHOD(Phalcon_Html_Tag, getService) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_1$$6, "__construct", NULL, 5, &_2$$6); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$6, "phalcon/Html/Tag.zep", 1523 TSRMLS_CC); + zephir_throw_exception_debug(&_1$$6, "phalcon/Html/Tag.zep", 1544 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -3549,7 +3585,7 @@ PHP_METHOD(Phalcon_Html_Tag, renderAttributes) { zephir_check_call_status(); zephir_array_unset_string(&attrs, SL("escape"), PH_SEPARATE); ZEPHIR_CPY_WRT(&newCode, &code); - zephir_is_iterable(&attrs, 0, "phalcon/Html/Tag.zep", 1584); + zephir_is_iterable(&attrs, 0, "phalcon/Html/Tag.zep", 1605); if (Z_TYPE_P(&attrs) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&attrs), _3, _4, _1) { @@ -3579,7 +3615,7 @@ PHP_METHOD(Phalcon_Html_Tag, renderAttributes) { ZEPHIR_CONCAT_SVSVS(&_9$$5, "Value at index: '", &key, "' type: '", &_8$$5, "' cannot be rendered"); ZEPHIR_CALL_METHOD(NULL, &_7$$5, "__construct", &_10, 5, &_9$$5); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$5, "phalcon/Html/Tag.zep", 1571 TSRMLS_CC); + zephir_throw_exception_debug(&_7$$5, "phalcon/Html/Tag.zep", 1592 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -3625,7 +3661,7 @@ PHP_METHOD(Phalcon_Html_Tag, renderAttributes) { ZEPHIR_CONCAT_SVSVS(&_17$$10, "Value at index: '", &key, "' type: '", &_16$$10, "' cannot be rendered"); ZEPHIR_CALL_METHOD(NULL, &_15$$10, "__construct", &_10, 5, &_17$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_15$$10, "phalcon/Html/Tag.zep", 1571 TSRMLS_CC); + zephir_throw_exception_debug(&_15$$10, "phalcon/Html/Tag.zep", 1592 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -3886,7 +3922,7 @@ PHP_METHOD(Phalcon_Html_Tag, renderSelectArray) { ZEPHIR_INIT_VAR(&output); ZVAL_STRING(&output, ""); - zephir_is_iterable(&options, 0, "phalcon/Html/Tag.zep", 1715); + zephir_is_iterable(&options, 0, "phalcon/Html/Tag.zep", 1736); if (Z_TYPE_P(&options) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&options), _2, _3, _0) { @@ -4054,9 +4090,9 @@ PHP_METHOD(Phalcon_Html_Tag, renderSelectResultset) { ZVAL_STRING(&output, ""); if (Z_TYPE_P(using) == IS_ARRAY) { ZEPHIR_OBS_VAR(&optionValue); - zephir_array_fetch_long(&optionValue, using, 0, PH_NOISY, "phalcon/Html/Tag.zep", 1735 TSRMLS_CC); + zephir_array_fetch_long(&optionValue, using, 0, PH_NOISY, "phalcon/Html/Tag.zep", 1756 TSRMLS_CC); ZEPHIR_OBS_VAR(&optionText); - zephir_array_fetch_long(&optionText, using, 1, PH_NOISY, "phalcon/Html/Tag.zep", 1736 TSRMLS_CC); + zephir_array_fetch_long(&optionText, using, 1, PH_NOISY, "phalcon/Html/Tag.zep", 1757 TSRMLS_CC); } _1 = zephir_get_iterator(resultset TSRMLS_CC); _1->funcs->rewind(_1 TSRMLS_CC); @@ -4081,12 +4117,12 @@ PHP_METHOD(Phalcon_Html_Tag, renderSelectResultset) { } } else { if (UNEXPECTED(Z_TYPE_P(&option) != IS_ARRAY)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_html_exception_ce, "Resultset returned an invalid value", "phalcon/Html/Tag.zep", 1754); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_html_exception_ce, "Resultset returned an invalid value", "phalcon/Html/Tag.zep", 1775); return; } - zephir_array_fetch(&_4$$9, &option, &optionValue, PH_NOISY | PH_READONLY, "phalcon/Html/Tag.zep", 1757 TSRMLS_CC); + zephir_array_fetch(&_4$$9, &option, &optionValue, PH_NOISY | PH_READONLY, "phalcon/Html/Tag.zep", 1778 TSRMLS_CC); ZEPHIR_CPY_WRT(&optionValue, &_4$$9); - zephir_array_fetch(&_4$$9, &option, &optionText, PH_NOISY | PH_READONLY, "phalcon/Html/Tag.zep", 1758 TSRMLS_CC); + zephir_array_fetch(&_4$$9, &option, &optionText, PH_NOISY | PH_READONLY, "phalcon/Html/Tag.zep", 1779 TSRMLS_CC); ZEPHIR_CPY_WRT(&optionText, &_4$$9); } ZEPHIR_CALL_METHOD(&_5$$5, &escaper, "escapehtmlattr", &_6, 0, &optionValue); diff --git a/ext/phalcon/html/tag.zep.h b/ext/phalcon/html/tag.zep.h index d3c09526d03..95c0a8e60f2 100644 --- a/ext/phalcon/html/tag.zep.h +++ b/ext/phalcon/html/tag.zep.h @@ -12,6 +12,7 @@ PHP_METHOD(Phalcon_Html_Tag, elementClose); PHP_METHOD(Phalcon_Html_Tag, endForm); PHP_METHOD(Phalcon_Html_Tag, form); PHP_METHOD(Phalcon_Html_Tag, friendlyTitle); +PHP_METHOD(Phalcon_Html_Tag, getDI); PHP_METHOD(Phalcon_Html_Tag, getDocType); PHP_METHOD(Phalcon_Html_Tag, getTitle); PHP_METHOD(Phalcon_Html_Tag, getTitleSeparator); @@ -46,6 +47,7 @@ PHP_METHOD(Phalcon_Html_Tag, reset); PHP_METHOD(Phalcon_Html_Tag, select); PHP_METHOD(Phalcon_Html_Tag, setAttribute); PHP_METHOD(Phalcon_Html_Tag, setAttributes); +PHP_METHOD(Phalcon_Html_Tag, setDI); PHP_METHOD(Phalcon_Html_Tag, setDocType); PHP_METHOD(Phalcon_Html_Tag, setTitle); PHP_METHOD(Phalcon_Html_Tag, setTitleSeparator); @@ -151,6 +153,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_tag_friendlytitle, ZEND_ARG_ARRAY_INFO(0, parameters, 0) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_tag_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_tag_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) +#endif +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_tag_getdoctype, 0, 0, IS_STRING, 0) #else @@ -585,6 +594,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_tag_setattributes, #endif ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_tag_setdi, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_tag_setdoctype, 0, 1, Phalcon\\Html\\Tag, 0) #else @@ -768,6 +781,7 @@ ZEPHIR_INIT_FUNCS(phalcon_html_tag_method_entry) { PHP_ME(Phalcon_Html_Tag, endForm, arginfo_phalcon_html_tag_endform, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Tag, form, arginfo_phalcon_html_tag_form, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Tag, friendlyTitle, arginfo_phalcon_html_tag_friendlytitle, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Html_Tag, getDI, arginfo_phalcon_html_tag_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Tag, getDocType, arginfo_phalcon_html_tag_getdoctype, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Tag, getTitle, arginfo_phalcon_html_tag_gettitle, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Tag, getTitleSeparator, arginfo_phalcon_html_tag_gettitleseparator, ZEND_ACC_PUBLIC) @@ -802,6 +816,7 @@ ZEPHIR_INIT_FUNCS(phalcon_html_tag_method_entry) { PHP_ME(Phalcon_Html_Tag, select, arginfo_phalcon_html_tag_select, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Tag, setAttribute, arginfo_phalcon_html_tag_setattribute, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Tag, setAttributes, arginfo_phalcon_html_tag_setattributes, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Html_Tag, setDI, arginfo_phalcon_html_tag_setdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Tag, setDocType, arginfo_phalcon_html_tag_setdoctype, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Tag, setTitle, arginfo_phalcon_html_tag_settitle, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Tag, setTitleSeparator, arginfo_phalcon_html_tag_settitleseparator, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/http/cookie.zep.c b/ext/phalcon/http/cookie.zep.c index d10207ef283..b0851b26542 100644 --- a/ext/phalcon/http/cookie.zep.c +++ b/ext/phalcon/http/cookie.zep.c @@ -36,7 +36,9 @@ */ ZEPHIR_INIT_CLASS(Phalcon_Http_Cookie) { - ZEPHIR_REGISTER_CLASS_EX(Phalcon\\Http, Cookie, phalcon, http_cookie, phalcon_di_abstractinjectionaware_ce, phalcon_http_cookie_method_entry, 0); + ZEPHIR_REGISTER_CLASS(Phalcon\\Http, Cookie, phalcon, http_cookie, phalcon_http_cookie_method_entry, 0); + + zend_declare_property_null(phalcon_http_cookie_ce, SL("container"), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_null(phalcon_http_cookie_ce, SL("domain"), ZEND_ACC_PROTECTED TSRMLS_CC); @@ -67,6 +69,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Http_Cookie) { zend_declare_property_null(phalcon_http_cookie_ce, SL("value"), ZEND_ACC_PROTECTED TSRMLS_CC); zend_class_implements(phalcon_http_cookie_ce TSRMLS_CC, 1, phalcon_http_cookieinterface_ce); + zend_class_implements(phalcon_http_cookie_ce TSRMLS_CC, 1, phalcon_di_injectionawareinterface_ce); return SUCCESS; } @@ -248,6 +251,18 @@ PHP_METHOD(Phalcon_Http_Cookie, delete) { } +/** + * Returns the internal dependency injector + */ +PHP_METHOD(Phalcon_Http_Cookie, getDI) { + + zval *this_ptr = getThis(); + + + RETURN_MEMBER(getThis(), "container"); + +} + /** * Returns the domain that the cookie is available to */ @@ -458,7 +473,7 @@ PHP_METHOD(Phalcon_Http_Cookie, getValue) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", NULL, 5, &_5$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_4$$7, "phalcon/Http/Cookie.zep", 224 TSRMLS_CC); + zephir_throw_exception_debug(&_4$$7, "phalcon/Http/Cookie.zep", 234 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -468,7 +483,7 @@ PHP_METHOD(Phalcon_Http_Cookie, getValue) { zephir_check_call_status(); ZEPHIR_CPY_WRT(&crypt, &_8$$6); if (UNEXPECTED(Z_TYPE_P(&crypt) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_http_response_exception_ce, "A dependency which implements CryptInterface is required to use encryption", "phalcon/Http/Cookie.zep", 232); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_http_response_exception_ce, "A dependency which implements CryptInterface is required to use encryption", "phalcon/Http/Cookie.zep", 242); return; } zephir_read_property(&_3$$6, this_ptr, SL("signKey"), PH_NOISY_CC | PH_READONLY); @@ -500,7 +515,7 @@ PHP_METHOD(Phalcon_Http_Cookie, getValue) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_12$$15, "__construct", NULL, 5, &_13$$15); zephir_check_call_status(); - zephir_throw_exception_debug(&_12$$15, "phalcon/Http/Cookie.zep", 275 TSRMLS_CC); + zephir_throw_exception_debug(&_12$$15, "phalcon/Http/Cookie.zep", 285 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -682,7 +697,7 @@ PHP_METHOD(Phalcon_Http_Cookie, send) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 5, &_2$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$3, "phalcon/Http/Cookie.zep", 377 TSRMLS_CC); + zephir_throw_exception_debug(&_1$$3, "phalcon/Http/Cookie.zep", 387 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -733,7 +748,7 @@ PHP_METHOD(Phalcon_Http_Cookie, send) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_9$$12, "__construct", NULL, 5, &_10$$12); zephir_check_call_status(); - zephir_throw_exception_debug(&_9$$12, "phalcon/Http/Cookie.zep", 422 TSRMLS_CC); + zephir_throw_exception_debug(&_9$$12, "phalcon/Http/Cookie.zep", 432 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -743,7 +758,7 @@ PHP_METHOD(Phalcon_Http_Cookie, send) { zephir_check_call_status(); ZEPHIR_CPY_WRT(&crypt, &_12$$11); if (UNEXPECTED(Z_TYPE_P(&crypt) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_http_response_exception_ce, "A dependency which implements CryptInterface is required to use encryption", "phalcon/Http/Cookie.zep", 430); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_http_response_exception_ce, "A dependency which implements CryptInterface is required to use encryption", "phalcon/Http/Cookie.zep", 440); return; } zephir_read_property(&_14$$11, this_ptr, SL("signKey"), PH_NOISY_CC | PH_READONLY); @@ -766,6 +781,24 @@ PHP_METHOD(Phalcon_Http_Cookie, send) { } +/** + * Sets the dependency injector + */ +PHP_METHOD(Phalcon_Http_Cookie, setDI) { + + zval *container, container_sub; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&container_sub); + + zephir_fetch_params_without_memory_grow(1, 0, &container); + + + + zephir_update_property_zval(this_ptr, SL("container"), container); + +} + /** * Sets the domain that the cookie is available to */ @@ -1085,7 +1118,7 @@ PHP_METHOD(Phalcon_Http_Cookie, assertSignKeyIsLongEnough) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 5, &_2$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_0$$3, "phalcon/Http/Cookie.zep", 593 TSRMLS_CC); + zephir_throw_exception_debug(&_0$$3, "phalcon/Http/Cookie.zep", 611 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } diff --git a/ext/phalcon/http/cookie.zep.h b/ext/phalcon/http/cookie.zep.h index 8deaed0937d..4b098f85fb5 100644 --- a/ext/phalcon/http/cookie.zep.h +++ b/ext/phalcon/http/cookie.zep.h @@ -6,6 +6,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Http_Cookie); PHP_METHOD(Phalcon_Http_Cookie, __construct); PHP_METHOD(Phalcon_Http_Cookie, __toString); PHP_METHOD(Phalcon_Http_Cookie, delete); +PHP_METHOD(Phalcon_Http_Cookie, getDI); PHP_METHOD(Phalcon_Http_Cookie, getDomain); PHP_METHOD(Phalcon_Http_Cookie, getExpiration); PHP_METHOD(Phalcon_Http_Cookie, getHttpOnly); @@ -16,6 +17,7 @@ PHP_METHOD(Phalcon_Http_Cookie, getValue); PHP_METHOD(Phalcon_Http_Cookie, isUsingEncryption); PHP_METHOD(Phalcon_Http_Cookie, restore); PHP_METHOD(Phalcon_Http_Cookie, send); +PHP_METHOD(Phalcon_Http_Cookie, setDI); PHP_METHOD(Phalcon_Http_Cookie, setDomain); PHP_METHOD(Phalcon_Http_Cookie, setExpiration); PHP_METHOD(Phalcon_Http_Cookie, setHttpOnly); @@ -67,6 +69,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_http_cookie___tostring, #endif ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_cookie_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_http_cookie_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) +#endif +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_http_cookie_getdomain, 0, 0, IS_STRING, 0) #else @@ -135,6 +144,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_http_cookie_send, 0, 0, #endif ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_http_cookie_setdi, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_cookie_setdomain, 0, 1, Phalcon\\Http\\CookieInterface, 0) #else @@ -239,6 +252,7 @@ ZEPHIR_INIT_FUNCS(phalcon_http_cookie_method_entry) { PHP_ME(Phalcon_Http_Cookie, __construct, arginfo_phalcon_http_cookie___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Http_Cookie, __toString, arginfo_phalcon_http_cookie___tostring, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Cookie, delete, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Http_Cookie, getDI, arginfo_phalcon_http_cookie_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Cookie, getDomain, arginfo_phalcon_http_cookie_getdomain, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Cookie, getExpiration, arginfo_phalcon_http_cookie_getexpiration, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Cookie, getHttpOnly, arginfo_phalcon_http_cookie_gethttponly, ZEND_ACC_PUBLIC) @@ -249,6 +263,7 @@ ZEPHIR_INIT_FUNCS(phalcon_http_cookie_method_entry) { PHP_ME(Phalcon_Http_Cookie, isUsingEncryption, arginfo_phalcon_http_cookie_isusingencryption, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Cookie, restore, arginfo_phalcon_http_cookie_restore, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Cookie, send, arginfo_phalcon_http_cookie_send, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Http_Cookie, setDI, arginfo_phalcon_http_cookie_setdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Cookie, setDomain, arginfo_phalcon_http_cookie_setdomain, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Cookie, setExpiration, arginfo_phalcon_http_cookie_setexpiration, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Cookie, setHttpOnly, arginfo_phalcon_http_cookie_sethttponly, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/http/request.zep.c b/ext/phalcon/http/request.zep.c index e07f212d179..acd14433f85 100644 --- a/ext/phalcon/http/request.zep.c +++ b/ext/phalcon/http/request.zep.c @@ -60,7 +60,9 @@ */ ZEPHIR_INIT_CLASS(Phalcon_Http_Request) { - ZEPHIR_REGISTER_CLASS_EX(Phalcon\\Http, Request, phalcon, http_request, phalcon_di_abstractinjectionaware_ce, phalcon_http_request_method_entry, 0); + ZEPHIR_REGISTER_CLASS(Phalcon\\Http, Request, phalcon, http_request, phalcon_http_request_method_entry, 0); + + zend_declare_property_null(phalcon_http_request_ce, SL("container"), ZEND_ACC_PRIVATE TSRMLS_CC); zend_declare_property_null(phalcon_http_request_ce, SL("filterService"), ZEND_ACC_PRIVATE TSRMLS_CC); @@ -86,6 +88,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Http_Request) { phalcon_http_request_ce->create_object = zephir_init_properties_Phalcon_Http_Request; zend_class_implements(phalcon_http_request_ce TSRMLS_CC, 1, phalcon_http_requestinterface_ce); + zend_class_implements(phalcon_http_request_ce TSRMLS_CC, 1, phalcon_di_injectionawareinterface_ce); return SUCCESS; } @@ -410,10 +413,10 @@ PHP_METHOD(Phalcon_Http_Request, getClientAddress) { if (Z_TYPE_P(&address) != IS_STRING) { RETURN_MM_BOOL(0); } - if (zephir_memnstr_str(&address, SL(","), "phalcon/Http/Request.zep", 178)) { + if (zephir_memnstr_str(&address, SL(","), "phalcon/Http/Request.zep", 180)) { ZEPHIR_INIT_VAR(&_0$$7); zephir_fast_explode_str(&_0$$7, SL(","), &address, LONG_MAX TSRMLS_CC); - zephir_array_fetch_long(&_1$$7, &_0$$7, 0, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 183 TSRMLS_CC); + zephir_array_fetch_long(&_1$$7, &_0$$7, 0, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 185 TSRMLS_CC); RETURN_CTOR(&_1$$7); } RETURN_CCTOR(&address); @@ -470,6 +473,18 @@ PHP_METHOD(Phalcon_Http_Request, getContentType) { } +/** + * Returns the internal dependency injector + */ +PHP_METHOD(Phalcon_Http_Request, getDI) { + + zval *this_ptr = getThis(); + + + RETURN_MEMBER(getThis(), "container"); + +} + /** * Gets auth info accepted by the browser/client from * $_SERVER["PHP_AUTH_DIGEST"] @@ -516,15 +531,15 @@ PHP_METHOD(Phalcon_Http_Request, getDigestAuth) { RETURN_CTOR(&auth); } if (Z_TYPE_P(&matches) == IS_ARRAY) { - zephir_is_iterable(&matches, 0, "phalcon/Http/Request.zep", 237); + zephir_is_iterable(&matches, 0, "phalcon/Http/Request.zep", 248); if (Z_TYPE_P(&matches) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&matches), _3$$5) { ZEPHIR_INIT_NVAR(&match); ZVAL_COPY(&match, _3$$5); - zephir_array_fetch_long(&_5$$6, &match, 3, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 235 TSRMLS_CC); + zephir_array_fetch_long(&_5$$6, &match, 3, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 246 TSRMLS_CC); ZEPHIR_OBS_NVAR(&_6$$6); - zephir_array_fetch_long(&_6$$6, &match, 1, PH_NOISY, "phalcon/Http/Request.zep", 235 TSRMLS_CC); + zephir_array_fetch_long(&_6$$6, &match, 1, PH_NOISY, "phalcon/Http/Request.zep", 246 TSRMLS_CC); zephir_array_update_zval(&auth, &_6$$6, &_5$$6, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); } else { @@ -538,9 +553,9 @@ PHP_METHOD(Phalcon_Http_Request, getDigestAuth) { } ZEPHIR_CALL_METHOD(&match, &matches, "current", NULL, 0); zephir_check_call_status(); - zephir_array_fetch_long(&_7$$7, &match, 3, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 235 TSRMLS_CC); + zephir_array_fetch_long(&_7$$7, &match, 3, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 246 TSRMLS_CC); ZEPHIR_OBS_NVAR(&_8$$7); - zephir_array_fetch_long(&_8$$7, &match, 1, PH_NOISY, "phalcon/Http/Request.zep", 235 TSRMLS_CC); + zephir_array_fetch_long(&_8$$7, &match, 1, PH_NOISY, "phalcon/Http/Request.zep", 246 TSRMLS_CC); zephir_array_update_zval(&auth, &_8$$7, &_7$$7, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &matches, "next", NULL, 0); zephir_check_call_status(); @@ -610,7 +625,7 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredQuery) { ZEPHIR_OBS_VAR(&filters); zephir_read_property(&_0, this_ptr, SL("queryFilters"), PH_NOISY_CC | PH_READONLY); - zephir_array_fetch_string(&_1, &_0, SL("get"), PH_READONLY, "phalcon/Http/Request.zep", 250 TSRMLS_CC); + zephir_array_fetch_string(&_1, &_0, SL("get"), PH_READONLY, "phalcon/Http/Request.zep", 261 TSRMLS_CC); if (!(zephir_array_isset_fetch(&filters, &_1, &name, 0 TSRMLS_CC))) { ZEPHIR_INIT_NVAR(&filters); array_init(&filters); @@ -688,7 +703,7 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredPost) { ZEPHIR_OBS_VAR(&filters); zephir_read_property(&_0, this_ptr, SL("queryFilters"), PH_NOISY_CC | PH_READONLY); - zephir_array_fetch_string(&_1, &_0, SL("post"), PH_READONLY, "phalcon/Http/Request.zep", 270 TSRMLS_CC); + zephir_array_fetch_string(&_1, &_0, SL("post"), PH_READONLY, "phalcon/Http/Request.zep", 281 TSRMLS_CC); if (!(zephir_array_isset_fetch(&filters, &_1, &name, 0 TSRMLS_CC))) { ZEPHIR_INIT_NVAR(&filters); array_init(&filters); @@ -766,7 +781,7 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredPut) { ZEPHIR_OBS_VAR(&filters); zephir_read_property(&_0, this_ptr, SL("queryFilters"), PH_NOISY_CC | PH_READONLY); - zephir_array_fetch_string(&_1, &_0, SL("put"), PH_READONLY, "phalcon/Http/Request.zep", 290 TSRMLS_CC); + zephir_array_fetch_string(&_1, &_0, SL("put"), PH_READONLY, "phalcon/Http/Request.zep", 301 TSRMLS_CC); if (!(zephir_array_isset_fetch(&filters, &_1, &name, 0 TSRMLS_CC))) { ZEPHIR_INIT_NVAR(&filters); array_init(&filters); @@ -926,7 +941,7 @@ PHP_METHOD(Phalcon_Http_Request, getHeaders) { zephir_array_update_string(&contentHeaders, SL("CONTENT_MD5"), &__$true, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 348); zephir_check_call_status(); - zephir_is_iterable(&server, 0, "phalcon/Http/Request.zep", 391); + zephir_is_iterable(&server, 0, "phalcon/Http/Request.zep", 402); if (Z_TYPE_P(&server) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&server), _2, _3, _0) { @@ -1150,7 +1165,7 @@ PHP_METHOD(Phalcon_Http_Request, getHttpHost) { zephir_fast_trim(&_4$$5, &host, NULL , ZEPHIR_TRIM_BOTH TSRMLS_CC); ZEPHIR_INIT_NVAR(&host); zephir_fast_strtolower(&host, &_4$$5); - if (zephir_memnstr_str(&host, SL(":"), "phalcon/Http/Request.zep", 465)) { + if (zephir_memnstr_str(&host, SL(":"), "phalcon/Http/Request.zep", 476)) { ZEPHIR_INIT_VAR(&_5$$6); ZVAL_STRING(&_5$$6, "/:[[:digit:]]+$/"); ZEPHIR_INIT_VAR(&_6$$6); @@ -1174,7 +1189,7 @@ PHP_METHOD(Phalcon_Http_Request, getHttpHost) { ZEPHIR_CONCAT_SV(&_13$$7, "Invalid host ", &host); ZEPHIR_CALL_METHOD(NULL, &_12$$7, "__construct", NULL, 349, &_13$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_12$$7, "phalcon/Http/Request.zep", 475 TSRMLS_CC); + zephir_throw_exception_debug(&_12$$7, "phalcon/Http/Request.zep", 486 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1375,7 +1390,7 @@ PHP_METHOD(Phalcon_Http_Request, getPort) { zephir_check_call_status(); RETURN_MM_LONG(zephir_get_intval(&_1$$3)); } - if (zephir_memnstr_str(&host, SL(":"), "phalcon/Http/Request.zep", 582)) { + if (zephir_memnstr_str(&host, SL(":"), "phalcon/Http/Request.zep", 593)) { ZEPHIR_INIT_VAR(&_3$$4); ZVAL_STRING(&_3$$4, ":"); ZEPHIR_CALL_FUNCTION(&pos, "strrpos", NULL, 170, &host, &_3$$4); @@ -1945,7 +1960,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) { array_init(&files); ZEPHIR_CPY_WRT(&superFiles, &_FILES); if (zephir_fast_count_int(&superFiles TSRMLS_CC) > 0) { - zephir_is_iterable(&superFiles, 0, "phalcon/Http/Request.zep", 831); + zephir_is_iterable(&superFiles, 0, "phalcon/Http/Request.zep", 842); if (Z_TYPE_P(&superFiles) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&superFiles), _2$$3, _3$$3, _0$$3) { @@ -1958,16 +1973,16 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) { ZEPHIR_INIT_NVAR(&input); ZVAL_COPY(&input, _0$$3); ZEPHIR_OBS_NVAR(&_4$$4); - zephir_array_fetch_string(&_4$$4, &input, SL("name"), PH_NOISY, "phalcon/Http/Request.zep", 788 TSRMLS_CC); + zephir_array_fetch_string(&_4$$4, &input, SL("name"), PH_NOISY, "phalcon/Http/Request.zep", 799 TSRMLS_CC); if (Z_TYPE_P(&_4$$4) == IS_ARRAY) { - zephir_array_fetch_string(&_5$$5, &input, SL("name"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 790 TSRMLS_CC); - zephir_array_fetch_string(&_6$$5, &input, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 791 TSRMLS_CC); - zephir_array_fetch_string(&_7$$5, &input, SL("tmp_name"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 792 TSRMLS_CC); - zephir_array_fetch_string(&_8$$5, &input, SL("size"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 793 TSRMLS_CC); - zephir_array_fetch_string(&_9$$5, &input, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 794 TSRMLS_CC); + zephir_array_fetch_string(&_5$$5, &input, SL("name"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 801 TSRMLS_CC); + zephir_array_fetch_string(&_6$$5, &input, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 802 TSRMLS_CC); + zephir_array_fetch_string(&_7$$5, &input, SL("tmp_name"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 803 TSRMLS_CC); + zephir_array_fetch_string(&_8$$5, &input, SL("size"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 804 TSRMLS_CC); + zephir_array_fetch_string(&_9$$5, &input, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 805 TSRMLS_CC); ZEPHIR_CALL_METHOD(&smoothInput, this_ptr, "smoothfiles", &_10, 353, &_5$$5, &_6$$5, &_7$$5, &_8$$5, &_9$$5, &prefix); zephir_check_call_status(); - zephir_is_iterable(&smoothInput, 0, "phalcon/Http/Request.zep", 821); + zephir_is_iterable(&smoothInput, 0, "phalcon/Http/Request.zep", 832); if (Z_TYPE_P(&smoothInput) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&smoothInput), _11$$5) { @@ -1975,43 +1990,43 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) { ZVAL_COPY(&file, _11$$5); _13$$6 = onlySuccessful == 0; if (!(_13$$6)) { - zephir_array_fetch_string(&_14$$6, &file, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 799 TSRMLS_CC); + zephir_array_fetch_string(&_14$$6, &file, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 810 TSRMLS_CC); _13$$6 = ZEPHIR_IS_LONG(&_14$$6, 0); } if (_13$$6) { ZEPHIR_INIT_NVAR(&dataFile); zephir_create_array(&dataFile, 5, 0 TSRMLS_CC); ZEPHIR_OBS_NVAR(&_15$$7); - zephir_array_fetch_string(&_15$$7, &file, SL("name"), PH_NOISY, "phalcon/Http/Request.zep", 801 TSRMLS_CC); + zephir_array_fetch_string(&_15$$7, &file, SL("name"), PH_NOISY, "phalcon/Http/Request.zep", 812 TSRMLS_CC); zephir_array_update_string(&dataFile, SL("name"), &_15$$7, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_15$$7); - zephir_array_fetch_string(&_15$$7, &file, SL("type"), PH_NOISY, "phalcon/Http/Request.zep", 802 TSRMLS_CC); + zephir_array_fetch_string(&_15$$7, &file, SL("type"), PH_NOISY, "phalcon/Http/Request.zep", 813 TSRMLS_CC); zephir_array_update_string(&dataFile, SL("type"), &_15$$7, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_15$$7); - zephir_array_fetch_string(&_15$$7, &file, SL("tmp_name"), PH_NOISY, "phalcon/Http/Request.zep", 803 TSRMLS_CC); + zephir_array_fetch_string(&_15$$7, &file, SL("tmp_name"), PH_NOISY, "phalcon/Http/Request.zep", 814 TSRMLS_CC); zephir_array_update_string(&dataFile, SL("tmp_name"), &_15$$7, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_15$$7); - zephir_array_fetch_string(&_15$$7, &file, SL("size"), PH_NOISY, "phalcon/Http/Request.zep", 804 TSRMLS_CC); + zephir_array_fetch_string(&_15$$7, &file, SL("size"), PH_NOISY, "phalcon/Http/Request.zep", 815 TSRMLS_CC); zephir_array_update_string(&dataFile, SL("size"), &_15$$7, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_15$$7); - zephir_array_fetch_string(&_15$$7, &file, SL("error"), PH_NOISY, "phalcon/Http/Request.zep", 806 TSRMLS_CC); + zephir_array_fetch_string(&_15$$7, &file, SL("error"), PH_NOISY, "phalcon/Http/Request.zep", 817 TSRMLS_CC); zephir_array_update_string(&dataFile, SL("error"), &_15$$7, PH_COPY | PH_SEPARATE); if (namedKeys == 1) { ZEPHIR_INIT_NVAR(&_16$$8); object_init_ex(&_16$$8, phalcon_http_request_file_ce); - zephir_array_fetch_string(&_17$$8, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 812 TSRMLS_CC); + zephir_array_fetch_string(&_17$$8, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 823 TSRMLS_CC); ZEPHIR_CALL_METHOD(NULL, &_16$$8, "__construct", &_18, 354, &dataFile, &_17$$8); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&_19$$8); - zephir_array_fetch_string(&_19$$8, &file, SL("key"), PH_NOISY, "phalcon/Http/Request.zep", 809 TSRMLS_CC); + zephir_array_fetch_string(&_19$$8, &file, SL("key"), PH_NOISY, "phalcon/Http/Request.zep", 820 TSRMLS_CC); zephir_array_update_zval(&files, &_19$$8, &_16$$8, PH_COPY | PH_SEPARATE); } else { ZEPHIR_INIT_NVAR(&_20$$9); object_init_ex(&_20$$9, phalcon_http_request_file_ce); - zephir_array_fetch_string(&_21$$9, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 817 TSRMLS_CC); + zephir_array_fetch_string(&_21$$9, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 828 TSRMLS_CC); ZEPHIR_CALL_METHOD(NULL, &_20$$9, "__construct", &_18, 354, &dataFile, &_21$$9); zephir_check_call_status(); - zephir_array_append(&files, &_20$$9, PH_SEPARATE, "phalcon/Http/Request.zep", 817); + zephir_array_append(&files, &_20$$9, PH_SEPARATE, "phalcon/Http/Request.zep", 828); } } } ZEND_HASH_FOREACH_END(); @@ -2028,44 +2043,44 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) { zephir_check_call_status(); _22$$10 = onlySuccessful == 0; if (!(_22$$10)) { - zephir_array_fetch_string(&_23$$10, &file, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 799 TSRMLS_CC); + zephir_array_fetch_string(&_23$$10, &file, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 810 TSRMLS_CC); _22$$10 = ZEPHIR_IS_LONG(&_23$$10, 0); } if (_22$$10) { ZEPHIR_INIT_NVAR(&_24$$11); zephir_create_array(&_24$$11, 5, 0 TSRMLS_CC); ZEPHIR_OBS_NVAR(&_25$$11); - zephir_array_fetch_string(&_25$$11, &file, SL("name"), PH_NOISY, "phalcon/Http/Request.zep", 801 TSRMLS_CC); + zephir_array_fetch_string(&_25$$11, &file, SL("name"), PH_NOISY, "phalcon/Http/Request.zep", 812 TSRMLS_CC); zephir_array_update_string(&_24$$11, SL("name"), &_25$$11, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_25$$11); - zephir_array_fetch_string(&_25$$11, &file, SL("type"), PH_NOISY, "phalcon/Http/Request.zep", 802 TSRMLS_CC); + zephir_array_fetch_string(&_25$$11, &file, SL("type"), PH_NOISY, "phalcon/Http/Request.zep", 813 TSRMLS_CC); zephir_array_update_string(&_24$$11, SL("type"), &_25$$11, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_25$$11); - zephir_array_fetch_string(&_25$$11, &file, SL("tmp_name"), PH_NOISY, "phalcon/Http/Request.zep", 803 TSRMLS_CC); + zephir_array_fetch_string(&_25$$11, &file, SL("tmp_name"), PH_NOISY, "phalcon/Http/Request.zep", 814 TSRMLS_CC); zephir_array_update_string(&_24$$11, SL("tmp_name"), &_25$$11, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_25$$11); - zephir_array_fetch_string(&_25$$11, &file, SL("size"), PH_NOISY, "phalcon/Http/Request.zep", 804 TSRMLS_CC); + zephir_array_fetch_string(&_25$$11, &file, SL("size"), PH_NOISY, "phalcon/Http/Request.zep", 815 TSRMLS_CC); zephir_array_update_string(&_24$$11, SL("size"), &_25$$11, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_25$$11); - zephir_array_fetch_string(&_25$$11, &file, SL("error"), PH_NOISY, "phalcon/Http/Request.zep", 806 TSRMLS_CC); + zephir_array_fetch_string(&_25$$11, &file, SL("error"), PH_NOISY, "phalcon/Http/Request.zep", 817 TSRMLS_CC); zephir_array_update_string(&_24$$11, SL("error"), &_25$$11, PH_COPY | PH_SEPARATE); ZEPHIR_CPY_WRT(&dataFile, &_24$$11); if (namedKeys == 1) { ZEPHIR_INIT_NVAR(&_26$$12); object_init_ex(&_26$$12, phalcon_http_request_file_ce); - zephir_array_fetch_string(&_27$$12, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 812 TSRMLS_CC); + zephir_array_fetch_string(&_27$$12, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 823 TSRMLS_CC); ZEPHIR_CALL_METHOD(NULL, &_26$$12, "__construct", &_18, 354, &dataFile, &_27$$12); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&_28$$12); - zephir_array_fetch_string(&_28$$12, &file, SL("key"), PH_NOISY, "phalcon/Http/Request.zep", 809 TSRMLS_CC); + zephir_array_fetch_string(&_28$$12, &file, SL("key"), PH_NOISY, "phalcon/Http/Request.zep", 820 TSRMLS_CC); zephir_array_update_zval(&files, &_28$$12, &_26$$12, PH_COPY | PH_SEPARATE); } else { ZEPHIR_INIT_NVAR(&_29$$13); object_init_ex(&_29$$13, phalcon_http_request_file_ce); - zephir_array_fetch_string(&_30$$13, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 817 TSRMLS_CC); + zephir_array_fetch_string(&_30$$13, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 828 TSRMLS_CC); ZEPHIR_CALL_METHOD(NULL, &_29$$13, "__construct", &_18, 354, &dataFile, &_30$$13); zephir_check_call_status(); - zephir_array_append(&files, &_29$$13, PH_SEPARATE, "phalcon/Http/Request.zep", 817); + zephir_array_append(&files, &_29$$13, PH_SEPARATE, "phalcon/Http/Request.zep", 828); } } ZEPHIR_CALL_METHOD(NULL, &smoothInput, "next", NULL, 0); @@ -2076,7 +2091,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) { } else { _31$$14 = onlySuccessful == 0; if (!(_31$$14)) { - zephir_array_fetch_string(&_32$$14, &input, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 822 TSRMLS_CC); + zephir_array_fetch_string(&_32$$14, &input, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 833 TSRMLS_CC); _31$$14 = ZEPHIR_IS_LONG(&_32$$14, 0); } if (_31$$14) { @@ -2091,7 +2106,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) { object_init_ex(&_34$$17, phalcon_http_request_file_ce); ZEPHIR_CALL_METHOD(NULL, &_34$$17, "__construct", &_18, 354, &input, &prefix); zephir_check_call_status(); - zephir_array_append(&files, &_34$$17, PH_SEPARATE, "phalcon/Http/Request.zep", 826); + zephir_array_append(&files, &_34$$17, PH_SEPARATE, "phalcon/Http/Request.zep", 837); } } } @@ -2110,16 +2125,16 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) { ZEPHIR_CALL_METHOD(&input, &superFiles, "current", NULL, 0); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&_35$$18); - zephir_array_fetch_string(&_35$$18, &input, SL("name"), PH_NOISY, "phalcon/Http/Request.zep", 788 TSRMLS_CC); + zephir_array_fetch_string(&_35$$18, &input, SL("name"), PH_NOISY, "phalcon/Http/Request.zep", 799 TSRMLS_CC); if (Z_TYPE_P(&_35$$18) == IS_ARRAY) { - zephir_array_fetch_string(&_36$$19, &input, SL("name"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 790 TSRMLS_CC); - zephir_array_fetch_string(&_37$$19, &input, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 791 TSRMLS_CC); - zephir_array_fetch_string(&_38$$19, &input, SL("tmp_name"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 792 TSRMLS_CC); - zephir_array_fetch_string(&_39$$19, &input, SL("size"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 793 TSRMLS_CC); - zephir_array_fetch_string(&_40$$19, &input, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 794 TSRMLS_CC); + zephir_array_fetch_string(&_36$$19, &input, SL("name"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 801 TSRMLS_CC); + zephir_array_fetch_string(&_37$$19, &input, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 802 TSRMLS_CC); + zephir_array_fetch_string(&_38$$19, &input, SL("tmp_name"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 803 TSRMLS_CC); + zephir_array_fetch_string(&_39$$19, &input, SL("size"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 804 TSRMLS_CC); + zephir_array_fetch_string(&_40$$19, &input, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 805 TSRMLS_CC); ZEPHIR_CALL_METHOD(&smoothInput, this_ptr, "smoothfiles", &_10, 353, &_36$$19, &_37$$19, &_38$$19, &_39$$19, &_40$$19, &prefix); zephir_check_call_status(); - zephir_is_iterable(&smoothInput, 0, "phalcon/Http/Request.zep", 821); + zephir_is_iterable(&smoothInput, 0, "phalcon/Http/Request.zep", 832); if (Z_TYPE_P(&smoothInput) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&smoothInput), _41$$19) { @@ -2127,44 +2142,44 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) { ZVAL_COPY(&file, _41$$19); _43$$20 = onlySuccessful == 0; if (!(_43$$20)) { - zephir_array_fetch_string(&_44$$20, &file, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 799 TSRMLS_CC); + zephir_array_fetch_string(&_44$$20, &file, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 810 TSRMLS_CC); _43$$20 = ZEPHIR_IS_LONG(&_44$$20, 0); } if (_43$$20) { ZEPHIR_INIT_NVAR(&_45$$21); zephir_create_array(&_45$$21, 5, 0 TSRMLS_CC); ZEPHIR_OBS_NVAR(&_46$$21); - zephir_array_fetch_string(&_46$$21, &file, SL("name"), PH_NOISY, "phalcon/Http/Request.zep", 801 TSRMLS_CC); + zephir_array_fetch_string(&_46$$21, &file, SL("name"), PH_NOISY, "phalcon/Http/Request.zep", 812 TSRMLS_CC); zephir_array_update_string(&_45$$21, SL("name"), &_46$$21, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_46$$21); - zephir_array_fetch_string(&_46$$21, &file, SL("type"), PH_NOISY, "phalcon/Http/Request.zep", 802 TSRMLS_CC); + zephir_array_fetch_string(&_46$$21, &file, SL("type"), PH_NOISY, "phalcon/Http/Request.zep", 813 TSRMLS_CC); zephir_array_update_string(&_45$$21, SL("type"), &_46$$21, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_46$$21); - zephir_array_fetch_string(&_46$$21, &file, SL("tmp_name"), PH_NOISY, "phalcon/Http/Request.zep", 803 TSRMLS_CC); + zephir_array_fetch_string(&_46$$21, &file, SL("tmp_name"), PH_NOISY, "phalcon/Http/Request.zep", 814 TSRMLS_CC); zephir_array_update_string(&_45$$21, SL("tmp_name"), &_46$$21, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_46$$21); - zephir_array_fetch_string(&_46$$21, &file, SL("size"), PH_NOISY, "phalcon/Http/Request.zep", 804 TSRMLS_CC); + zephir_array_fetch_string(&_46$$21, &file, SL("size"), PH_NOISY, "phalcon/Http/Request.zep", 815 TSRMLS_CC); zephir_array_update_string(&_45$$21, SL("size"), &_46$$21, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_46$$21); - zephir_array_fetch_string(&_46$$21, &file, SL("error"), PH_NOISY, "phalcon/Http/Request.zep", 806 TSRMLS_CC); + zephir_array_fetch_string(&_46$$21, &file, SL("error"), PH_NOISY, "phalcon/Http/Request.zep", 817 TSRMLS_CC); zephir_array_update_string(&_45$$21, SL("error"), &_46$$21, PH_COPY | PH_SEPARATE); ZEPHIR_CPY_WRT(&dataFile, &_45$$21); if (namedKeys == 1) { ZEPHIR_INIT_NVAR(&_47$$22); object_init_ex(&_47$$22, phalcon_http_request_file_ce); - zephir_array_fetch_string(&_48$$22, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 812 TSRMLS_CC); + zephir_array_fetch_string(&_48$$22, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 823 TSRMLS_CC); ZEPHIR_CALL_METHOD(NULL, &_47$$22, "__construct", &_18, 354, &dataFile, &_48$$22); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&_49$$22); - zephir_array_fetch_string(&_49$$22, &file, SL("key"), PH_NOISY, "phalcon/Http/Request.zep", 809 TSRMLS_CC); + zephir_array_fetch_string(&_49$$22, &file, SL("key"), PH_NOISY, "phalcon/Http/Request.zep", 820 TSRMLS_CC); zephir_array_update_zval(&files, &_49$$22, &_47$$22, PH_COPY | PH_SEPARATE); } else { ZEPHIR_INIT_NVAR(&_50$$23); object_init_ex(&_50$$23, phalcon_http_request_file_ce); - zephir_array_fetch_string(&_51$$23, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 817 TSRMLS_CC); + zephir_array_fetch_string(&_51$$23, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 828 TSRMLS_CC); ZEPHIR_CALL_METHOD(NULL, &_50$$23, "__construct", &_18, 354, &dataFile, &_51$$23); zephir_check_call_status(); - zephir_array_append(&files, &_50$$23, PH_SEPARATE, "phalcon/Http/Request.zep", 817); + zephir_array_append(&files, &_50$$23, PH_SEPARATE, "phalcon/Http/Request.zep", 828); } } } ZEND_HASH_FOREACH_END(); @@ -2181,44 +2196,44 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) { zephir_check_call_status(); _52$$24 = onlySuccessful == 0; if (!(_52$$24)) { - zephir_array_fetch_string(&_53$$24, &file, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 799 TSRMLS_CC); + zephir_array_fetch_string(&_53$$24, &file, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 810 TSRMLS_CC); _52$$24 = ZEPHIR_IS_LONG(&_53$$24, 0); } if (_52$$24) { ZEPHIR_INIT_NVAR(&_54$$25); zephir_create_array(&_54$$25, 5, 0 TSRMLS_CC); ZEPHIR_OBS_NVAR(&_55$$25); - zephir_array_fetch_string(&_55$$25, &file, SL("name"), PH_NOISY, "phalcon/Http/Request.zep", 801 TSRMLS_CC); + zephir_array_fetch_string(&_55$$25, &file, SL("name"), PH_NOISY, "phalcon/Http/Request.zep", 812 TSRMLS_CC); zephir_array_update_string(&_54$$25, SL("name"), &_55$$25, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_55$$25); - zephir_array_fetch_string(&_55$$25, &file, SL("type"), PH_NOISY, "phalcon/Http/Request.zep", 802 TSRMLS_CC); + zephir_array_fetch_string(&_55$$25, &file, SL("type"), PH_NOISY, "phalcon/Http/Request.zep", 813 TSRMLS_CC); zephir_array_update_string(&_54$$25, SL("type"), &_55$$25, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_55$$25); - zephir_array_fetch_string(&_55$$25, &file, SL("tmp_name"), PH_NOISY, "phalcon/Http/Request.zep", 803 TSRMLS_CC); + zephir_array_fetch_string(&_55$$25, &file, SL("tmp_name"), PH_NOISY, "phalcon/Http/Request.zep", 814 TSRMLS_CC); zephir_array_update_string(&_54$$25, SL("tmp_name"), &_55$$25, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_55$$25); - zephir_array_fetch_string(&_55$$25, &file, SL("size"), PH_NOISY, "phalcon/Http/Request.zep", 804 TSRMLS_CC); + zephir_array_fetch_string(&_55$$25, &file, SL("size"), PH_NOISY, "phalcon/Http/Request.zep", 815 TSRMLS_CC); zephir_array_update_string(&_54$$25, SL("size"), &_55$$25, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_55$$25); - zephir_array_fetch_string(&_55$$25, &file, SL("error"), PH_NOISY, "phalcon/Http/Request.zep", 806 TSRMLS_CC); + zephir_array_fetch_string(&_55$$25, &file, SL("error"), PH_NOISY, "phalcon/Http/Request.zep", 817 TSRMLS_CC); zephir_array_update_string(&_54$$25, SL("error"), &_55$$25, PH_COPY | PH_SEPARATE); ZEPHIR_CPY_WRT(&dataFile, &_54$$25); if (namedKeys == 1) { ZEPHIR_INIT_NVAR(&_56$$26); object_init_ex(&_56$$26, phalcon_http_request_file_ce); - zephir_array_fetch_string(&_57$$26, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 812 TSRMLS_CC); + zephir_array_fetch_string(&_57$$26, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 823 TSRMLS_CC); ZEPHIR_CALL_METHOD(NULL, &_56$$26, "__construct", &_18, 354, &dataFile, &_57$$26); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&_58$$26); - zephir_array_fetch_string(&_58$$26, &file, SL("key"), PH_NOISY, "phalcon/Http/Request.zep", 809 TSRMLS_CC); + zephir_array_fetch_string(&_58$$26, &file, SL("key"), PH_NOISY, "phalcon/Http/Request.zep", 820 TSRMLS_CC); zephir_array_update_zval(&files, &_58$$26, &_56$$26, PH_COPY | PH_SEPARATE); } else { ZEPHIR_INIT_NVAR(&_59$$27); object_init_ex(&_59$$27, phalcon_http_request_file_ce); - zephir_array_fetch_string(&_60$$27, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 817 TSRMLS_CC); + zephir_array_fetch_string(&_60$$27, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 828 TSRMLS_CC); ZEPHIR_CALL_METHOD(NULL, &_59$$27, "__construct", &_18, 354, &dataFile, &_60$$27); zephir_check_call_status(); - zephir_array_append(&files, &_59$$27, PH_SEPARATE, "phalcon/Http/Request.zep", 817); + zephir_array_append(&files, &_59$$27, PH_SEPARATE, "phalcon/Http/Request.zep", 828); } } ZEPHIR_CALL_METHOD(NULL, &smoothInput, "next", NULL, 0); @@ -2229,7 +2244,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) { } else { _61$$28 = onlySuccessful == 0; if (!(_61$$28)) { - zephir_array_fetch_string(&_62$$28, &input, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 822 TSRMLS_CC); + zephir_array_fetch_string(&_62$$28, &input, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 833 TSRMLS_CC); _61$$28 = ZEPHIR_IS_LONG(&_62$$28, 0); } if (_61$$28) { @@ -2244,7 +2259,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) { object_init_ex(&_64$$31, phalcon_http_request_file_ce); ZEPHIR_CALL_METHOD(NULL, &_64$$31, "__construct", &_18, 354, &input, &prefix); zephir_check_call_status(); - zephir_array_append(&files, &_64$$31, PH_SEPARATE, "phalcon/Http/Request.zep", 826); + zephir_array_append(&files, &_64$$31, PH_SEPARATE, "phalcon/Http/Request.zep", 837); } } } @@ -2384,7 +2399,7 @@ PHP_METHOD(Phalcon_Http_Request, hasFiles) { if (Z_TYPE_P(&files) != IS_ARRAY) { RETURN_MM_LONG(0); } - zephir_is_iterable(&files, 0, "phalcon/Http/Request.zep", 907); + zephir_is_iterable(&files, 0, "phalcon/Http/Request.zep", 918); if (Z_TYPE_P(&files) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&files), _0) { @@ -2817,14 +2832,14 @@ PHP_METHOD(Phalcon_Http_Request, isMethod) { ZEPHIR_CONCAT_SV(&_3$$4, "Invalid HTTP method: ", methods); ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 5, &_3$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$4, "phalcon/Http/Request.zep", 1018 TSRMLS_CC); + zephir_throw_exception_debug(&_2$$4, "phalcon/Http/Request.zep", 1029 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } RETURN_MM_BOOL(ZEPHIR_IS_EQUAL(methods, &httpMethod)); } if (Z_TYPE_P(methods) == IS_ARRAY) { - zephir_is_iterable(methods, 0, "phalcon/Http/Request.zep", 1031); + zephir_is_iterable(methods, 0, "phalcon/Http/Request.zep", 1042); if (Z_TYPE_P(methods) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(methods), _4$$5) { @@ -2870,7 +2885,7 @@ PHP_METHOD(Phalcon_Http_Request, isMethod) { RETURN_MM_BOOL(0); } if (UNEXPECTED(strict)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_http_request_exception_ce, "Invalid HTTP method: non-string", "phalcon/Http/Request.zep", 1035); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_http_request_exception_ce, "Invalid HTTP method: non-string", "phalcon/Http/Request.zep", 1046); return; } RETURN_MM_BOOL(0); @@ -3043,7 +3058,7 @@ PHP_METHOD(Phalcon_Http_Request, isSoap) { if (ZEPHIR_IS_EMPTY(&contentType)) { RETURN_MM_BOOL(0); } - RETURN_MM_BOOL(zephir_memnstr_str(&contentType, SL("application/soap+xml"), "phalcon/Http/Request.zep", 1120)); + RETURN_MM_BOOL(zephir_memnstr_str(&contentType, SL("application/soap+xml"), "phalcon/Http/Request.zep", 1131)); } @@ -3099,6 +3114,24 @@ PHP_METHOD(Phalcon_Http_Request, isValidHttpMethod) { } +/** + * Sets the dependency injector + */ +PHP_METHOD(Phalcon_Http_Request, setDI) { + + zval *container, container_sub; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&container_sub); + + zephir_fetch_params_without_memory_grow(1, 0, &container); + + + + zephir_update_property_zval(this_ptr, SL("container"), container); + +} + /** * Sets automatic sanitizers/filters for a particular field and for * particular methods @@ -3166,13 +3199,13 @@ PHP_METHOD(Phalcon_Http_Request, setParameterFilters) { ZEPHIR_CONCAT_SVS(&_1$$3, "Filters have not been defined for '", &name, "'"); ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 5, &_1$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_0$$3, "phalcon/Http/Request.zep", 1165 TSRMLS_CC); + zephir_throw_exception_debug(&_0$$3, "phalcon/Http/Request.zep", 1184 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_CALL_METHOD(&filterService, this_ptr, "getfilterservice", NULL, 358); zephir_check_call_status(); - zephir_is_iterable(&filters, 0, "phalcon/Http/Request.zep", 1178); + zephir_is_iterable(&filters, 0, "phalcon/Http/Request.zep", 1197); if (Z_TYPE_P(&filters) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&filters), _2) { @@ -3187,7 +3220,7 @@ PHP_METHOD(Phalcon_Http_Request, setParameterFilters) { ZEPHIR_CONCAT_SVS(&_7$$5, "Sanitizer '", &sanitizer, "' does not exist in the filter locator"); ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", NULL, 5, &_7$$5); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$5, "phalcon/Http/Request.zep", 1174 TSRMLS_CC); + zephir_throw_exception_debug(&_6$$5, "phalcon/Http/Request.zep", 1193 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -3212,7 +3245,7 @@ PHP_METHOD(Phalcon_Http_Request, setParameterFilters) { ZEPHIR_CONCAT_SVS(&_11$$7, "Sanitizer '", &sanitizer, "' does not exist in the filter locator"); ZEPHIR_CALL_METHOD(NULL, &_10$$7, "__construct", NULL, 5, &_11$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$7, "phalcon/Http/Request.zep", 1174 TSRMLS_CC); + zephir_throw_exception_debug(&_10$$7, "phalcon/Http/Request.zep", 1193 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -3236,7 +3269,7 @@ PHP_METHOD(Phalcon_Http_Request, setParameterFilters) { } else { ZEPHIR_CPY_WRT(&localScope, &scope); } - zephir_is_iterable(&localScope, 0, "phalcon/Http/Request.zep", 1188); + zephir_is_iterable(&localScope, 0, "phalcon/Http/Request.zep", 1207); if (Z_TYPE_P(&localScope) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&localScope), _13) { @@ -3339,7 +3372,7 @@ PHP_METHOD(Phalcon_Http_Request, getBestQuality) { quality = 0.0; ZEPHIR_INIT_VAR(&selectedName); ZVAL_STRING(&selectedName, ""); - zephir_is_iterable(&qualityParts, 0, "phalcon/Http/Request.zep", 1231); + zephir_is_iterable(&qualityParts, 0, "phalcon/Http/Request.zep", 1250); if (Z_TYPE_P(&qualityParts) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&qualityParts), _0) { @@ -3347,18 +3380,18 @@ PHP_METHOD(Phalcon_Http_Request, getBestQuality) { ZVAL_COPY(&accept, _0); if (i == 0) { ZEPHIR_OBS_NVAR(&_2$$4); - zephir_array_fetch_string(&_2$$4, &accept, SL("quality"), PH_NOISY, "phalcon/Http/Request.zep", 1217 TSRMLS_CC); + zephir_array_fetch_string(&_2$$4, &accept, SL("quality"), PH_NOISY, "phalcon/Http/Request.zep", 1236 TSRMLS_CC); quality = zephir_get_doubleval(&_2$$4); ZEPHIR_OBS_NVAR(&selectedName); - zephir_array_fetch(&selectedName, &accept, &name, PH_NOISY, "phalcon/Http/Request.zep", 1218 TSRMLS_CC); + zephir_array_fetch(&selectedName, &accept, &name, PH_NOISY, "phalcon/Http/Request.zep", 1237 TSRMLS_CC); } else { ZEPHIR_OBS_NVAR(&_3$$5); - zephir_array_fetch_string(&_3$$5, &accept, SL("quality"), PH_NOISY, "phalcon/Http/Request.zep", 1220 TSRMLS_CC); + zephir_array_fetch_string(&_3$$5, &accept, SL("quality"), PH_NOISY, "phalcon/Http/Request.zep", 1239 TSRMLS_CC); acceptQuality = zephir_get_doubleval(&_3$$5); if (acceptQuality > quality) { quality = acceptQuality; ZEPHIR_OBS_NVAR(&selectedName); - zephir_array_fetch(&selectedName, &accept, &name, PH_NOISY, "phalcon/Http/Request.zep", 1224 TSRMLS_CC); + zephir_array_fetch(&selectedName, &accept, &name, PH_NOISY, "phalcon/Http/Request.zep", 1243 TSRMLS_CC); } } i++; @@ -3376,18 +3409,18 @@ PHP_METHOD(Phalcon_Http_Request, getBestQuality) { zephir_check_call_status(); if (i == 0) { ZEPHIR_OBS_NVAR(&_4$$8); - zephir_array_fetch_string(&_4$$8, &accept, SL("quality"), PH_NOISY, "phalcon/Http/Request.zep", 1217 TSRMLS_CC); + zephir_array_fetch_string(&_4$$8, &accept, SL("quality"), PH_NOISY, "phalcon/Http/Request.zep", 1236 TSRMLS_CC); quality = zephir_get_doubleval(&_4$$8); ZEPHIR_OBS_NVAR(&selectedName); - zephir_array_fetch(&selectedName, &accept, &name, PH_NOISY, "phalcon/Http/Request.zep", 1218 TSRMLS_CC); + zephir_array_fetch(&selectedName, &accept, &name, PH_NOISY, "phalcon/Http/Request.zep", 1237 TSRMLS_CC); } else { ZEPHIR_OBS_NVAR(&_5$$9); - zephir_array_fetch_string(&_5$$9, &accept, SL("quality"), PH_NOISY, "phalcon/Http/Request.zep", 1220 TSRMLS_CC); + zephir_array_fetch_string(&_5$$9, &accept, SL("quality"), PH_NOISY, "phalcon/Http/Request.zep", 1239 TSRMLS_CC); acceptQuality = zephir_get_doubleval(&_5$$9); if (acceptQuality > quality) { quality = acceptQuality; ZEPHIR_OBS_NVAR(&selectedName); - zephir_array_fetch(&selectedName, &accept, &name, PH_NOISY, "phalcon/Http/Request.zep", 1224 TSRMLS_CC); + zephir_array_fetch(&selectedName, &accept, &name, PH_NOISY, "phalcon/Http/Request.zep", 1243 TSRMLS_CC); } } i++; @@ -3525,7 +3558,7 @@ PHP_METHOD(Phalcon_Http_Request, hasFileHelper) { if (Z_TYPE_P(data) != IS_ARRAY) { RETURN_MM_LONG(1); } - zephir_is_iterable(data, 0, "phalcon/Http/Request.zep", 1286); + zephir_is_iterable(data, 0, "phalcon/Http/Request.zep", 1305); if (Z_TYPE_P(data) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(data), _0) { @@ -3694,7 +3727,7 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) { ZVAL_LONG(&_3, 1); ZEPHIR_CALL_FUNCTION(&parts, "preg_split", NULL, 92, &_1, &_0, &_2, &_3); zephir_check_call_status(); - zephir_is_iterable(&parts, 0, "phalcon/Http/Request.zep", 1326); + zephir_is_iterable(&parts, 0, "phalcon/Http/Request.zep", 1345); if (Z_TYPE_P(&parts) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&parts), _4) { @@ -3710,7 +3743,7 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) { ZVAL_LONG(&_9$$3, 1); ZEPHIR_CALL_FUNCTION(&_10$$3, "preg_split", NULL, 92, &_7$$3, &_6$$3, &_8$$3, &_9$$3); zephir_check_call_status(); - zephir_is_iterable(&_10$$3, 0, "phalcon/Http/Request.zep", 1323); + zephir_is_iterable(&_10$$3, 0, "phalcon/Http/Request.zep", 1342); if (Z_TYPE_P(&_10$$3) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_10$$3), _11$$3) { @@ -3723,17 +3756,17 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) { if (!ZEPHIR_IS_FALSE_IDENTICAL(&_14$$4)) { ZEPHIR_INIT_NVAR(&split); zephir_fast_explode_str(&split, SL("="), &headerPart, 2 TSRMLS_CC); - zephir_array_fetch_long(&_15$$5, &split, 0, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1312 TSRMLS_CC); + zephir_array_fetch_long(&_15$$5, &split, 0, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1331 TSRMLS_CC); if (ZEPHIR_IS_STRING_IDENTICAL(&_15$$5, "q")) { ZEPHIR_OBS_NVAR(&_16$$6); - zephir_array_fetch_long(&_16$$6, &split, 1, PH_NOISY, "phalcon/Http/Request.zep", 1313 TSRMLS_CC); + zephir_array_fetch_long(&_16$$6, &split, 1, PH_NOISY, "phalcon/Http/Request.zep", 1332 TSRMLS_CC); ZEPHIR_INIT_NVAR(&_17$$6); ZVAL_DOUBLE(&_17$$6, zephir_get_doubleval(&_16$$6)); zephir_array_update_string(&headerParts, SL("quality"), &_17$$6, PH_COPY | PH_SEPARATE); } else { - zephir_array_fetch_long(&_18$$7, &split, 1, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1315 TSRMLS_CC); + zephir_array_fetch_long(&_18$$7, &split, 1, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1334 TSRMLS_CC); ZEPHIR_OBS_NVAR(&_19$$7); - zephir_array_fetch_long(&_19$$7, &split, 0, PH_NOISY, "phalcon/Http/Request.zep", 1315 TSRMLS_CC); + zephir_array_fetch_long(&_19$$7, &split, 0, PH_NOISY, "phalcon/Http/Request.zep", 1334 TSRMLS_CC); zephir_array_update_zval(&headerParts, &_19$$7, &_18$$7, PH_COPY | PH_SEPARATE); } } else { @@ -3761,17 +3794,17 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) { if (!ZEPHIR_IS_FALSE_IDENTICAL(&_22$$9)) { ZEPHIR_INIT_NVAR(&split); zephir_fast_explode_str(&split, SL("="), &headerPart, 2 TSRMLS_CC); - zephir_array_fetch_long(&_23$$10, &split, 0, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1312 TSRMLS_CC); + zephir_array_fetch_long(&_23$$10, &split, 0, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1331 TSRMLS_CC); if (ZEPHIR_IS_STRING_IDENTICAL(&_23$$10, "q")) { ZEPHIR_OBS_NVAR(&_24$$11); - zephir_array_fetch_long(&_24$$11, &split, 1, PH_NOISY, "phalcon/Http/Request.zep", 1313 TSRMLS_CC); + zephir_array_fetch_long(&_24$$11, &split, 1, PH_NOISY, "phalcon/Http/Request.zep", 1332 TSRMLS_CC); ZEPHIR_INIT_NVAR(&_25$$11); ZVAL_DOUBLE(&_25$$11, zephir_get_doubleval(&_24$$11)); zephir_array_update_string(&headerParts, SL("quality"), &_25$$11, PH_COPY | PH_SEPARATE); } else { - zephir_array_fetch_long(&_26$$12, &split, 1, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1315 TSRMLS_CC); + zephir_array_fetch_long(&_26$$12, &split, 1, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1334 TSRMLS_CC); ZEPHIR_OBS_NVAR(&_27$$12); - zephir_array_fetch_long(&_27$$12, &split, 0, PH_NOISY, "phalcon/Http/Request.zep", 1315 TSRMLS_CC); + zephir_array_fetch_long(&_27$$12, &split, 0, PH_NOISY, "phalcon/Http/Request.zep", 1334 TSRMLS_CC); zephir_array_update_zval(&headerParts, &_27$$12, &_26$$12, PH_COPY | PH_SEPARATE); } } else { @@ -3785,7 +3818,7 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) { } } ZEPHIR_INIT_NVAR(&headerPart); - zephir_array_append(&returnedParts, &headerParts, PH_SEPARATE, "phalcon/Http/Request.zep", 1323); + zephir_array_append(&returnedParts, &headerParts, PH_SEPARATE, "phalcon/Http/Request.zep", 1342); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &parts, "rewind", NULL, 0); @@ -3808,7 +3841,7 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) { ZVAL_LONG(&_32$$14, 1); ZEPHIR_CALL_FUNCTION(&_33$$14, "preg_split", NULL, 92, &_30$$14, &_29$$14, &_31$$14, &_32$$14); zephir_check_call_status(); - zephir_is_iterable(&_33$$14, 0, "phalcon/Http/Request.zep", 1323); + zephir_is_iterable(&_33$$14, 0, "phalcon/Http/Request.zep", 1342); if (Z_TYPE_P(&_33$$14) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_33$$14), _34$$14) { @@ -3821,17 +3854,17 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) { if (!ZEPHIR_IS_FALSE_IDENTICAL(&_37$$15)) { ZEPHIR_INIT_NVAR(&split); zephir_fast_explode_str(&split, SL("="), &headerPart, 2 TSRMLS_CC); - zephir_array_fetch_long(&_38$$16, &split, 0, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1312 TSRMLS_CC); + zephir_array_fetch_long(&_38$$16, &split, 0, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1331 TSRMLS_CC); if (ZEPHIR_IS_STRING_IDENTICAL(&_38$$16, "q")) { ZEPHIR_OBS_NVAR(&_39$$17); - zephir_array_fetch_long(&_39$$17, &split, 1, PH_NOISY, "phalcon/Http/Request.zep", 1313 TSRMLS_CC); + zephir_array_fetch_long(&_39$$17, &split, 1, PH_NOISY, "phalcon/Http/Request.zep", 1332 TSRMLS_CC); ZEPHIR_INIT_NVAR(&_40$$17); ZVAL_DOUBLE(&_40$$17, zephir_get_doubleval(&_39$$17)); zephir_array_update_string(&headerParts, SL("quality"), &_40$$17, PH_COPY | PH_SEPARATE); } else { - zephir_array_fetch_long(&_41$$18, &split, 1, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1315 TSRMLS_CC); + zephir_array_fetch_long(&_41$$18, &split, 1, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1334 TSRMLS_CC); ZEPHIR_OBS_NVAR(&_42$$18); - zephir_array_fetch_long(&_42$$18, &split, 0, PH_NOISY, "phalcon/Http/Request.zep", 1315 TSRMLS_CC); + zephir_array_fetch_long(&_42$$18, &split, 0, PH_NOISY, "phalcon/Http/Request.zep", 1334 TSRMLS_CC); zephir_array_update_zval(&headerParts, &_42$$18, &_41$$18, PH_COPY | PH_SEPARATE); } } else { @@ -3859,17 +3892,17 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) { if (!ZEPHIR_IS_FALSE_IDENTICAL(&_45$$20)) { ZEPHIR_INIT_NVAR(&split); zephir_fast_explode_str(&split, SL("="), &headerPart, 2 TSRMLS_CC); - zephir_array_fetch_long(&_46$$21, &split, 0, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1312 TSRMLS_CC); + zephir_array_fetch_long(&_46$$21, &split, 0, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1331 TSRMLS_CC); if (ZEPHIR_IS_STRING_IDENTICAL(&_46$$21, "q")) { ZEPHIR_OBS_NVAR(&_47$$22); - zephir_array_fetch_long(&_47$$22, &split, 1, PH_NOISY, "phalcon/Http/Request.zep", 1313 TSRMLS_CC); + zephir_array_fetch_long(&_47$$22, &split, 1, PH_NOISY, "phalcon/Http/Request.zep", 1332 TSRMLS_CC); ZEPHIR_INIT_NVAR(&_48$$22); ZVAL_DOUBLE(&_48$$22, zephir_get_doubleval(&_47$$22)); zephir_array_update_string(&headerParts, SL("quality"), &_48$$22, PH_COPY | PH_SEPARATE); } else { - zephir_array_fetch_long(&_49$$23, &split, 1, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1315 TSRMLS_CC); + zephir_array_fetch_long(&_49$$23, &split, 1, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1334 TSRMLS_CC); ZEPHIR_OBS_NVAR(&_50$$23); - zephir_array_fetch_long(&_50$$23, &split, 0, PH_NOISY, "phalcon/Http/Request.zep", 1315 TSRMLS_CC); + zephir_array_fetch_long(&_50$$23, &split, 0, PH_NOISY, "phalcon/Http/Request.zep", 1334 TSRMLS_CC); zephir_array_update_zval(&headerParts, &_50$$23, &_49$$23, PH_COPY | PH_SEPARATE); } } else { @@ -3883,7 +3916,7 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) { } } ZEPHIR_INIT_NVAR(&headerPart); - zephir_array_append(&returnedParts, &headerParts, PH_SEPARATE, "phalcon/Http/Request.zep", 1323); + zephir_array_append(&returnedParts, &headerParts, PH_SEPARATE, "phalcon/Http/Request.zep", 1342); ZEPHIR_CALL_METHOD(NULL, &parts, "next", NULL, 0); zephir_check_call_status(); } @@ -4066,9 +4099,9 @@ PHP_METHOD(Phalcon_Http_Request, resolveAuthorizationHeaders) { ZEPHIR_INIT_VAR(&exploded); zephir_fast_explode_str(&exploded, SL(":"), &_28$$12, 2 TSRMLS_CC); if (zephir_fast_count_int(&exploded TSRMLS_CC) == 2) { - zephir_array_fetch_long(&_29$$13, &exploded, 0, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1385 TSRMLS_CC); + zephir_array_fetch_long(&_29$$13, &exploded, 0, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1404 TSRMLS_CC); zephir_array_update_string(&headers, SL("Php-Auth-User"), &_29$$13, PH_COPY | PH_SEPARATE); - zephir_array_fetch_long(&_30$$13, &exploded, 1, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1386 TSRMLS_CC); + zephir_array_fetch_long(&_30$$13, &exploded, 1, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1405 TSRMLS_CC); zephir_array_update_string(&headers, SL("Php-Auth-Pw"), &_30$$13, PH_COPY | PH_SEPARATE); } } else if (_23$$11) { @@ -4081,8 +4114,8 @@ PHP_METHOD(Phalcon_Http_Request, resolveAuthorizationHeaders) { if (!(zephir_array_isset_string(&headers, SL("Authorization")))) { ZEPHIR_OBS_VAR(&digest); if (zephir_array_isset_string(&headers, SL("Php-Auth-User"))) { - zephir_array_fetch_string(&_31$$17, &headers, SL("Php-Auth-User"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1398 TSRMLS_CC); - zephir_array_fetch_string(&_32$$17, &headers, SL("Php-Auth-Pw"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1398 TSRMLS_CC); + zephir_array_fetch_string(&_31$$17, &headers, SL("Php-Auth-User"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1417 TSRMLS_CC); + zephir_array_fetch_string(&_32$$17, &headers, SL("Php-Auth-Pw"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1417 TSRMLS_CC); ZEPHIR_INIT_VAR(&_33$$17); ZEPHIR_CONCAT_VSV(&_33$$17, &_31$$17, ":", &_32$$17); ZEPHIR_CALL_FUNCTION(&_34$$17, "base64_encode", NULL, 179, &_33$$17); @@ -4175,7 +4208,7 @@ PHP_METHOD(Phalcon_Http_Request, smoothFiles) { ZEPHIR_INIT_VAR(&files); array_init(&files); - zephir_is_iterable(&names, 0, "phalcon/Http/Request.zep", 1462); + zephir_is_iterable(&names, 0, "phalcon/Http/Request.zep", 1481); if (Z_TYPE_P(&names) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&names), _2, _3, _0) { @@ -4194,35 +4227,35 @@ PHP_METHOD(Phalcon_Http_Request, smoothFiles) { zephir_create_array(&_4$$4, 6, 0 TSRMLS_CC); zephir_array_update_string(&_4$$4, SL("name"), &name, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_5$$4); - zephir_array_fetch(&_5$$4, &types, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1438 TSRMLS_CC); + zephir_array_fetch(&_5$$4, &types, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1457 TSRMLS_CC); zephir_array_update_string(&_4$$4, SL("type"), &_5$$4, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_5$$4); - zephir_array_fetch(&_5$$4, &tmp_names, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1439 TSRMLS_CC); + zephir_array_fetch(&_5$$4, &tmp_names, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1458 TSRMLS_CC); zephir_array_update_string(&_4$$4, SL("tmp_name"), &_5$$4, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_5$$4); - zephir_array_fetch(&_5$$4, &sizes, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1440 TSRMLS_CC); + zephir_array_fetch(&_5$$4, &sizes, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1459 TSRMLS_CC); zephir_array_update_string(&_4$$4, SL("size"), &_5$$4, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_5$$4); - zephir_array_fetch(&_5$$4, &errors, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1441 TSRMLS_CC); + zephir_array_fetch(&_5$$4, &errors, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1460 TSRMLS_CC); zephir_array_update_string(&_4$$4, SL("error"), &_5$$4, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_4$$4, SL("key"), &p, PH_COPY | PH_SEPARATE); - zephir_array_append(&files, &_4$$4, PH_SEPARATE, "phalcon/Http/Request.zep", 1443); + zephir_array_append(&files, &_4$$4, PH_SEPARATE, "phalcon/Http/Request.zep", 1462); } if (Z_TYPE_P(&name) == IS_ARRAY) { - zephir_array_fetch(&_6$$5, &names, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1448 TSRMLS_CC); - zephir_array_fetch(&_7$$5, &types, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1449 TSRMLS_CC); - zephir_array_fetch(&_8$$5, &tmp_names, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1450 TSRMLS_CC); - zephir_array_fetch(&_9$$5, &sizes, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1451 TSRMLS_CC); - zephir_array_fetch(&_10$$5, &errors, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1452 TSRMLS_CC); + zephir_array_fetch(&_6$$5, &names, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1467 TSRMLS_CC); + zephir_array_fetch(&_7$$5, &types, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1468 TSRMLS_CC); + zephir_array_fetch(&_8$$5, &tmp_names, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1469 TSRMLS_CC); + zephir_array_fetch(&_9$$5, &sizes, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1470 TSRMLS_CC); + zephir_array_fetch(&_10$$5, &errors, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1471 TSRMLS_CC); ZEPHIR_CALL_METHOD(&parentFiles, this_ptr, "smoothfiles", &_11, 353, &_6$$5, &_7$$5, &_8$$5, &_9$$5, &_10$$5, &p); zephir_check_call_status(); - zephir_is_iterable(&parentFiles, 0, "phalcon/Http/Request.zep", 1459); + zephir_is_iterable(&parentFiles, 0, "phalcon/Http/Request.zep", 1478); if (Z_TYPE_P(&parentFiles) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&parentFiles), _12$$5) { ZEPHIR_INIT_NVAR(&file); ZVAL_COPY(&file, _12$$5); - zephir_array_append(&files, &file, PH_SEPARATE, "phalcon/Http/Request.zep", 1457); + zephir_array_append(&files, &file, PH_SEPARATE, "phalcon/Http/Request.zep", 1476); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &parentFiles, "rewind", NULL, 0); @@ -4235,7 +4268,7 @@ PHP_METHOD(Phalcon_Http_Request, smoothFiles) { } ZEPHIR_CALL_METHOD(&file, &parentFiles, "current", NULL, 0); zephir_check_call_status(); - zephir_array_append(&files, &file, PH_SEPARATE, "phalcon/Http/Request.zep", 1457); + zephir_array_append(&files, &file, PH_SEPARATE, "phalcon/Http/Request.zep", 1476); ZEPHIR_CALL_METHOD(NULL, &parentFiles, "next", NULL, 0); zephir_check_call_status(); } @@ -4263,35 +4296,35 @@ PHP_METHOD(Phalcon_Http_Request, smoothFiles) { zephir_create_array(&_14$$9, 6, 0 TSRMLS_CC); zephir_array_update_string(&_14$$9, SL("name"), &name, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_15$$9); - zephir_array_fetch(&_15$$9, &types, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1438 TSRMLS_CC); + zephir_array_fetch(&_15$$9, &types, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1457 TSRMLS_CC); zephir_array_update_string(&_14$$9, SL("type"), &_15$$9, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_15$$9); - zephir_array_fetch(&_15$$9, &tmp_names, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1439 TSRMLS_CC); + zephir_array_fetch(&_15$$9, &tmp_names, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1458 TSRMLS_CC); zephir_array_update_string(&_14$$9, SL("tmp_name"), &_15$$9, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_15$$9); - zephir_array_fetch(&_15$$9, &sizes, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1440 TSRMLS_CC); + zephir_array_fetch(&_15$$9, &sizes, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1459 TSRMLS_CC); zephir_array_update_string(&_14$$9, SL("size"), &_15$$9, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_15$$9); - zephir_array_fetch(&_15$$9, &errors, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1441 TSRMLS_CC); + zephir_array_fetch(&_15$$9, &errors, &idx, PH_NOISY, "phalcon/Http/Request.zep", 1460 TSRMLS_CC); zephir_array_update_string(&_14$$9, SL("error"), &_15$$9, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_14$$9, SL("key"), &p, PH_COPY | PH_SEPARATE); - zephir_array_append(&files, &_14$$9, PH_SEPARATE, "phalcon/Http/Request.zep", 1443); + zephir_array_append(&files, &_14$$9, PH_SEPARATE, "phalcon/Http/Request.zep", 1462); } if (Z_TYPE_P(&name) == IS_ARRAY) { - zephir_array_fetch(&_16$$10, &names, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1448 TSRMLS_CC); - zephir_array_fetch(&_17$$10, &types, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1449 TSRMLS_CC); - zephir_array_fetch(&_18$$10, &tmp_names, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1450 TSRMLS_CC); - zephir_array_fetch(&_19$$10, &sizes, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1451 TSRMLS_CC); - zephir_array_fetch(&_20$$10, &errors, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1452 TSRMLS_CC); + zephir_array_fetch(&_16$$10, &names, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1467 TSRMLS_CC); + zephir_array_fetch(&_17$$10, &types, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1468 TSRMLS_CC); + zephir_array_fetch(&_18$$10, &tmp_names, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1469 TSRMLS_CC); + zephir_array_fetch(&_19$$10, &sizes, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1470 TSRMLS_CC); + zephir_array_fetch(&_20$$10, &errors, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1471 TSRMLS_CC); ZEPHIR_CALL_METHOD(&parentFiles, this_ptr, "smoothfiles", &_11, 353, &_16$$10, &_17$$10, &_18$$10, &_19$$10, &_20$$10, &p); zephir_check_call_status(); - zephir_is_iterable(&parentFiles, 0, "phalcon/Http/Request.zep", 1459); + zephir_is_iterable(&parentFiles, 0, "phalcon/Http/Request.zep", 1478); if (Z_TYPE_P(&parentFiles) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&parentFiles), _21$$10) { ZEPHIR_INIT_NVAR(&file); ZVAL_COPY(&file, _21$$10); - zephir_array_append(&files, &file, PH_SEPARATE, "phalcon/Http/Request.zep", 1457); + zephir_array_append(&files, &file, PH_SEPARATE, "phalcon/Http/Request.zep", 1476); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &parentFiles, "rewind", NULL, 0); @@ -4304,7 +4337,7 @@ PHP_METHOD(Phalcon_Http_Request, smoothFiles) { } ZEPHIR_CALL_METHOD(&file, &parentFiles, "current", NULL, 0); zephir_check_call_status(); - zephir_array_append(&files, &file, PH_SEPARATE, "phalcon/Http/Request.zep", 1457); + zephir_array_append(&files, &file, PH_SEPARATE, "phalcon/Http/Request.zep", 1476); ZEPHIR_CALL_METHOD(NULL, &parentFiles, "next", NULL, 0); zephir_check_call_status(); } @@ -4358,7 +4391,7 @@ PHP_METHOD(Phalcon_Http_Request, getFilterService) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 5, &_3$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$4, "phalcon/Http/Request.zep", 1480 TSRMLS_CC); + zephir_throw_exception_debug(&_2$$4, "phalcon/Http/Request.zep", 1499 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } diff --git a/ext/phalcon/http/request.zep.h b/ext/phalcon/http/request.zep.h index 5260ce8d9f4..d0a1754fdbb 100644 --- a/ext/phalcon/http/request.zep.h +++ b/ext/phalcon/http/request.zep.h @@ -14,6 +14,7 @@ PHP_METHOD(Phalcon_Http_Request, getBestLanguage); PHP_METHOD(Phalcon_Http_Request, getClientAddress); PHP_METHOD(Phalcon_Http_Request, getClientCharsets); PHP_METHOD(Phalcon_Http_Request, getContentType); +PHP_METHOD(Phalcon_Http_Request, getDI); PHP_METHOD(Phalcon_Http_Request, getDigestAuth); PHP_METHOD(Phalcon_Http_Request, getFilteredQuery); PHP_METHOD(Phalcon_Http_Request, getFilteredPost); @@ -60,6 +61,7 @@ PHP_METHOD(Phalcon_Http_Request, isStrictHostCheck); PHP_METHOD(Phalcon_Http_Request, isSoap); PHP_METHOD(Phalcon_Http_Request, isTrace); PHP_METHOD(Phalcon_Http_Request, isValidHttpMethod); +PHP_METHOD(Phalcon_Http_Request, setDI); PHP_METHOD(Phalcon_Http_Request, setParameterFilters); PHP_METHOD(Phalcon_Http_Request, setStrictHostCheck); PHP_METHOD(Phalcon_Http_Request, getBestQuality); @@ -164,6 +166,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_http_request_getcontentt #endif ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_request_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_http_request_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) +#endif +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_http_request_getdigestauth, 0, 0, IS_ARRAY, 0) #else @@ -628,6 +637,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_http_request_isvalidhttp #endif ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_http_request_setdi, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_request_setparameterfilters, 0, 1, Phalcon\\Http\\RequestInterface, 0) #else @@ -768,6 +781,7 @@ ZEPHIR_INIT_FUNCS(phalcon_http_request_method_entry) { PHP_ME(Phalcon_Http_Request, getClientAddress, arginfo_phalcon_http_request_getclientaddress, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Request, getClientCharsets, arginfo_phalcon_http_request_getclientcharsets, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Request, getContentType, arginfo_phalcon_http_request_getcontenttype, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Http_Request, getDI, arginfo_phalcon_http_request_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Request, getDigestAuth, arginfo_phalcon_http_request_getdigestauth, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Request, getFilteredQuery, arginfo_phalcon_http_request_getfilteredquery, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Request, getFilteredPost, arginfo_phalcon_http_request_getfilteredpost, ZEND_ACC_PUBLIC) @@ -814,6 +828,7 @@ ZEPHIR_INIT_FUNCS(phalcon_http_request_method_entry) { PHP_ME(Phalcon_Http_Request, isSoap, arginfo_phalcon_http_request_issoap, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Request, isTrace, arginfo_phalcon_http_request_istrace, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Request, isValidHttpMethod, arginfo_phalcon_http_request_isvalidhttpmethod, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Http_Request, setDI, arginfo_phalcon_http_request_setdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Request, setParameterFilters, arginfo_phalcon_http_request_setparameterfilters, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Request, setStrictHostCheck, arginfo_phalcon_http_request_setstricthostcheck, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Request, getBestQuality, arginfo_phalcon_http_request_getbestquality, ZEND_ACC_FINAL|ZEND_ACC_PROTECTED) diff --git a/ext/phalcon/http/response.zep.c b/ext/phalcon/http/response.zep.c index 9c6fdaa0ccb..3a46e08cb98 100644 --- a/ext/phalcon/http/response.zep.c +++ b/ext/phalcon/http/response.zep.c @@ -21,6 +21,7 @@ #include "kernel/string.h" #include "ext/date/php_date.h" #include "ext/spl/spl_exceptions.h" +#include "kernel/file.h" #include "kernel/array.h" @@ -210,7 +211,7 @@ PHP_METHOD(Phalcon_Http_Response, getDI) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 5, &_3$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$4, "phalcon/Http/Response.zep", 121 TSRMLS_CC); + zephir_throw_exception_debug(&_2$$4, "phalcon/Http/Response.zep", 120 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -593,7 +594,7 @@ PHP_METHOD(Phalcon_Http_Response, send) { zephir_read_property(&_0, this_ptr, SL("sent"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(zephir_is_true(&_0))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_http_response_exception_ce, "Response was already sent", "phalcon/Http/Response.zep", 323); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_http_response_exception_ce, "Response was already sent", "phalcon/Http/Response.zep", 322); return; } ZEPHIR_CALL_METHOD(NULL, this_ptr, "sendheaders", NULL, 0); @@ -1013,26 +1014,18 @@ PHP_METHOD(Phalcon_Http_Response, setFileToSend) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *filePath_param = NULL, *attachmentName = NULL, attachmentName_sub, *attachment = NULL, attachment_sub, __$true, __$null, basePath, basePathEncoding, _1$$6, _2$$5, _3$$7, _4$$7, _5$$7, _6$$8, _7$$8, _8$$8; + zval *filePath_param = NULL, *attachmentName = NULL, attachmentName_sub, *attachment = NULL, attachment_sub, __$null, __$true, basePath, _0$$5, _1$$5; zval filePath; zval *this_ptr = getThis(); ZVAL_UNDEF(&filePath); ZVAL_UNDEF(&attachmentName_sub); ZVAL_UNDEF(&attachment_sub); - ZVAL_BOOL(&__$true, 1); ZVAL_NULL(&__$null); + ZVAL_BOOL(&__$true, 1); ZVAL_UNDEF(&basePath); - ZVAL_UNDEF(&basePathEncoding); - ZVAL_UNDEF(&_1$$6); - ZVAL_UNDEF(&_2$$5); - ZVAL_UNDEF(&_3$$7); - ZVAL_UNDEF(&_4$$7); - ZVAL_UNDEF(&_5$$7); - ZVAL_UNDEF(&_6$$8); - ZVAL_UNDEF(&_7$$8); - ZVAL_UNDEF(&_8$$8); + ZVAL_UNDEF(&_0$$5); + ZVAL_UNDEF(&_1$$5); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 2, &filePath_param, &attachmentName, &attachment); @@ -1048,54 +1041,29 @@ PHP_METHOD(Phalcon_Http_Response, setFileToSend) { } - ZEPHIR_INIT_VAR(&basePathEncoding); - ZVAL_STRING(&basePathEncoding, "ASCII"); if (Z_TYPE_P(attachmentName) != IS_STRING) { - ZEPHIR_CALL_CE_STATIC(&basePath, phalcon_helper_fs_ce, "basename", &_0, 363, &filePath); - zephir_check_call_status(); + ZEPHIR_INIT_VAR(&basePath); + zephir_basename(&basePath, &filePath TSRMLS_CC); } else { ZEPHIR_CPY_WRT(&basePath, attachmentName); } if (zephir_is_true(attachment)) { - if ((zephir_function_exists_ex(SL("mb_detect_encoding") TSRMLS_CC) == SUCCESS)) { - ZEPHIR_CALL_FUNCTION(&_1$$6, "mb_detect_order", NULL, 364); - zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&basePathEncoding, "mb_detect_encoding", NULL, 221, &basePath, &_1$$6, &__$true); - zephir_check_call_status(); - } - ZEPHIR_INIT_VAR(&_2$$5); - ZVAL_STRING(&_2$$5, "Content-Description: File Transfer"); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setrawheader", NULL, 0, &_2$$5); + ZEPHIR_INIT_VAR(&_0$$5); + ZVAL_STRING(&_0$$5, "Content-Description: File Transfer"); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "setrawheader", NULL, 0, &_0$$5); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_2$$5); - ZVAL_STRING(&_2$$5, "Content-Type: application/octet-stream"); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setrawheader", NULL, 0, &_2$$5); + ZEPHIR_INIT_NVAR(&_0$$5); + ZVAL_STRING(&_0$$5, "Content-Type: application/octet-stream"); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "setrawheader", NULL, 0, &_0$$5); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_2$$5); - ZVAL_STRING(&_2$$5, "Content-Transfer-Encoding: binary"); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setrawheader", NULL, 0, &_2$$5); + ZEPHIR_INIT_VAR(&_1$$5); + ZEPHIR_CONCAT_SVS(&_1$$5, "Content-Disposition: attachment; filename=", &basePath, ";"); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "setrawheader", NULL, 0, &_1$$5); + zephir_check_call_status(); + ZEPHIR_INIT_NVAR(&_0$$5); + ZVAL_STRING(&_0$$5, "Content-Transfer-Encoding: binary"); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "setrawheader", NULL, 0, &_0$$5); zephir_check_call_status(); - if (!ZEPHIR_IS_STRING(&basePathEncoding, "ASCII")) { - ZEPHIR_CALL_FUNCTION(&_3$$7, "rawurlencode", NULL, 224, &basePath); - zephir_check_call_status(); - ZEPHIR_CPY_WRT(&basePath, &_3$$7); - ZEPHIR_INIT_VAR(&_4$$7); - zephir_fast_strtolower(&_4$$7, &basePathEncoding); - ZEPHIR_INIT_VAR(&_5$$7); - ZEPHIR_CONCAT_SVSVSV(&_5$$7, "Content-Disposition: attachment; filename=", &basePath, "; filename*=", &_4$$7, "''", &basePath); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setrawheader", NULL, 0, &_5$$7); - zephir_check_call_status(); - } else { - ZEPHIR_INIT_VAR(&_6$$8); - ZVAL_STRING(&_6$$8, "\\15\\17\\\""); - ZEPHIR_CALL_FUNCTION(&_7$$8, "addcslashes", NULL, 190, &basePath, &_6$$8); - zephir_check_call_status(); - ZEPHIR_CPY_WRT(&basePath, &_7$$8); - ZEPHIR_INIT_VAR(&_8$$8); - ZEPHIR_CONCAT_SVS(&_8$$8, "Content-Disposition: attachment; filename=\"", &basePath, "\""); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setrawheader", NULL, 0, &_8$$8); - zephir_check_call_status(); - } } zephir_update_property_zval(this_ptr, SL("file"), &filePath); RETURN_THIS(); @@ -1164,7 +1132,7 @@ PHP_METHOD(Phalcon_Http_Response, setHeaders) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(&existing, this_ptr, "getheaders", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&data, 0, "phalcon/Http/Response.zep", 619); + zephir_is_iterable(&data, 0, "phalcon/Http/Response.zep", 600); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2, _3, _0) { @@ -1393,7 +1361,7 @@ PHP_METHOD(Phalcon_Http_Response, setStatusCode) { ZEPHIR_CALL_METHOD(¤tHeadersRaw, &headers, "toarray", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); - zephir_is_iterable(¤tHeadersRaw, 0, "phalcon/Http/Response.zep", 718); + zephir_is_iterable(¤tHeadersRaw, 0, "phalcon/Http/Response.zep", 699); if (Z_TYPE_P(¤tHeadersRaw) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(¤tHeadersRaw), _3, _4, _1) { @@ -1517,11 +1485,11 @@ PHP_METHOD(Phalcon_Http_Response, setStatusCode) { add_index_stringl(&statusCodes, 510, SL("Not Extended")); add_index_stringl(&statusCodes, 511, SL("Network Authentication Required")); if (UNEXPECTED(!(zephir_array_isset_long(&statusCodes, code)))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_http_response_exception_ce, "Non-standard statuscode given without a message", "phalcon/Http/Response.zep", 795); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_http_response_exception_ce, "Non-standard statuscode given without a message", "phalcon/Http/Response.zep", 776); return; } ZEPHIR_OBS_VAR(&defaultMessage); - zephir_array_fetch_long(&defaultMessage, &statusCodes, code, PH_NOISY, "phalcon/Http/Response.zep", 798 TSRMLS_CC); + zephir_array_fetch_long(&defaultMessage, &statusCodes, code, PH_NOISY, "phalcon/Http/Response.zep", 779 TSRMLS_CC); zephir_get_strval(&message, &defaultMessage); } ZEPHIR_SINIT_VAR(_14); diff --git a/ext/phalcon/http/response/cookies.zep.c b/ext/phalcon/http/response/cookies.zep.c index 0bbe5c87a60..1728648239f 100644 --- a/ext/phalcon/http/response/cookies.zep.c +++ b/ext/phalcon/http/response/cookies.zep.c @@ -79,7 +79,9 @@ */ ZEPHIR_INIT_CLASS(Phalcon_Http_Response_Cookies) { - ZEPHIR_REGISTER_CLASS_EX(Phalcon\\Http\\Response, Cookies, phalcon, http_response_cookies, phalcon_di_abstractinjectionaware_ce, phalcon_http_response_cookies_method_entry, 0); + ZEPHIR_REGISTER_CLASS(Phalcon\\Http\\Response, Cookies, phalcon, http_response_cookies, phalcon_http_response_cookies_method_entry, 0); + + zend_declare_property_null(phalcon_http_response_cookies_ce, SL("container"), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_null(phalcon_http_response_cookies_ce, SL("cookies"), ZEND_ACC_PROTECTED TSRMLS_CC); @@ -96,6 +98,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Http_Response_Cookies) { phalcon_http_response_cookies_ce->create_object = zephir_init_properties_Phalcon_Http_Response_Cookies; zend_class_implements(phalcon_http_response_cookies_ce TSRMLS_CC, 1, phalcon_http_response_cookiesinterface_ce); + zend_class_implements(phalcon_http_response_cookies_ce TSRMLS_CC, 1, phalcon_di_injectionawareinterface_ce); return SUCCESS; } @@ -269,6 +272,18 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, getCookies) { } +/** + * Returns the internal dependency injector + */ +PHP_METHOD(Phalcon_Http_Response_Cookies, getDI) { + + zval *this_ptr = getThis(); + + + RETURN_MEMBER(getThis(), "container"); + +} + /** * Check if a cookie is defined in the bag or exists in the _COOKIE * superglobal @@ -360,13 +375,13 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, send) { ZEPHIR_MM_GROW(); - ZEPHIR_CALL_FUNCTION(&_0, "headers_sent", NULL, 365); + ZEPHIR_CALL_FUNCTION(&_0, "headers_sent", NULL, 363); zephir_check_call_status(); if (zephir_is_true(&_0)) { RETURN_MM_BOOL(0); } zephir_read_property(&_1, this_ptr, SL("cookies"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_1, 0, "phalcon/Http/Response/Cookies.zep", 204); + zephir_is_iterable(&_1, 0, "phalcon/Http/Response/Cookies.zep", 214); if (Z_TYPE_P(&_1) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_1), _2) { @@ -588,7 +603,7 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, set) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_12$$7, "__construct", NULL, 5, &_13$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_12$$7, "phalcon/Http/Response/Cookies.zep", 288 TSRMLS_CC); + zephir_throw_exception_debug(&_12$$7, "phalcon/Http/Response/Cookies.zep", 298 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -608,6 +623,24 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, set) { } +/** + * Sets the dependency injector + */ +PHP_METHOD(Phalcon_Http_Response_Cookies, setDI) { + + zval *container, container_sub; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&container_sub); + + zephir_fetch_params_without_memory_grow(1, 0, &container); + + + + zephir_update_property_zval(this_ptr, SL("container"), container); + +} + /** * Sets the cookie's sign key. * diff --git a/ext/phalcon/http/response/cookies.zep.h b/ext/phalcon/http/response/cookies.zep.h index af89de28750..fec96ad33cf 100644 --- a/ext/phalcon/http/response/cookies.zep.h +++ b/ext/phalcon/http/response/cookies.zep.h @@ -7,11 +7,13 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, __construct); PHP_METHOD(Phalcon_Http_Response_Cookies, delete); PHP_METHOD(Phalcon_Http_Response_Cookies, get); PHP_METHOD(Phalcon_Http_Response_Cookies, getCookies); +PHP_METHOD(Phalcon_Http_Response_Cookies, getDI); PHP_METHOD(Phalcon_Http_Response_Cookies, has); PHP_METHOD(Phalcon_Http_Response_Cookies, isUsingEncryption); PHP_METHOD(Phalcon_Http_Response_Cookies, reset); PHP_METHOD(Phalcon_Http_Response_Cookies, send); PHP_METHOD(Phalcon_Http_Response_Cookies, set); +PHP_METHOD(Phalcon_Http_Response_Cookies, setDI); PHP_METHOD(Phalcon_Http_Response_Cookies, setSignKey); PHP_METHOD(Phalcon_Http_Response_Cookies, useEncryption); zend_object *zephir_init_properties_Phalcon_Http_Response_Cookies(zend_class_entry *class_type TSRMLS_DC); @@ -60,6 +62,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_http_response_cookies_ge #endif ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_response_cookies_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_http_response_cookies_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) +#endif +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_http_response_cookies_has, 0, 1, _IS_BOOL, 0) #else @@ -131,6 +140,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_http_response_cookies_se #endif ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_http_response_cookies_setdi, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_response_cookies_setsignkey, 0, 0, Phalcon\\Http\\CookieInterface, 0) #else @@ -160,11 +173,13 @@ ZEPHIR_INIT_FUNCS(phalcon_http_response_cookies_method_entry) { PHP_ME(Phalcon_Http_Response_Cookies, delete, arginfo_phalcon_http_response_cookies_delete, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Cookies, get, arginfo_phalcon_http_response_cookies_get, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Cookies, getCookies, arginfo_phalcon_http_response_cookies_getcookies, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Http_Response_Cookies, getDI, arginfo_phalcon_http_response_cookies_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Cookies, has, arginfo_phalcon_http_response_cookies_has, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Cookies, isUsingEncryption, arginfo_phalcon_http_response_cookies_isusingencryption, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Cookies, reset, arginfo_phalcon_http_response_cookies_reset, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Cookies, send, arginfo_phalcon_http_response_cookies_send, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Cookies, set, arginfo_phalcon_http_response_cookies_set, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Http_Response_Cookies, setDI, arginfo_phalcon_http_response_cookies_setdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Cookies, setSignKey, arginfo_phalcon_http_response_cookies_setsignkey, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Cookies, useEncryption, arginfo_phalcon_http_response_cookies_useencryption, ZEND_ACC_PUBLIC) PHP_FE_END diff --git a/ext/phalcon/http/response/headers.zep.c b/ext/phalcon/http/response/headers.zep.c index 2c9da668298..85e267588bf 100644 --- a/ext/phalcon/http/response/headers.zep.c +++ b/ext/phalcon/http/response/headers.zep.c @@ -182,7 +182,7 @@ PHP_METHOD(Phalcon_Http_Response_Headers, send) { ZEPHIR_MM_GROW(); - ZEPHIR_CALL_FUNCTION(&_0, "headers_sent", NULL, 365); + ZEPHIR_CALL_FUNCTION(&_0, "headers_sent", NULL, 363); zephir_check_call_status(); if (zephir_is_true(&_0)) { RETURN_MM_BOOL(0); @@ -203,7 +203,7 @@ PHP_METHOD(Phalcon_Http_Response_Headers, send) { if (Z_TYPE_P(&value) != IS_NULL) { ZEPHIR_INIT_LNVAR(_6$$5); ZEPHIR_CONCAT_VSV(&_6$$5, &header, ": ", &value); - ZEPHIR_CALL_FUNCTION(NULL, "header", &_7, 366, &_6$$5, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "header", &_7, 364, &_6$$5, &__$true); zephir_check_call_status(); } else { _8$$6 = zephir_memnstr_str(&header, SL(":"), "phalcon/Http/Response/Headers.zep", 88); @@ -215,12 +215,12 @@ PHP_METHOD(Phalcon_Http_Response_Headers, send) { _8$$6 = ZEPHIR_IS_STRING(&_11$$6, "HTTP/"); } if (_8$$6) { - ZEPHIR_CALL_FUNCTION(NULL, "header", &_7, 366, &header, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "header", &_7, 364, &header, &__$true); zephir_check_call_status(); } else { ZEPHIR_INIT_LNVAR(_12$$8); ZEPHIR_CONCAT_VS(&_12$$8, &header, ": "); - ZEPHIR_CALL_FUNCTION(NULL, "header", &_7, 366, &_12$$8, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "header", &_7, 364, &_12$$8, &__$true); zephir_check_call_status(); } } @@ -241,7 +241,7 @@ PHP_METHOD(Phalcon_Http_Response_Headers, send) { if (Z_TYPE_P(&value) != IS_NULL) { ZEPHIR_INIT_LNVAR(_13$$10); ZEPHIR_CONCAT_VSV(&_13$$10, &header, ": ", &value); - ZEPHIR_CALL_FUNCTION(NULL, "header", &_7, 366, &_13$$10, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "header", &_7, 364, &_13$$10, &__$true); zephir_check_call_status(); } else { _14$$11 = zephir_memnstr_str(&header, SL(":"), "phalcon/Http/Response/Headers.zep", 88); @@ -253,12 +253,12 @@ PHP_METHOD(Phalcon_Http_Response_Headers, send) { _14$$11 = ZEPHIR_IS_STRING(&_17$$11, "HTTP/"); } if (_14$$11) { - ZEPHIR_CALL_FUNCTION(NULL, "header", &_7, 366, &header, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "header", &_7, 364, &header, &__$true); zephir_check_call_status(); } else { ZEPHIR_INIT_LNVAR(_18$$13); ZEPHIR_CONCAT_VS(&_18$$13, &header, ": "); - ZEPHIR_CALL_FUNCTION(NULL, "header", &_7, 366, &_18$$13, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "header", &_7, 364, &_18$$13, &__$true); zephir_check_call_status(); } } diff --git a/ext/phalcon/image/adapter/gd.zep.c b/ext/phalcon/image/adapter/gd.zep.c index 3ab1ff47211..75027bce68f 100644 --- a/ext/phalcon/image/adapter/gd.zep.c +++ b/ext/phalcon/image/adapter/gd.zep.c @@ -128,7 +128,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __construct) { zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("realpath"), &_3$$4); zephir_read_property(&_4$$4, this_ptr, SL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&imageinfo, "getimagesize", NULL, 367, &_4$$4); + ZEPHIR_CALL_FUNCTION(&imageinfo, "getimagesize", NULL, 365, &_4$$4); zephir_check_call_status(); if (zephir_is_true(&imageinfo)) { zephir_array_fetch_long(&_5$$5, &imageinfo, 0, PH_NOISY | PH_READONLY, "phalcon/Image/Adapter/Gd.zep", 36 TSRMLS_CC); @@ -144,35 +144,35 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __construct) { do { if (ZEPHIR_IS_LONG(&_9$$4, 1)) { zephir_read_property(&_10$$6, this_ptr, SL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_11$$6, "imagecreatefromgif", NULL, 368, &_10$$6); + ZEPHIR_CALL_FUNCTION(&_11$$6, "imagecreatefromgif", NULL, 366, &_10$$6); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("image"), &_11$$6); break; } if (ZEPHIR_IS_LONG(&_9$$4, 2)) { zephir_read_property(&_12$$7, this_ptr, SL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_13$$7, "imagecreatefromjpeg", NULL, 369, &_12$$7); + ZEPHIR_CALL_FUNCTION(&_13$$7, "imagecreatefromjpeg", NULL, 367, &_12$$7); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("image"), &_13$$7); break; } if (ZEPHIR_IS_LONG(&_9$$4, 3)) { zephir_read_property(&_14$$8, this_ptr, SL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_15$$8, "imagecreatefrompng", NULL, 370, &_14$$8); + ZEPHIR_CALL_FUNCTION(&_15$$8, "imagecreatefrompng", NULL, 368, &_14$$8); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("image"), &_15$$8); break; } if (ZEPHIR_IS_LONG(&_9$$4, 15)) { zephir_read_property(&_16$$9, this_ptr, SL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_17$$9, "imagecreatefromwbmp", NULL, 371, &_16$$9); + ZEPHIR_CALL_FUNCTION(&_17$$9, "imagecreatefromwbmp", NULL, 369, &_16$$9); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("image"), &_17$$9); break; } if (ZEPHIR_IS_LONG(&_9$$4, 16)) { zephir_read_property(&_18$$10, this_ptr, SL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_19$$10, "imagecreatefromxbm", NULL, 372, &_18$$10); + ZEPHIR_CALL_FUNCTION(&_19$$10, "imagecreatefromxbm", NULL, 370, &_18$$10); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("image"), &_19$$10); break; @@ -195,7 +195,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __construct) { } while(0); zephir_read_property(&_24$$4, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 373, &_24$$4, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 371, &_24$$4, &__$true); zephir_check_call_status(); } else { _25$$13 = !width; @@ -216,14 +216,14 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __construct) { } ZVAL_LONG(&_29$$13, width); ZVAL_LONG(&_30$$13, height); - ZEPHIR_CALL_FUNCTION(&_31$$13, "imagecreatetruecolor", NULL, 374, &_29$$13, &_30$$13); + ZEPHIR_CALL_FUNCTION(&_31$$13, "imagecreatetruecolor", NULL, 372, &_29$$13, &_30$$13); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("image"), &_31$$13); zephir_read_property(&_29$$13, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 375, &_29$$13, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 373, &_29$$13, &__$true); zephir_check_call_status(); zephir_read_property(&_30$$13, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 373, &_30$$13, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 371, &_30$$13, &__$true); zephir_check_call_status(); zephir_read_property(&_32$$13, this_ptr, SL("file"), PH_NOISY_CC | PH_READONLY); zephir_update_property_zval(this_ptr, SL("realpath"), &_32$$13); @@ -260,7 +260,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __destruct) { zephir_read_property(&_0, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&image, &_0); if (Z_TYPE_P(&image) == IS_RESOURCE) { - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 376, &image); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 374, &image); zephir_check_call_status(); } ZEPHIR_MM_RESTORE(); @@ -300,7 +300,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, check) { ZVAL_STRING(&_1, "2.0.1"); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, ">="); - ZEPHIR_CALL_FUNCTION(&_3, "version_compare", NULL, 377, &version, &_1, &_2); + ZEPHIR_CALL_FUNCTION(&_3, "version_compare", NULL, 375, &version, &_1, &_2); zephir_check_call_status(); if (UNEXPECTED(!zephir_is_true(&_3))) { ZEPHIR_INIT_VAR(&_4$$5); @@ -352,7 +352,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, getVersion) { ZEPHIR_INIT_NVAR(&version); ZEPHIR_MM_GET_CONSTANT(&version, "GD_VERSION"); } else { - ZEPHIR_CALL_FUNCTION(&info, "gd_info", NULL, 378); + ZEPHIR_CALL_FUNCTION(&info, "gd_info", NULL, 376); zephir_check_call_status(); ZEPHIR_INIT_VAR(&matches); ZVAL_NULL(&matches); @@ -412,9 +412,9 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processBackground) { ZVAL_LONG(&_3, g); ZVAL_LONG(&_4, b); ZVAL_LONG(&_5, opacity); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 379, &background, &_2, &_3, &_4, &_5); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 377, &background, &_2, &_3, &_4, &_5); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 375, &background, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 373, &background, &__$true); zephir_check_call_status(); zephir_read_property(&_2, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_3, this_ptr, SL("width"), PH_NOISY_CC | PH_READONLY); @@ -423,11 +423,11 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processBackground) { ZVAL_LONG(&_6, 0); ZVAL_LONG(&_7, 0); ZVAL_LONG(&_8, 0); - ZEPHIR_CALL_FUNCTION(&_9, "imagecopy", NULL, 380, &background, &_2, &_5, &_6, &_7, &_8, &_3, &_4); + ZEPHIR_CALL_FUNCTION(&_9, "imagecopy", NULL, 378, &background, &_2, &_5, &_6, &_7, &_8, &_3, &_4); zephir_check_call_status(); if (zephir_is_true(&_9)) { zephir_read_property(&_10$$3, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 376, &_10$$3); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 374, &_10$$3); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("image"), &background); } @@ -459,7 +459,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processBlur) { } zephir_read_property(&_0$$3, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1$$3, 7); - ZEPHIR_CALL_FUNCTION(NULL, "imagefilter", &_2, 381, &_0$$3, &_1$$3); + ZEPHIR_CALL_FUNCTION(NULL, "imagefilter", &_2, 379, &_0$$3, &_1$$3); zephir_check_call_status(); i++; } @@ -489,11 +489,11 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processCreate) { ZVAL_LONG(&_0, width); ZVAL_LONG(&_1, height); - ZEPHIR_CALL_FUNCTION(&image, "imagecreatetruecolor", NULL, 374, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&image, "imagecreatetruecolor", NULL, 372, &_0, &_1); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 375, &image, &__$false); + ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 373, &image, &__$false); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 373, &image, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 371, &image, &__$true); zephir_check_call_status(); RETURN_CCTOR(&image); @@ -538,16 +538,16 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processCrop) { ZVAL_LONG(&_0, height); zephir_array_update_string(&rect, SL("height"), &_0, PH_COPY | PH_SEPARATE); zephir_read_property(&_1, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&image, "imagecrop", NULL, 382, &_1, &rect); + ZEPHIR_CALL_FUNCTION(&image, "imagecrop", NULL, 380, &_1, &rect); zephir_check_call_status(); zephir_read_property(&_2, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 376, &_2); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 374, &_2); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("image"), &image); - ZEPHIR_CALL_FUNCTION(&_3, "imagesx", NULL, 383, &image); + ZEPHIR_CALL_FUNCTION(&_3, "imagesx", NULL, 381, &image); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("width"), &_3); - ZEPHIR_CALL_FUNCTION(&_4, "imagesy", NULL, 384, &image); + ZEPHIR_CALL_FUNCTION(&_4, "imagesy", NULL, 382, &image); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("height"), &_4); ZEPHIR_MM_RESTORE(); @@ -575,12 +575,12 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processFlip) { if (direction == 11) { zephir_read_property(&_0$$3, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1$$3, 1); - ZEPHIR_CALL_FUNCTION(NULL, "imageflip", NULL, 385, &_0$$3, &_1$$3); + ZEPHIR_CALL_FUNCTION(NULL, "imageflip", NULL, 383, &_0$$3, &_1$$3); zephir_check_call_status(); } else { zephir_read_property(&_2$$4, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_3$$4, 2); - ZEPHIR_CALL_FUNCTION(NULL, "imageflip", NULL, 385, &_2$$4, &_3$$4); + ZEPHIR_CALL_FUNCTION(NULL, "imageflip", NULL, 383, &_2$$4, &_3$$4); zephir_check_call_status(); } ZEPHIR_MM_RESTORE(); @@ -640,32 +640,32 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processMask) { ZEPHIR_CALL_METHOD(&_0, mask, "render", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&maskImage, "imagecreatefromstring", NULL, 386, &_0); + ZEPHIR_CALL_FUNCTION(&maskImage, "imagecreatefromstring", NULL, 384, &_0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_1, "imagesx", NULL, 383, &maskImage); + ZEPHIR_CALL_FUNCTION(&_1, "imagesx", NULL, 381, &maskImage); zephir_check_call_status(); mask_width = zephir_get_intval(&_1); - ZEPHIR_CALL_FUNCTION(&_2, "imagesy", NULL, 384, &maskImage); + ZEPHIR_CALL_FUNCTION(&_2, "imagesy", NULL, 382, &maskImage); zephir_check_call_status(); mask_height = zephir_get_intval(&_2); alpha = 127; - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 373, &maskImage, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 371, &maskImage, &__$true); zephir_check_call_status(); zephir_read_property(&_3, this_ptr, SL("width"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_4, this_ptr, SL("height"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&newimage, this_ptr, "processcreate", NULL, 0, &_3, &_4); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 373, &newimage, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 371, &newimage, &__$true); zephir_check_call_status(); ZVAL_LONG(&_5, 0); ZVAL_LONG(&_6, 0); ZVAL_LONG(&_7, 0); ZVAL_LONG(&_8, alpha); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 379, &newimage, &_5, &_6, &_7, &_8); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 377, &newimage, &_5, &_6, &_7, &_8); zephir_check_call_status(); ZVAL_LONG(&_5, 0); ZVAL_LONG(&_6, 0); - ZEPHIR_CALL_FUNCTION(NULL, "imagefill", NULL, 387, &newimage, &_5, &_6, &color); + ZEPHIR_CALL_FUNCTION(NULL, "imagefill", NULL, 385, &newimage, &_5, &_6, &color); zephir_check_call_status(); zephir_read_property(&_5, this_ptr, SL("width"), PH_NOISY_CC | PH_READONLY); _9 = !ZEPHIR_IS_LONG(&_5, mask_width); @@ -676,7 +676,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processMask) { if (_9) { zephir_read_property(&_10$$3, this_ptr, SL("width"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_11$$3, this_ptr, SL("height"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&tempImage, "imagecreatetruecolor", NULL, 374, &_10$$3, &_11$$3); + ZEPHIR_CALL_FUNCTION(&tempImage, "imagecreatetruecolor", NULL, 372, &_10$$3, &_11$$3); zephir_check_call_status(); zephir_read_property(&_12$$3, this_ptr, SL("width"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_13$$3, this_ptr, SL("height"), PH_NOISY_CC | PH_READONLY); @@ -686,9 +686,9 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processMask) { ZVAL_LONG(&_17$$3, 0); ZVAL_LONG(&_18$$3, mask_width); ZVAL_LONG(&_19$$3, mask_height); - ZEPHIR_CALL_FUNCTION(NULL, "imagecopyresampled", NULL, 388, &tempImage, &maskImage, &_14$$3, &_15$$3, &_16$$3, &_17$$3, &_12$$3, &_13$$3, &_18$$3, &_19$$3); + ZEPHIR_CALL_FUNCTION(NULL, "imagecopyresampled", NULL, 386, &tempImage, &maskImage, &_14$$3, &_15$$3, &_16$$3, &_17$$3, &_12$$3, &_13$$3, &_18$$3, &_19$$3); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 376, &maskImage); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 374, &maskImage); zephir_check_call_status(); ZEPHIR_CPY_WRT(&maskImage, &tempImage); } @@ -706,9 +706,9 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processMask) { } ZVAL_LONG(&_21$$5, x); ZVAL_LONG(&_22$$5, y); - ZEPHIR_CALL_FUNCTION(&index, "imagecolorat", &_23, 389, &maskImage, &_21$$5, &_22$$5); + ZEPHIR_CALL_FUNCTION(&index, "imagecolorat", &_23, 387, &maskImage, &_21$$5, &_22$$5); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorsforindex", &_24, 390, &maskImage, &index); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorsforindex", &_24, 388, &maskImage, &index); zephir_check_call_status(); if (zephir_array_isset_string(&color, SL("red"))) { zephir_array_fetch_string(&_25$$6, &color, SL("red"), PH_NOISY | PH_READONLY, "phalcon/Image/Adapter/Gd.zep", 289 TSRMLS_CC); @@ -718,10 +718,10 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processMask) { zephir_read_property(&_21$$5, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_22$$5, x); ZVAL_LONG(&_27$$5, y); - ZEPHIR_CALL_FUNCTION(&index, "imagecolorat", &_23, 389, &_21$$5, &_22$$5, &_27$$5); + ZEPHIR_CALL_FUNCTION(&index, "imagecolorat", &_23, 387, &_21$$5, &_22$$5, &_27$$5); zephir_check_call_status(); zephir_read_property(&_22$$5, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorsforindex", &_24, 390, &_22$$5, &index); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorsforindex", &_24, 388, &_22$$5, &index); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&r); zephir_array_fetch_string(&r, &color, SL("red"), PH_NOISY, "phalcon/Image/Adapter/Gd.zep", 294 TSRMLS_CC); @@ -730,20 +730,20 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processMask) { ZEPHIR_OBS_NVAR(&b); zephir_array_fetch_string(&b, &color, SL("blue"), PH_NOISY, "phalcon/Image/Adapter/Gd.zep", 296 TSRMLS_CC); ZVAL_LONG(&_27$$5, alpha); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 379, &newimage, &r, &g, &b, &_27$$5); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 377, &newimage, &r, &g, &b, &_27$$5); zephir_check_call_status(); ZVAL_LONG(&_27$$5, x); ZVAL_LONG(&_28$$5, y); - ZEPHIR_CALL_FUNCTION(NULL, "imagesetpixel", &_29, 391, &newimage, &_27$$5, &_28$$5, &color); + ZEPHIR_CALL_FUNCTION(NULL, "imagesetpixel", &_29, 389, &newimage, &_27$$5, &_28$$5, &color); zephir_check_call_status(); y++; } x++; } zephir_read_property(&_8, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 376, &_8); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 374, &_8); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 376, &maskImage); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 374, &maskImage); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("image"), &newimage); ZEPHIR_MM_RESTORE(); @@ -803,7 +803,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processPixelate) { zephir_read_property(&_5$$4, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_6$$4, x1); ZVAL_LONG(&_7$$4, y1); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorat", &_8, 389, &_5$$4, &_6$$4, &_7$$4); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorat", &_8, 387, &_5$$4, &_6$$4, &_7$$4); zephir_check_call_status(); x2 = (x + amount); y2 = (y + amount); @@ -812,7 +812,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processPixelate) { ZVAL_LONG(&_9$$4, y); ZVAL_LONG(&_10$$4, x2); ZVAL_LONG(&_11$$4, y2); - ZEPHIR_CALL_FUNCTION(NULL, "imagefilledrectangle", &_12, 392, &_6$$4, &_7$$4, &_9$$4, &_10$$4, &_11$$4, &color); + ZEPHIR_CALL_FUNCTION(NULL, "imagefilledrectangle", &_12, 390, &_6$$4, &_7$$4, &_9$$4, &_10$$4, &_11$$4, &color); zephir_check_call_status(); y += amount; } @@ -893,7 +893,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processReflection) { ZVAL_LONG(&_8, 0); ZVAL_LONG(&_9, 0); ZVAL_LONG(&_10, 0); - ZEPHIR_CALL_FUNCTION(NULL, "imagecopy", NULL, 380, &reflection, &_4, &_7, &_8, &_9, &_10, &_5, &_6); + ZEPHIR_CALL_FUNCTION(NULL, "imagecopy", NULL, 378, &reflection, &_4, &_7, &_8, &_9, &_10, &_5, &_6); zephir_check_call_status(); offset = 0; while (1) { @@ -926,14 +926,14 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processReflection) { ZVAL_LONG(&_22$$5, 0); ZVAL_LONG(&_23$$5, src_y); ZVAL_LONG(&_24$$5, 1); - ZEPHIR_CALL_FUNCTION(NULL, "imagecopy", NULL, 380, &line, &_18$$5, &_20$$5, &_21$$5, &_22$$5, &_23$$5, &_19$$5, &_24$$5); + ZEPHIR_CALL_FUNCTION(NULL, "imagecopy", NULL, 378, &line, &_18$$5, &_20$$5, &_21$$5, &_22$$5, &_23$$5, &_19$$5, &_24$$5); zephir_check_call_status(); ZVAL_LONG(&_20$$5, 4); ZVAL_LONG(&_21$$5, 0); ZVAL_LONG(&_22$$5, 0); ZVAL_LONG(&_23$$5, 0); ZVAL_LONG(&_24$$5, dst_opacity); - ZEPHIR_CALL_FUNCTION(NULL, "imagefilter", &_25, 381, &line, &_20$$5, &_21$$5, &_22$$5, &_23$$5, &_24$$5); + ZEPHIR_CALL_FUNCTION(NULL, "imagefilter", &_25, 379, &line, &_20$$5, &_21$$5, &_22$$5, &_23$$5, &_24$$5); zephir_check_call_status(); zephir_read_property(&_20$$5, this_ptr, SL("width"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_21$$5, 0); @@ -941,18 +941,18 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processReflection) { ZVAL_LONG(&_23$$5, 0); ZVAL_LONG(&_24$$5, 0); ZVAL_LONG(&_26$$5, 1); - ZEPHIR_CALL_FUNCTION(NULL, "imagecopy", NULL, 380, &reflection, &line, &_21$$5, &_22$$5, &_23$$5, &_24$$5, &_20$$5, &_26$$5); + ZEPHIR_CALL_FUNCTION(NULL, "imagecopy", NULL, 378, &reflection, &line, &_21$$5, &_22$$5, &_23$$5, &_24$$5, &_20$$5, &_26$$5); zephir_check_call_status(); offset++; } zephir_read_property(&_7, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 376, &_7); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 374, &_7); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("image"), &reflection); - ZEPHIR_CALL_FUNCTION(&_27, "imagesx", NULL, 383, &reflection); + ZEPHIR_CALL_FUNCTION(&_27, "imagesx", NULL, 381, &reflection); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("width"), &_27); - ZEPHIR_CALL_FUNCTION(&_28, "imagesy", NULL, 384, &reflection); + ZEPHIR_CALL_FUNCTION(&_28, "imagesy", NULL, 382, &reflection); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("height"), &_28); ZEPHIR_MM_RESTORE(); @@ -997,56 +997,56 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processRender) { ZEPHIR_INIT_VAR(&_0); zephir_fast_strtolower(&_0, &ext); zephir_get_strval(&ext, &_0); - ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 393); + ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 391); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "gif"); - ZEPHIR_CALL_FUNCTION(&_2, "strcmp", NULL, 394, &ext, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "strcmp", NULL, 392, &ext, &_1); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "jpg"); - ZEPHIR_CALL_FUNCTION(&_3, "strcmp", NULL, 394, &ext, &_1); + ZEPHIR_CALL_FUNCTION(&_3, "strcmp", NULL, 392, &ext, &_1); zephir_check_call_status(); _4 = ZEPHIR_IS_LONG(&_3, 0); if (!(_4)) { ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "jpeg"); - ZEPHIR_CALL_FUNCTION(&_5, "strcmp", NULL, 394, &ext, &_1); + ZEPHIR_CALL_FUNCTION(&_5, "strcmp", NULL, 392, &ext, &_1); zephir_check_call_status(); _4 = ZEPHIR_IS_LONG(&_5, 0); } ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "png"); - ZEPHIR_CALL_FUNCTION(&_6, "strcmp", NULL, 394, &ext, &_1); + ZEPHIR_CALL_FUNCTION(&_6, "strcmp", NULL, 392, &ext, &_1); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "wbmp"); - ZEPHIR_CALL_FUNCTION(&_7, "strcmp", NULL, 394, &ext, &_1); + ZEPHIR_CALL_FUNCTION(&_7, "strcmp", NULL, 392, &ext, &_1); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "xbm"); - ZEPHIR_CALL_FUNCTION(&_8, "strcmp", NULL, 394, &ext, &_1); + ZEPHIR_CALL_FUNCTION(&_8, "strcmp", NULL, 392, &ext, &_1); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&_2, 0)) { zephir_read_property(&_9$$3, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagegif", NULL, 395, &_9$$3); + ZEPHIR_CALL_FUNCTION(NULL, "imagegif", NULL, 393, &_9$$3); zephir_check_call_status(); } else if (_4) { zephir_read_property(&_10$$4, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_11$$4, quality); - ZEPHIR_CALL_FUNCTION(NULL, "imagejpeg", NULL, 396, &_10$$4, &__$null, &_11$$4); + ZEPHIR_CALL_FUNCTION(NULL, "imagejpeg", NULL, 394, &_10$$4, &__$null, &_11$$4); zephir_check_call_status(); } else if (ZEPHIR_IS_LONG(&_6, 0)) { zephir_read_property(&_12$$5, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagepng", NULL, 397, &_12$$5); + ZEPHIR_CALL_FUNCTION(NULL, "imagepng", NULL, 395, &_12$$5); zephir_check_call_status(); } else if (ZEPHIR_IS_LONG(&_7, 0)) { zephir_read_property(&_13$$6, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagewbmp", NULL, 398, &_13$$6); + ZEPHIR_CALL_FUNCTION(NULL, "imagewbmp", NULL, 396, &_13$$6); zephir_check_call_status(); } else if (ZEPHIR_IS_LONG(&_8, 0)) { zephir_read_property(&_14$$7, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagexbm", NULL, 399, &_14$$7, &__$null); + ZEPHIR_CALL_FUNCTION(NULL, "imagexbm", NULL, 397, &_14$$7, &__$null); zephir_check_call_status(); } else { ZEPHIR_INIT_VAR(&_15$$8); @@ -1059,7 +1059,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processRender) { ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_RETURN_CALL_FUNCTION("ob_get_clean", NULL, 400); + ZEPHIR_RETURN_CALL_FUNCTION("ob_get_clean", NULL, 398); zephir_check_call_status(); RETURN_MM(); @@ -1089,16 +1089,16 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processResize) { zephir_read_property(&_0, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1, width); ZVAL_LONG(&_2, height); - ZEPHIR_CALL_FUNCTION(&image, "imagescale", NULL, 401, &_0, &_1, &_2); + ZEPHIR_CALL_FUNCTION(&image, "imagescale", NULL, 399, &_0, &_1, &_2); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 376, &_1); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 374, &_1); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("image"), &image); - ZEPHIR_CALL_FUNCTION(&_3, "imagesx", NULL, 383, &image); + ZEPHIR_CALL_FUNCTION(&_3, "imagesx", NULL, 381, &image); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("width"), &_3); - ZEPHIR_CALL_FUNCTION(&_4, "imagesy", NULL, 384, &image); + ZEPHIR_CALL_FUNCTION(&_4, "imagesy", NULL, 382, &image); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("height"), &_4); ZEPHIR_MM_RESTORE(); @@ -1139,18 +1139,18 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processRotate) { ZVAL_LONG(&_2, 0); ZVAL_LONG(&_3, 0); ZVAL_LONG(&_4, 127); - ZEPHIR_CALL_FUNCTION(&transparent, "imagecolorallocatealpha", NULL, 379, &_0, &_1, &_2, &_3, &_4); + ZEPHIR_CALL_FUNCTION(&transparent, "imagecolorallocatealpha", NULL, 377, &_0, &_1, &_2, &_3, &_4); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_2, (360 - degrees)); ZVAL_LONG(&_3, 1); - ZEPHIR_CALL_FUNCTION(&image, "imagerotate", NULL, 402, &_1, &_2, &transparent, &_3); + ZEPHIR_CALL_FUNCTION(&image, "imagerotate", NULL, 400, &_1, &_2, &transparent, &_3); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 373, &image, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 371, &image, &__$true); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&width, "imagesx", NULL, 383, &image); + ZEPHIR_CALL_FUNCTION(&width, "imagesx", NULL, 381, &image); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&height, "imagesy", NULL, 384, &image); + ZEPHIR_CALL_FUNCTION(&height, "imagesy", NULL, 382, &image); zephir_check_call_status(); zephir_read_property(&_2, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_3, 0); @@ -1158,11 +1158,11 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processRotate) { ZVAL_LONG(&_5, 0); ZVAL_LONG(&_6, 0); ZVAL_LONG(&_7, 100); - ZEPHIR_CALL_FUNCTION(&_8, "imagecopymerge", NULL, 403, &_2, &image, &_3, &_4, &_5, &_6, &width, &height, &_7); + ZEPHIR_CALL_FUNCTION(&_8, "imagecopymerge", NULL, 401, &_2, &image, &_3, &_4, &_5, &_6, &width, &height, &_7); zephir_check_call_status(); if (zephir_is_true(&_8)) { zephir_read_property(&_9$$3, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 376, &_9$$3); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 374, &_9$$3); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("image"), &image); zephir_update_property_zval(this_ptr, SL("width"), &width); @@ -1224,7 +1224,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processSave) { zephir_check_call_status(); if (!(zephir_is_true(&ext))) { zephir_read_property(&_1$$3, this_ptr, SL("type"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&ext, "image_type_to_extension", NULL, 404, &_1$$3, &__$false); + ZEPHIR_CALL_FUNCTION(&ext, "image_type_to_extension", NULL, 402, &_1$$3, &__$false); zephir_check_call_status(); } ZEPHIR_INIT_VAR(&_2); @@ -1232,30 +1232,30 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processSave) { ZEPHIR_CPY_WRT(&ext, &_2); ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "gif"); - ZEPHIR_CALL_FUNCTION(&_3, "strcmp", NULL, 394, &ext, &_2); + ZEPHIR_CALL_FUNCTION(&_3, "strcmp", NULL, 392, &ext, &_2); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&_3, 0)) { ZEPHIR_INIT_ZVAL_NREF(_4$$4); ZVAL_LONG(&_4$$4, 1); zephir_update_property_zval(this_ptr, SL("type"), &_4$$4); zephir_read_property(&_4$$4, this_ptr, SL("type"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_5$$4, "image_type_to_mime_type", NULL, 405, &_4$$4); + ZEPHIR_CALL_FUNCTION(&_5$$4, "image_type_to_mime_type", NULL, 403, &_4$$4); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("mime"), &_5$$4); zephir_read_property(&_6$$4, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagegif", NULL, 395, &_6$$4, &file); + ZEPHIR_CALL_FUNCTION(NULL, "imagegif", NULL, 393, &_6$$4, &file); zephir_check_call_status(); RETURN_MM_BOOL(1); } ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "jpg"); - ZEPHIR_CALL_FUNCTION(&_7, "strcmp", NULL, 394, &ext, &_2); + ZEPHIR_CALL_FUNCTION(&_7, "strcmp", NULL, 392, &ext, &_2); zephir_check_call_status(); _8 = ZEPHIR_IS_LONG(&_7, 0); if (!(_8)) { ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "jpeg"); - ZEPHIR_CALL_FUNCTION(&_9, "strcmp", NULL, 394, &ext, &_2); + ZEPHIR_CALL_FUNCTION(&_9, "strcmp", NULL, 392, &ext, &_2); zephir_check_call_status(); _8 = ZEPHIR_IS_LONG(&_9, 0); } @@ -1264,7 +1264,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processSave) { ZVAL_LONG(&_10$$5, 2); zephir_update_property_zval(this_ptr, SL("type"), &_10$$5); zephir_read_property(&_10$$5, this_ptr, SL("type"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_11$$5, "image_type_to_mime_type", NULL, 405, &_10$$5); + ZEPHIR_CALL_FUNCTION(&_11$$5, "image_type_to_mime_type", NULL, 403, &_10$$5); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("mime"), &_11$$5); if (quality >= 0) { @@ -1275,63 +1275,63 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processSave) { } zephir_read_property(&_12$$6, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_13$$6, quality); - ZEPHIR_CALL_FUNCTION(NULL, "imagejpeg", NULL, 396, &_12$$6, &file, &_13$$6); + ZEPHIR_CALL_FUNCTION(NULL, "imagejpeg", NULL, 394, &_12$$6, &file, &_13$$6); zephir_check_call_status(); } else { zephir_read_property(&_14$$9, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagejpeg", NULL, 396, &_14$$9, &file); + ZEPHIR_CALL_FUNCTION(NULL, "imagejpeg", NULL, 394, &_14$$9, &file); zephir_check_call_status(); } RETURN_MM_BOOL(1); } ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "png"); - ZEPHIR_CALL_FUNCTION(&_15, "strcmp", NULL, 394, &ext, &_2); + ZEPHIR_CALL_FUNCTION(&_15, "strcmp", NULL, 392, &ext, &_2); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&_15, 0)) { ZEPHIR_INIT_ZVAL_NREF(_16$$10); ZVAL_LONG(&_16$$10, 3); zephir_update_property_zval(this_ptr, SL("type"), &_16$$10); zephir_read_property(&_16$$10, this_ptr, SL("type"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_17$$10, "image_type_to_mime_type", NULL, 405, &_16$$10); + ZEPHIR_CALL_FUNCTION(&_17$$10, "image_type_to_mime_type", NULL, 403, &_16$$10); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("mime"), &_17$$10); zephir_read_property(&_18$$10, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagepng", NULL, 397, &_18$$10, &file); + ZEPHIR_CALL_FUNCTION(NULL, "imagepng", NULL, 395, &_18$$10, &file); zephir_check_call_status(); RETURN_MM_BOOL(1); } ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "wbmp"); - ZEPHIR_CALL_FUNCTION(&_19, "strcmp", NULL, 394, &ext, &_2); + ZEPHIR_CALL_FUNCTION(&_19, "strcmp", NULL, 392, &ext, &_2); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&_19, 0)) { ZEPHIR_INIT_ZVAL_NREF(_20$$11); ZVAL_LONG(&_20$$11, 15); zephir_update_property_zval(this_ptr, SL("type"), &_20$$11); zephir_read_property(&_20$$11, this_ptr, SL("type"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_21$$11, "image_type_to_mime_type", NULL, 405, &_20$$11); + ZEPHIR_CALL_FUNCTION(&_21$$11, "image_type_to_mime_type", NULL, 403, &_20$$11); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("mime"), &_21$$11); zephir_read_property(&_22$$11, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagewbmp", NULL, 398, &_22$$11, &file); + ZEPHIR_CALL_FUNCTION(NULL, "imagewbmp", NULL, 396, &_22$$11, &file); zephir_check_call_status(); RETURN_MM_BOOL(1); } ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "xbm"); - ZEPHIR_CALL_FUNCTION(&_23, "strcmp", NULL, 394, &ext, &_2); + ZEPHIR_CALL_FUNCTION(&_23, "strcmp", NULL, 392, &ext, &_2); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&_23, 0)) { ZEPHIR_INIT_ZVAL_NREF(_24$$12); ZVAL_LONG(&_24$$12, 16); zephir_update_property_zval(this_ptr, SL("type"), &_24$$12); zephir_read_property(&_24$$12, this_ptr, SL("type"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_25$$12, "image_type_to_mime_type", NULL, 405, &_24$$12); + ZEPHIR_CALL_FUNCTION(&_25$$12, "image_type_to_mime_type", NULL, 403, &_24$$12); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("mime"), &_25$$12); zephir_read_property(&_26$$12, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagexbm", NULL, 399, &_26$$12, &file); + ZEPHIR_CALL_FUNCTION(NULL, "imagexbm", NULL, 397, &_26$$12, &file); zephir_check_call_status(); RETURN_MM_BOOL(1); } @@ -1424,15 +1424,15 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processSharpen) { zephir_read_property(&_5, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_6, (amount - 8)); ZVAL_LONG(&_7, 0); - ZEPHIR_CALL_FUNCTION(&_8, "imageconvolution", NULL, 406, &_5, &matrix, &_6, &_7); + ZEPHIR_CALL_FUNCTION(&_8, "imageconvolution", NULL, 404, &_5, &matrix, &_6, &_7); zephir_check_call_status(); if (zephir_is_true(&_8)) { zephir_read_property(&_9$$3, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_10$$3, "imagesx", NULL, 383, &_9$$3); + ZEPHIR_CALL_FUNCTION(&_10$$3, "imagesx", NULL, 381, &_9$$3); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("width"), &_10$$3); zephir_read_property(&_11$$3, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_12$$3, "imagesy", NULL, 384, &_11$$3); + ZEPHIR_CALL_FUNCTION(&_12$$3, "imagesy", NULL, 382, &_11$$3); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("height"), &_12$$3); } @@ -1507,7 +1507,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processText) { if (!(Z_TYPE_P(&fontfile) == IS_UNDEF) && Z_STRLEN_P(&fontfile)) { ZVAL_LONG(&_3$$3, size); ZVAL_LONG(&_4$$3, 0); - ZEPHIR_CALL_FUNCTION(&space, "imagettfbbox", NULL, 407, &_3$$3, &_4$$3, &fontfile, &text); + ZEPHIR_CALL_FUNCTION(&space, "imagettfbbox", NULL, 405, &_3$$3, &_4$$3, &fontfile, &text); zephir_check_call_status(); if (zephir_array_isset_long(&space, 0)) { ZEPHIR_OBS_VAR(&_5$$4); @@ -1560,7 +1560,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processText) { ZVAL_LONG(&_16$$3, g); ZVAL_LONG(&_17$$3, b); ZVAL_LONG(&_18$$3, opacity); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 379, &_3$$3, &_4$$3, &_16$$3, &_17$$3, &_18$$3); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 377, &_3$$3, &_4$$3, &_16$$3, &_17$$3, &_18$$3); zephir_check_call_status(); angle = 0; zephir_read_property(&_4$$3, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); @@ -1568,15 +1568,15 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processText) { ZVAL_LONG(&_17$$3, angle); ZVAL_LONG(&_18$$3, offsetX); ZVAL_LONG(&_19$$3, offsetY); - ZEPHIR_CALL_FUNCTION(NULL, "imagettftext", NULL, 408, &_4$$3, &_16$$3, &_17$$3, &_18$$3, &_19$$3, &color, &fontfile, &text); + ZEPHIR_CALL_FUNCTION(NULL, "imagettftext", NULL, 406, &_4$$3, &_16$$3, &_17$$3, &_18$$3, &_19$$3, &color, &fontfile, &text); zephir_check_call_status(); } else { ZVAL_LONG(&_20$$8, size); - ZEPHIR_CALL_FUNCTION(&_21$$8, "imagefontwidth", NULL, 409, &_20$$8); + ZEPHIR_CALL_FUNCTION(&_21$$8, "imagefontwidth", NULL, 407, &_20$$8); zephir_check_call_status(); width = (zephir_get_intval(&_21$$8) * zephir_fast_strlen_ev(&text)); ZVAL_LONG(&_20$$8, size); - ZEPHIR_CALL_FUNCTION(&_22$$8, "imagefontheight", NULL, 410, &_20$$8); + ZEPHIR_CALL_FUNCTION(&_22$$8, "imagefontheight", NULL, 408, &_20$$8); zephir_check_call_status(); height = zephir_get_intval(&_22$$8); if (offsetX < 0) { @@ -1592,13 +1592,13 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processText) { ZVAL_LONG(&_26$$8, g); ZVAL_LONG(&_27$$8, b); ZVAL_LONG(&_28$$8, opacity); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 379, &_20$$8, &_25$$8, &_26$$8, &_27$$8, &_28$$8); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 377, &_20$$8, &_25$$8, &_26$$8, &_27$$8, &_28$$8); zephir_check_call_status(); zephir_read_property(&_25$$8, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_26$$8, size); ZVAL_LONG(&_27$$8, offsetX); ZVAL_LONG(&_28$$8, offsetY); - ZEPHIR_CALL_FUNCTION(NULL, "imagestring", NULL, 411, &_25$$8, &_26$$8, &_27$$8, &_28$$8, &text, &color); + ZEPHIR_CALL_FUNCTION(NULL, "imagestring", NULL, 409, &_25$$8, &_26$$8, &_27$$8, &_28$$8, &text, &color); zephir_check_call_status(); } ZEPHIR_MM_RESTORE(); @@ -1645,14 +1645,14 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processWatermark) { ZEPHIR_CALL_METHOD(&_0, watermark, "render", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&overlay, "imagecreatefromstring", NULL, 386, &_0); + ZEPHIR_CALL_FUNCTION(&overlay, "imagecreatefromstring", NULL, 384, &_0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 373, &overlay, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 371, &overlay, &__$true); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_1, "imagesx", NULL, 383, &overlay); + ZEPHIR_CALL_FUNCTION(&_1, "imagesx", NULL, 381, &overlay); zephir_check_call_status(); width = zephir_get_intval(&_1); - ZEPHIR_CALL_FUNCTION(&_2, "imagesy", NULL, 384, &overlay); + ZEPHIR_CALL_FUNCTION(&_2, "imagesy", NULL, 382, &overlay); zephir_check_call_status(); height = zephir_get_intval(&_2); if (opacity < 100) { @@ -1666,20 +1666,20 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processWatermark) { ZVAL_LONG(&_6$$3, 127); ZVAL_LONG(&_7$$3, 127); ZVAL_LONG(&_8$$3, opacity); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 379, &overlay, &_4$$3, &_6$$3, &_7$$3, &_8$$3); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 377, &overlay, &_4$$3, &_6$$3, &_7$$3, &_8$$3); zephir_check_call_status(); ZVAL_LONG(&_4$$3, 3); - ZEPHIR_CALL_FUNCTION(NULL, "imagelayereffect", NULL, 412, &overlay, &_4$$3); + ZEPHIR_CALL_FUNCTION(NULL, "imagelayereffect", NULL, 410, &overlay, &_4$$3); zephir_check_call_status(); ZVAL_LONG(&_4$$3, 0); ZVAL_LONG(&_6$$3, 0); ZVAL_LONG(&_7$$3, width); ZVAL_LONG(&_8$$3, height); - ZEPHIR_CALL_FUNCTION(NULL, "imagefilledrectangle", NULL, 392, &overlay, &_4$$3, &_6$$3, &_7$$3, &_8$$3, &color); + ZEPHIR_CALL_FUNCTION(NULL, "imagefilledrectangle", NULL, 390, &overlay, &_4$$3, &_6$$3, &_7$$3, &_8$$3, &color); zephir_check_call_status(); } zephir_read_property(&_9, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 375, &_9, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 373, &_9, &__$true); zephir_check_call_status(); zephir_read_property(&_10, this_ptr, SL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_11, offsetX); @@ -1688,10 +1688,10 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processWatermark) { ZVAL_LONG(&_14, 0); ZVAL_LONG(&_15, width); ZVAL_LONG(&_16, height); - ZEPHIR_CALL_FUNCTION(&_17, "imagecopy", NULL, 380, &_10, &overlay, &_11, &_12, &_13, &_14, &_15, &_16); + ZEPHIR_CALL_FUNCTION(&_17, "imagecopy", NULL, 378, &_10, &overlay, &_11, &_12, &_13, &_14, &_15, &_16); zephir_check_call_status(); if (zephir_is_true(&_17)) { - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 376, &overlay); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 374, &overlay); zephir_check_call_status(); } ZEPHIR_MM_RESTORE(); diff --git a/ext/phalcon/loader.zep.c b/ext/phalcon/loader.zep.c index 789b320bb58..673ec2c7564 100644 --- a/ext/phalcon/loader.zep.c +++ b/ext/phalcon/loader.zep.c @@ -1097,7 +1097,7 @@ PHP_METHOD(Phalcon_Loader, register) { ZVAL_STRING(&_2$$3, "autoLoad"); zephir_array_fast_append(&_1$$3, &_2$$3); ZVAL_BOOL(&_3$$3, (prepend ? 1 : 0)); - ZEPHIR_CALL_FUNCTION(NULL, "spl_autoload_register", NULL, 413, &_1$$3, &__$true, &_3$$3); + ZEPHIR_CALL_FUNCTION(NULL, "spl_autoload_register", NULL, 411, &_1$$3, &__$true, &_3$$3); zephir_check_call_status(); if (1) { zephir_update_property_zval(this_ptr, SL("registered"), &__$true); @@ -1447,7 +1447,7 @@ PHP_METHOD(Phalcon_Loader, unregister) { ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "autoLoad"); zephir_array_fast_append(&_1$$3, &_2$$3); - ZEPHIR_CALL_FUNCTION(NULL, "spl_autoload_unregister", NULL, 414, &_1$$3); + ZEPHIR_CALL_FUNCTION(NULL, "spl_autoload_unregister", NULL, 412, &_1$$3); zephir_check_call_status(); if (0) { zephir_update_property_zval(this_ptr, SL("registered"), &__$true); diff --git a/ext/phalcon/logger.zep.c b/ext/phalcon/logger.zep.c index 3861f580375..8c770551a7c 100644 --- a/ext/phalcon/logger.zep.c +++ b/ext/phalcon/logger.zep.c @@ -576,7 +576,7 @@ PHP_METHOD(Phalcon_Logger, log) { } - ZEPHIR_CALL_METHOD(&intLevel, this_ptr, "getlevelnumber", NULL, 415, level); + ZEPHIR_CALL_METHOD(&intLevel, this_ptr, "getlevelnumber", NULL, 413, level); zephir_check_call_status(); zephir_get_strval(&_0, message); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmessage", NULL, 0, level, &_0, &context); @@ -791,7 +791,7 @@ PHP_METHOD(Phalcon_Logger, addMessage) { ZEPHIR_INIT_VAR(&_1); zephir_time(&_1); ZVAL_LONG(&_0, level); - ZEPHIR_CALL_METHOD(NULL, &item, "__construct", NULL, 416, &message, &levelName, &_0, &_1, &context); + ZEPHIR_CALL_METHOD(NULL, &item, "__construct", NULL, 414, &message, &levelName, &_0, &_1, &context); zephir_check_call_status(); zephir_is_iterable(®istered, 0, "phalcon/Logger.zep", 351); if (Z_TYPE_P(®istered) == IS_ARRAY) { diff --git a/ext/phalcon/logger/adapter/syslog.zep.c b/ext/phalcon/logger/adapter/syslog.zep.c index 18111803241..54d565d6558 100644 --- a/ext/phalcon/logger/adapter/syslog.zep.c +++ b/ext/phalcon/logger/adapter/syslog.zep.c @@ -159,7 +159,7 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, close) { if (!(zephir_is_true(&_0))) { RETURN_MM_BOOL(1); } - ZEPHIR_RETURN_CALL_FUNCTION("closelog", NULL, 417); + ZEPHIR_RETURN_CALL_FUNCTION("closelog", NULL, 415); zephir_check_call_status(); RETURN_MM(); @@ -212,7 +212,7 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, process) { ZEPHIR_CPY_WRT(&facility, &_0); zephir_read_property(&_0, this_ptr, SL("option"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&option, &_0); - ZEPHIR_CALL_FUNCTION(&result, "openlog", NULL, 418, &name, &option, &facility); + ZEPHIR_CALL_FUNCTION(&result, "openlog", NULL, 416, &name, &option, &facility); zephir_check_call_status(); if (!zephir_is_true(&result)) { ZEPHIR_INIT_VAR(&_1$$4); @@ -221,7 +221,7 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, process) { ZVAL_STRING(&_2$$4, "Cannot open syslog for name [%s] and facility [%s]"); ZEPHIR_CALL_FUNCTION(&_3$$4, "sprintf", NULL, 182, &_2$$4, &name, &facility); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 419, &_3$$4); + ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 417, &_3$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$4, "phalcon/Logger/Adapter/Syslog.zep", 132 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -234,10 +234,10 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, process) { zephir_update_property_zval(this_ptr, SL("opened"), &__$false); } zephir_array_fetch_long(&_4, &message, 1, PH_NOISY | PH_READONLY, "phalcon/Logger/Adapter/Syslog.zep", 137 TSRMLS_CC); - ZEPHIR_CALL_METHOD(&level, this_ptr, "logleveltosyslog", NULL, 420, &_4); + ZEPHIR_CALL_METHOD(&level, this_ptr, "logleveltosyslog", NULL, 418, &_4); zephir_check_call_status(); zephir_array_fetch_long(&_5, &message, 1, PH_NOISY | PH_READONLY, "phalcon/Logger/Adapter/Syslog.zep", 139 TSRMLS_CC); - ZEPHIR_CALL_FUNCTION(NULL, "syslog", NULL, 421, &level, &_5); + ZEPHIR_CALL_FUNCTION(NULL, "syslog", NULL, 419, &level, &_5); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); diff --git a/ext/phalcon/logger/formatter/json.zep.c b/ext/phalcon/logger/formatter/json.zep.c index eca3311375a..8ad05eafa5e 100644 --- a/ext/phalcon/logger/formatter/json.zep.c +++ b/ext/phalcon/logger/formatter/json.zep.c @@ -163,7 +163,7 @@ PHP_METHOD(Phalcon_Logger_Formatter_Json, format) { zephir_read_property(&_6, this_ptr, SL("dateFormat"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_5, item, "gettime", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_7, "date", NULL, 422, &_6, &_5); + ZEPHIR_CALL_FUNCTION(&_7, "date", NULL, 420, &_6, &_5); zephir_check_call_status(); zephir_array_update_string(&_4, SL("timestamp"), &_7, PH_COPY | PH_SEPARATE); zephir_json_encode(&_3, &_4, 0 ); diff --git a/ext/phalcon/logger/formatter/line.zep.c b/ext/phalcon/logger/formatter/line.zep.c index fec6d0cd0ae..c2c411fb8ae 100644 --- a/ext/phalcon/logger/formatter/line.zep.c +++ b/ext/phalcon/logger/formatter/line.zep.c @@ -202,7 +202,7 @@ PHP_METHOD(Phalcon_Logger_Formatter_Line, format) { zephir_read_property(&_2$$3, this_ptr, SL("dateFormat"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_3$$3, item, "gettime", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_4$$3, "date", NULL, 422, &_2$$3, &_3$$3); + ZEPHIR_CALL_FUNCTION(&_4$$3, "date", NULL, 420, &_2$$3, &_3$$3); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_5$$3); ZVAL_STRING(&_5$$3, "%date%"); diff --git a/ext/phalcon/logger/loggerfactory.zep.c b/ext/phalcon/logger/loggerfactory.zep.c index 4f80e6849b1..5e7a93c9127 100644 --- a/ext/phalcon/logger/loggerfactory.zep.c +++ b/ext/phalcon/logger/loggerfactory.zep.c @@ -244,7 +244,7 @@ PHP_METHOD(Phalcon_Logger_LoggerFactory, newInstance) { object_init_ex(return_value, phalcon_logger_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 423, &name, &adapters); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 421, &name, &adapters); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/messages/messages.zep.c b/ext/phalcon/messages/messages.zep.c index 7daeb455322..5fab4dd0cbc 100644 --- a/ext/phalcon/messages/messages.zep.c +++ b/ext/phalcon/messages/messages.zep.c @@ -520,7 +520,7 @@ PHP_METHOD(Phalcon_Messages_Messages, offsetUnset) { zephir_read_property(&_1$$3, this_ptr, SL("messages"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_2$$3, 1); ZEPHIR_MAKE_REF(&_1$$3); - ZEPHIR_CALL_FUNCTION(NULL, "array_splice", NULL, 424, &_1$$3, index, &_2$$3); + ZEPHIR_CALL_FUNCTION(NULL, "array_splice", NULL, 422, &_1$$3, index, &_2$$3); ZEPHIR_UNREF(&_1$$3); zephir_check_call_status(); } diff --git a/ext/phalcon/mvc/micro.zep.c b/ext/phalcon/mvc/micro.zep.c index ca56341ad65..d80256de13a 100644 --- a/ext/phalcon/mvc/micro.zep.c +++ b/ext/phalcon/mvc/micro.zep.c @@ -468,11 +468,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, getService) { if (Z_TYPE_P(&container) != IS_OBJECT) { ZEPHIR_INIT_NVAR(&container); object_init_ex(&container, phalcon_di_factorydefault_ce); - ZEPHIR_CALL_METHOD(NULL, &container, "__construct", NULL, 425); + ZEPHIR_CALL_METHOD(NULL, &container, "__construct", NULL, 427); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("container"), &container); } - ZEPHIR_RETURN_CALL_METHOD(&container, "get", NULL, 426, &serviceName); + ZEPHIR_RETURN_CALL_METHOD(&container, "get", NULL, 428, &serviceName); zephir_check_call_status(); RETURN_MM(); @@ -515,11 +515,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, getSharedService) { if (Z_TYPE_P(&container) != IS_OBJECT) { ZEPHIR_INIT_NVAR(&container); object_init_ex(&container, phalcon_di_factorydefault_ce); - ZEPHIR_CALL_METHOD(NULL, &container, "__construct", NULL, 425); + ZEPHIR_CALL_METHOD(NULL, &container, "__construct", NULL, 427); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("container"), &container); } - ZEPHIR_RETURN_CALL_METHOD(&container, "getshared", NULL, 427, &serviceName); + ZEPHIR_RETURN_CALL_METHOD(&container, "getshared", NULL, 429, &serviceName); zephir_check_call_status(); RETURN_MM(); @@ -1324,11 +1324,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, hasService) { if (Z_TYPE_P(&container) != IS_OBJECT) { ZEPHIR_INIT_NVAR(&container); object_init_ex(&container, phalcon_di_factorydefault_ce); - ZEPHIR_CALL_METHOD(NULL, &container, "__construct", NULL, 425); + ZEPHIR_CALL_METHOD(NULL, &container, "__construct", NULL, 427); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("container"), &container); } - ZEPHIR_RETURN_CALL_METHOD(&container, "has", NULL, 428, &serviceName); + ZEPHIR_RETURN_CALL_METHOD(&container, "has", NULL, 430, &serviceName); zephir_check_call_status(); RETURN_MM(); @@ -1475,7 +1475,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, mount) { if (zephir_is_true(&_0)) { ZEPHIR_INIT_VAR(&lazyHandler); object_init_ex(&lazyHandler, phalcon_mvc_micro_lazyloader_ce); - ZEPHIR_CALL_METHOD(NULL, &lazyHandler, "__construct", NULL, 429, &mainHandler); + ZEPHIR_CALL_METHOD(NULL, &lazyHandler, "__construct", NULL, 431, &mainHandler); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&lazyHandler, &mainHandler); @@ -1728,11 +1728,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, offsetUnset) { if (Z_TYPE_P(&container) != IS_OBJECT) { ZEPHIR_INIT_NVAR(&container); object_init_ex(&container, phalcon_di_factorydefault_ce); - ZEPHIR_CALL_METHOD(NULL, &container, "__construct", NULL, 425); + ZEPHIR_CALL_METHOD(NULL, &container, "__construct", NULL, 427); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("container"), &container); } - ZEPHIR_CALL_METHOD(NULL, &container, "remove", NULL, 430, alias); + ZEPHIR_CALL_METHOD(NULL, &container, "remove", NULL, 432, alias); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -2086,7 +2086,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, setService) { if (Z_TYPE_P(&container) != IS_OBJECT) { ZEPHIR_INIT_NVAR(&container); object_init_ex(&container, phalcon_di_factorydefault_ce); - ZEPHIR_CALL_METHOD(NULL, &container, "__construct", NULL, 425); + ZEPHIR_CALL_METHOD(NULL, &container, "__construct", NULL, 427); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("container"), &container); } @@ -2095,7 +2095,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, setService) { } else { ZVAL_BOOL(&_0, 0); } - ZEPHIR_RETURN_CALL_METHOD(&container, "set", NULL, 431, &serviceName, definition, &_0); + ZEPHIR_RETURN_CALL_METHOD(&container, "set", NULL, 433, &serviceName, definition, &_0); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/mvc/model.zep.c b/ext/phalcon/mvc/model.zep.c index 31e52d78b9b..7fab2e04c1f 100644 --- a/ext/phalcon/mvc/model.zep.c +++ b/ext/phalcon/mvc/model.zep.c @@ -71,7 +71,9 @@ */ ZEPHIR_INIT_CLASS(Phalcon_Mvc_Model) { - ZEPHIR_REGISTER_CLASS_EX(Phalcon\\Mvc, Model, phalcon, mvc_model, phalcon_di_abstractinjectionaware_ce, phalcon_mvc_model_method_entry, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); + ZEPHIR_REGISTER_CLASS(Phalcon\\Mvc, Model, phalcon, mvc_model, phalcon_mvc_model_method_entry, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); + + zend_declare_property_null(phalcon_mvc_model_ce, SL("container"), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_long(phalcon_mvc_model_ce, SL("dirtyState"), 1, ZEND_ACC_PROTECTED TSRMLS_CC); @@ -121,6 +123,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Mvc_Model) { zend_class_implements(phalcon_mvc_model_ce TSRMLS_CC, 1, phalcon_mvc_entityinterface_ce); zend_class_implements(phalcon_mvc_model_ce TSRMLS_CC, 1, phalcon_mvc_modelinterface_ce); zend_class_implements(phalcon_mvc_model_ce TSRMLS_CC, 1, phalcon_mvc_model_resultinterface_ce); + zend_class_implements(phalcon_mvc_model_ce TSRMLS_CC, 1, phalcon_di_injectionawareinterface_ce); zend_class_implements(phalcon_mvc_model_ce TSRMLS_CC, 1, zend_ce_serializable); zend_class_implements(phalcon_mvc_model_ce TSRMLS_CC, 1, zephir_get_internal_ce(SL("jsonserializable"))); return SUCCESS; @@ -191,7 +194,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __construct) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 5, &_2$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model.zep", 140 TSRMLS_CC); + zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model.zep", 142 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -203,7 +206,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __construct) { zephir_check_call_status(); ZEPHIR_CPY_WRT(modelsManager, &_5$$5); if (UNEXPECTED(Z_TYPE_P(modelsManager) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The injected service 'modelsManager' is not valid", "phalcon/Mvc/Model.zep", 154); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The injected service 'modelsManager' is not valid", "phalcon/Mvc/Model.zep", 156); return; } } @@ -253,7 +256,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __call) { zephir_get_arrval(&arguments, arguments_param); - ZEPHIR_CALL_SELF(&records, "_invokefinder", &_0, 432, &method, &arguments); + ZEPHIR_CALL_SELF(&records, "_invokefinder", &_0, 434, &method, &arguments); zephir_check_call_status(); if (Z_TYPE_P(&records) != IS_NULL) { RETURN_CCTOR(&records); @@ -277,7 +280,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, 5, &_3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2, "phalcon/Mvc/Model.zep", 222 TSRMLS_CC); + zephir_throw_exception_debug(&_2, "phalcon/Mvc/Model.zep", 224 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; @@ -308,7 +311,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __callStatic) { zephir_get_arrval(&arguments, arguments_param); - ZEPHIR_RETURN_CALL_SELF("_invokefinder", &_0, 432, &method, &arguments); + ZEPHIR_RETURN_CALL_SELF("_invokefinder", &_0, 434, &method, &arguments); zephir_check_call_status(); RETURN_MM(); @@ -370,7 +373,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __get) { zephir_read_property(&_1$$3, this_ptr, SL("dirtyRelated"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset(&_1$$3, &lowerProperty)) { zephir_read_property(&_2$$4, this_ptr, SL("dirtyRelated"), PH_NOISY_CC | PH_READONLY); - zephir_array_fetch(&_3$$4, &_2$$4, &lowerProperty, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 264 TSRMLS_CC); + zephir_array_fetch(&_3$$4, &_2$$4, &lowerProperty, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 266 TSRMLS_CC); RETURN_CTOR(&_3$$4); } ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getrelated", NULL, 0, &lowerProperty); @@ -553,7 +556,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", 403); + zephir_is_iterable(value, 0, "phalcon/Mvc/Model.zep", 405); if (Z_TYPE_P(value) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(value), _9$$10) { @@ -561,7 +564,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 TSRMLS_CC)) { - zephir_array_append(&related, &item, PH_SEPARATE, "phalcon/Mvc/Model.zep", 398); + zephir_array_append(&related, &item, PH_SEPARATE, "phalcon/Mvc/Model.zep", 400); } } } ZEND_HASH_FOREACH_END(); @@ -578,7 +581,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 TSRMLS_CC)) { - zephir_array_append(&related, &item, PH_SEPARATE, "phalcon/Mvc/Model.zep", 398); + zephir_array_append(&related, &item, PH_SEPARATE, "phalcon/Mvc/Model.zep", 400); } } ZEPHIR_CALL_METHOD(NULL, value, "next", NULL, 0); @@ -602,13 +605,13 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) { } } - ZEPHIR_CALL_METHOD(&_13, this_ptr, "_possiblesetter", NULL, 433, &property, value); + ZEPHIR_CALL_METHOD(&_13, this_ptr, "_possiblesetter", NULL, 435, &property, value); zephir_check_call_status(); if (zephir_is_true(&_13)) { RETVAL_ZVAL(value, 1, 0); RETURN_MM(); } - ZEPHIR_CALL_FUNCTION(&_14, "property_exists", NULL, 434, this_ptr, &property); + ZEPHIR_CALL_FUNCTION(&_14, "property_exists", NULL, 436, this_ptr, &property); zephir_check_call_status(); if (zephir_is_true(&_14)) { ZEPHIR_CALL_METHOD(&manager, this_ptr, "getmodelsmanager", NULL, 0); @@ -622,7 +625,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) { ZEPHIR_CONCAT_SVS(&_17$$20, "Property '", &property, "' does not have a setter."); ZEPHIR_CALL_METHOD(NULL, &_16$$20, "__construct", NULL, 5, &_17$$20); zephir_check_call_status(); - zephir_throw_exception_debug(&_16$$20, "phalcon/Mvc/Model.zep", 432 TSRMLS_CC); + zephir_throw_exception_debug(&_16$$20, "phalcon/Mvc/Model.zep", 434 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -823,7 +826,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", 566); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 568); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2$$3, _3$$3, _0$$3) { @@ -880,7 +883,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", 623); + zephir_is_iterable(&_4, 0, "phalcon/Mvc/Model.zep", 625); if (Z_TYPE_P(&_4) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_4), _5) { @@ -891,7 +894,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) { _7$$12 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_7$$12) { - ZEPHIR_CALL_SELF(&_8$$13, "caseinsensitivecolumnmap", &_9, 435, &columnMap, &attribute); + ZEPHIR_CALL_SELF(&_8$$13, "caseinsensitivecolumnmap", &_9, 437, &columnMap, &attribute); zephir_check_call_status(); ZEPHIR_CPY_WRT(&attribute, &_8$$13); } @@ -905,7 +908,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) { ZEPHIR_CONCAT_SVS(&_11$$16, "Column '", &attribute, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_10$$16, "__construct", &_12, 5, &_11$$16); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$16, "phalcon/Mvc/Model.zep", 597 TSRMLS_CC); + zephir_throw_exception_debug(&_10$$16, "phalcon/Mvc/Model.zep", 599 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -923,7 +926,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) { } _13$$18 = zephir_is_true(&disableAssignSetters); if (!(_13$$18)) { - ZEPHIR_CALL_METHOD(&_14$$18, this_ptr, "_possiblesetter", &_15, 433, &attributeField, &value); + ZEPHIR_CALL_METHOD(&_14$$18, this_ptr, "_possiblesetter", &_15, 435, &attributeField, &value); zephir_check_call_status(); _13$$18 = !zephir_is_true(&_14$$18); } @@ -948,7 +951,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) { _16$$22 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_16$$22) { - ZEPHIR_CALL_SELF(&_17$$23, "caseinsensitivecolumnmap", &_9, 435, &columnMap, &attribute); + ZEPHIR_CALL_SELF(&_17$$23, "caseinsensitivecolumnmap", &_9, 437, &columnMap, &attribute); zephir_check_call_status(); ZEPHIR_CPY_WRT(&attribute, &_17$$23); } @@ -962,7 +965,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) { ZEPHIR_CONCAT_SVS(&_19$$26, "Column '", &attribute, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_18$$26, "__construct", &_12, 5, &_19$$26); zephir_check_call_status(); - zephir_throw_exception_debug(&_18$$26, "phalcon/Mvc/Model.zep", 597 TSRMLS_CC); + zephir_throw_exception_debug(&_18$$26, "phalcon/Mvc/Model.zep", 599 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -980,7 +983,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) { } _20$$28 = zephir_is_true(&disableAssignSetters); if (!(_20$$28)) { - ZEPHIR_CALL_METHOD(&_21$$28, this_ptr, "_possiblesetter", &_15, 433, &attributeField, &value); + ZEPHIR_CALL_METHOD(&_21$$28, this_ptr, "_possiblesetter", &_15, 435, &attributeField, &value); zephir_check_call_status(); _20$$28 = !zephir_is_true(&_21$$28); } @@ -1107,7 +1110,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", 701); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 703); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _3, _4, _1) { @@ -1120,7 +1123,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResult) { ZEPHIR_INIT_NVAR(&value); ZVAL_COPY(&value, _1); if (UNEXPECTED(Z_TYPE_P(&key) != IS_STRING)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid key in array data provided to dumpResult()", "phalcon/Mvc/Model.zep", 691); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid key in array data provided to dumpResult()", "phalcon/Mvc/Model.zep", 693); return; } zephir_update_property_zval_zval(&instance, &key, &value TSRMLS_CC); @@ -1139,7 +1142,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResult) { ZEPHIR_CALL_METHOD(&value, &data, "current", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&key) != IS_STRING)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid key in array data provided to dumpResult()", "phalcon/Mvc/Model.zep", 691); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid key in array data provided to dumpResult()", "phalcon/Mvc/Model.zep", 693); return; } zephir_update_property_zval_zval(&instance, &key, &value TSRMLS_CC); @@ -1232,7 +1235,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, 0, "phalcon/Mvc/Model.zep", 804); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 806); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _3, _4, _1) { @@ -1260,7 +1263,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { ZEPHIR_CONCAT_SVS(&_6$$7, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_5$$7, "__construct", &_7, 5, &_6$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_5$$7, "phalcon/Mvc/Model.zep", 749 TSRMLS_CC); + zephir_throw_exception_debug(&_5$$7, "phalcon/Mvc/Model.zep", 751 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1275,7 +1278,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { _8$$3 = Z_TYPE_P(&value) != IS_NULL; } if (_8$$3) { - zephir_array_fetch_long(&_9$$9, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 762 TSRMLS_CC); + zephir_array_fetch_long(&_9$$9, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 764 TSRMLS_CC); do { if (ZEPHIR_IS_LONG(&_9$$9, 0)) { ZVAL_LONG(&_10$$10, 10); @@ -1298,7 +1301,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { } while(0); } else { - zephir_array_fetch_long(&_12$$14, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 782 TSRMLS_CC); + zephir_array_fetch_long(&_12$$14, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 784 TSRMLS_CC); do { if (ZEPHIR_IS_LONG(&_12$$14, 0) || ZEPHIR_IS_LONG(&_12$$14, 9) || ZEPHIR_IS_LONG(&_12$$14, 3) || ZEPHIR_IS_LONG(&_12$$14, 7) || ZEPHIR_IS_LONG(&_12$$14, 8)) { ZEPHIR_INIT_NVAR(&castValue); @@ -1311,7 +1314,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { } ZEPHIR_OBS_NVAR(&attributeName); - zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 797 TSRMLS_CC); + zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 799 TSRMLS_CC); zephir_update_property_zval_zval(&instance, &attributeName, &castValue TSRMLS_CC); } ZEND_HASH_FOREACH_END(); } else { @@ -1343,7 +1346,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { ZEPHIR_CONCAT_SVS(&_14$$21, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_13$$21, "__construct", &_7, 5, &_14$$21); zephir_check_call_status(); - zephir_throw_exception_debug(&_13$$21, "phalcon/Mvc/Model.zep", 749 TSRMLS_CC); + zephir_throw_exception_debug(&_13$$21, "phalcon/Mvc/Model.zep", 751 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1358,7 +1361,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { _15$$17 = Z_TYPE_P(&value) != IS_NULL; } if (_15$$17) { - zephir_array_fetch_long(&_16$$23, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 762 TSRMLS_CC); + zephir_array_fetch_long(&_16$$23, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 764 TSRMLS_CC); do { if (ZEPHIR_IS_LONG(&_16$$23, 0)) { ZVAL_LONG(&_17$$24, 10); @@ -1381,7 +1384,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { } while(0); } else { - zephir_array_fetch_long(&_18$$28, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 782 TSRMLS_CC); + zephir_array_fetch_long(&_18$$28, &attribute, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 784 TSRMLS_CC); do { if (ZEPHIR_IS_LONG(&_18$$28, 0) || ZEPHIR_IS_LONG(&_18$$28, 9) || ZEPHIR_IS_LONG(&_18$$28, 3) || ZEPHIR_IS_LONG(&_18$$28, 7) || ZEPHIR_IS_LONG(&_18$$28, 8)) { ZEPHIR_INIT_NVAR(&castValue); @@ -1394,7 +1397,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) { } ZEPHIR_OBS_NVAR(&attributeName); - zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 797 TSRMLS_CC); + zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 799 TSRMLS_CC); zephir_update_property_zval_zval(&instance, &attributeName, &castValue TSRMLS_CC); ZEPHIR_CALL_METHOD(NULL, &data, "next", NULL, 0); zephir_check_call_status(); @@ -1465,7 +1468,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) { } ZEPHIR_INIT_VAR(&hydrateArray); array_init(&hydrateArray); - zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 885); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 887); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2, _3, _0) { @@ -1486,7 +1489,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) { _4$$7 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_4$$7) { - ZEPHIR_CALL_SELF(&_5$$8, "caseinsensitivecolumnmap", &_6, 435, columnMap, &key); + ZEPHIR_CALL_SELF(&_5$$8, "caseinsensitivecolumnmap", &_6, 437, columnMap, &key); zephir_check_call_status(); ZEPHIR_CPY_WRT(&key, &_5$$8); } @@ -1499,7 +1502,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, 5, &_8$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$10, "phalcon/Mvc/Model.zep", 864 TSRMLS_CC); + zephir_throw_exception_debug(&_7$$10, "phalcon/Mvc/Model.zep", 866 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1507,7 +1510,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", 874 TSRMLS_CC); + zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 876 TSRMLS_CC); } else { ZEPHIR_CPY_WRT(&attributeName, &attribute); } @@ -1538,7 +1541,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) { _10$$16 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_10$$16) { - ZEPHIR_CALL_SELF(&_11$$17, "caseinsensitivecolumnmap", &_6, 435, columnMap, &key); + ZEPHIR_CALL_SELF(&_11$$17, "caseinsensitivecolumnmap", &_6, 437, columnMap, &key); zephir_check_call_status(); ZEPHIR_CPY_WRT(&key, &_11$$17); } @@ -1551,7 +1554,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, 5, &_13$$19); zephir_check_call_status(); - zephir_throw_exception_debug(&_12$$19, "phalcon/Mvc/Model.zep", 864 TSRMLS_CC); + zephir_throw_exception_debug(&_12$$19, "phalcon/Mvc/Model.zep", 866 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1559,7 +1562,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", 874 TSRMLS_CC); + zephir_array_fetch_long(&attributeName, &attribute, 0, PH_NOISY, "phalcon/Mvc/Model.zep", 876 TSRMLS_CC); } else { ZEPHIR_CPY_WRT(&attributeName, &attribute); } @@ -1574,7 +1577,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) { ZEPHIR_INIT_NVAR(&value); ZEPHIR_INIT_NVAR(&key); if (hydrationMode != 1) { - ZEPHIR_RETURN_CALL_CE_STATIC(phalcon_helper_arr_ce, "arraytoobject", &_14, 436, &hydrateArray); + ZEPHIR_RETURN_CALL_CE_STATIC(phalcon_helper_arr_ce, "arraytoobject", &_14, 438, &hydrateArray); zephir_check_call_status(); RETURN_MM(); } @@ -1685,7 +1688,7 @@ PHP_METHOD(Phalcon_Mvc_Model, create) { ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_1, this_ptr, "getreadconnection", NULL, 437); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "getreadconnection", NULL, 439); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "_exists", NULL, 0, &metaData, &_1); zephir_check_call_status(); @@ -1784,7 +1787,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&writeConnection, this_ptr, "getwriteconnection", NULL, 438); + ZEPHIR_CALL_METHOD(&writeConnection, this_ptr, "getwriteconnection", NULL, 440); zephir_check_call_status(); ZEPHIR_INIT_ZVAL_NREF(_0); ZVAL_LONG(&_0, 3); @@ -1793,7 +1796,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { array_init(&_1); zephir_update_property_zval(this_ptr, SL("errorMessages"), &_1); if (ZEPHIR_GLOBAL(orm).virtual_foreign_keys) { - ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "_checkforeignkeysreverserestrict", NULL, 439); + ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "_checkforeignkeysreverserestrict", NULL, 441); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&_2$$3)) { RETURN_MM_BOOL(0); @@ -1817,10 +1820,10 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZVAL_NULL(&columnMap); } if (UNEXPECTED(!(zephir_fast_count_int(&primaryKeys TSRMLS_CC)))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A primary key must be defined in the model in order to perform the operation", "phalcon/Mvc/Model.zep", 1039); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A primary key must be defined in the model in order to perform the operation", "phalcon/Mvc/Model.zep", 1041); return; } - zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 1087); + zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 1089); if (Z_TYPE_P(&primaryKeys) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&primaryKeys), _3) { @@ -1834,7 +1837,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CONCAT_SVS(&_6$$9, "Column '", &primaryKey, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_5$$9, "__construct", &_7, 5, &_6$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/Model.zep", 1053 TSRMLS_CC); + zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/Model.zep", 1055 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1847,7 +1850,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CONCAT_SVS(&_9$$11, "Column '", &primaryKey, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_8$$11, "__construct", &_7, 5, &_9$$11); zephir_check_call_status(); - zephir_throw_exception_debug(&_8$$11, "phalcon/Mvc/Model.zep", 1063 TSRMLS_CC); + zephir_throw_exception_debug(&_8$$11, "phalcon/Mvc/Model.zep", 1065 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1862,17 +1865,17 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CONCAT_SVS(&_11$$13, "Cannot delete the record because the primary key attribute: '", &attributeField, "' wasn't set"); ZEPHIR_CALL_METHOD(NULL, &_10$$13, "__construct", &_7, 5, &_11$$13); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$13, "phalcon/Mvc/Model.zep", 1076 TSRMLS_CC); + zephir_throw_exception_debug(&_10$$13, "phalcon/Mvc/Model.zep", 1078 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1082); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1084); ZEPHIR_CALL_METHOD(&_12$$8, &writeConnection, "escapeidentifier", &_13, 0, &primaryKey); zephir_check_call_status(); ZEPHIR_INIT_LNVAR(_14$$8); ZEPHIR_CONCAT_VS(&_14$$8, &_12$$8, " = ?"); - zephir_array_append(&conditions, &_14$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1083); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1084); + zephir_array_append(&conditions, &_14$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1085); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1086); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "rewind", NULL, 0); @@ -1893,7 +1896,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CONCAT_SVS(&_16$$15, "Column '", &primaryKey, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_15$$15, "__construct", &_7, 5, &_16$$15); zephir_check_call_status(); - zephir_throw_exception_debug(&_15$$15, "phalcon/Mvc/Model.zep", 1053 TSRMLS_CC); + zephir_throw_exception_debug(&_15$$15, "phalcon/Mvc/Model.zep", 1055 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1906,7 +1909,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CONCAT_SVS(&_18$$17, "Column '", &primaryKey, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_17$$17, "__construct", &_7, 5, &_18$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_17$$17, "phalcon/Mvc/Model.zep", 1063 TSRMLS_CC); + zephir_throw_exception_debug(&_17$$17, "phalcon/Mvc/Model.zep", 1065 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -1921,17 +1924,17 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CONCAT_SVS(&_20$$19, "Cannot delete the record because the primary key attribute: '", &attributeField, "' wasn't set"); ZEPHIR_CALL_METHOD(NULL, &_19$$19, "__construct", &_7, 5, &_20$$19); zephir_check_call_status(); - zephir_throw_exception_debug(&_19$$19, "phalcon/Mvc/Model.zep", 1076 TSRMLS_CC); + zephir_throw_exception_debug(&_19$$19, "phalcon/Mvc/Model.zep", 1078 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1082); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1084); ZEPHIR_CALL_METHOD(&_21$$14, &writeConnection, "escapeidentifier", &_22, 0, &primaryKey); zephir_check_call_status(); ZEPHIR_INIT_LNVAR(_23$$14); ZEPHIR_CONCAT_VS(&_23$$14, &_21$$14, " = ?"); - zephir_array_append(&conditions, &_23$$14, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1083); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1084); + zephir_array_append(&conditions, &_23$$14, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1085); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1086); ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "next", NULL, 0); zephir_check_call_status(); } @@ -1955,9 +1958,9 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { RETURN_MM_BOOL(1); } } - ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 440); + ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 442); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 441); + ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 443); zephir_check_call_status(); if (zephir_is_true(&schema)) { ZEPHIR_INIT_VAR(&table); @@ -1972,7 +1975,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) { ZEPHIR_CALL_METHOD(&success, &writeConnection, "delete", NULL, 0, &table, &_27, &values, &bindTypes); zephir_check_call_status(); if (ZEPHIR_GLOBAL(orm).virtual_foreign_keys) { - ZEPHIR_CALL_METHOD(&_28$$25, this_ptr, "_checkforeignkeysreversecascade", NULL, 442); + ZEPHIR_CALL_METHOD(&_28$$25, this_ptr, "_checkforeignkeysreversecascade", NULL, 444); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&_28$$25)) { RETURN_MM_BOOL(0); @@ -2205,12 +2208,12 @@ 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", 1330); + zephir_array_append(¶ms, parameters, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1332); } } else { ZEPHIR_CPY_WRT(¶ms, parameters); } - ZEPHIR_CALL_STATIC(&query, "getpreparedquery", &_0, 443, ¶ms); + ZEPHIR_CALL_STATIC(&query, "getpreparedquery", &_0, 445, ¶ms); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&resultset, &query, "execute", NULL, 0); zephir_check_call_status(); @@ -2333,11 +2336,11 @@ PHP_METHOD(Phalcon_Mvc_Model, findFirst) { zephir_array_fast_append(&_1$$5, parameters); ZEPHIR_CPY_WRT(¶ms, &_1$$5); } else { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Parameters passed must be of type array, string, numeric or null", "phalcon/Mvc/Model.zep", 1436); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Parameters passed must be of type array, string, numeric or null", "phalcon/Mvc/Model.zep", 1438); return; } ZVAL_LONG(&_3, 1); - ZEPHIR_CALL_STATIC(&query, "getpreparedquery", &_2, 443, ¶ms, &_3); + ZEPHIR_CALL_STATIC(&query, "getpreparedquery", &_2, 445, ¶ms, &_3); zephir_check_call_status(); ZVAL_BOOL(&_3, 1); ZEPHIR_CALL_METHOD(NULL, &query, "setuniquerow", NULL, 0, &_3); @@ -2476,7 +2479,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) { zephir_read_property(&_0, this_ptr, SL("snapshot"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&snapshot, &_0); if (UNEXPECTED(Z_TYPE_P(&snapshot) != IS_ARRAY)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record doesn't have a valid data snapshot", "phalcon/Mvc/Model.zep", 1522); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record doesn't have a valid data snapshot", "phalcon/Mvc/Model.zep", 1524); return; } ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); @@ -2492,7 +2495,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) { ZEPHIR_INIT_VAR(&changed); array_init(&changed); ZEPHIR_INIT_VAR(&_1); - zephir_is_iterable(&allAttributes, 0, "phalcon/Mvc/Model.zep", 1580); + zephir_is_iterable(&allAttributes, 0, "phalcon/Mvc/Model.zep", 1582); if (Z_TYPE_P(&allAttributes) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&allAttributes), _4, _5, _2) { @@ -2505,17 +2508,17 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) { ZEPHIR_INIT_NVAR(&_1); ZVAL_COPY(&_1, _2); if (!(zephir_array_isset(&snapshot, &name))) { - zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1555); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1557); 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", 1565); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1567); continue; } - zephir_array_fetch(&_6$$6, &snapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1573 TSRMLS_CC); + zephir_array_fetch(&_6$$6, &snapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1575 TSRMLS_CC); if (!ZEPHIR_IS_IDENTICAL(&value, &_6$$6)) { - zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1574); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1576); continue; } } ZEND_HASH_FOREACH_END(); @@ -2533,17 +2536,17 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) { ZEPHIR_CALL_METHOD(&_1, &allAttributes, "current", NULL, 0); zephir_check_call_status(); if (!(zephir_array_isset(&snapshot, &name))) { - zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1555); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1557); 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", 1565); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1567); continue; } - zephir_array_fetch(&_7$$10, &snapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1573 TSRMLS_CC); + zephir_array_fetch(&_7$$10, &snapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1575 TSRMLS_CC); if (!ZEPHIR_IS_IDENTICAL(&value, &_7$$10)) { - zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1574); + zephir_array_append(&changed, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1576); continue; } ZEPHIR_CALL_METHOD(NULL, &allAttributes, "next", NULL, 0); @@ -2569,6 +2572,18 @@ PHP_METHOD(Phalcon_Mvc_Model, getDirtyState) { } +/** + * Returns the dependency injection container + */ +PHP_METHOD(Phalcon_Mvc_Model, getDI) { + + zval *this_ptr = getThis(); + + + RETURN_MEMBER(getThis(), "container"); + +} + /** * Returns the custom events manager */ @@ -2648,7 +2663,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getMessages) { ZEPHIR_INIT_VAR(&filtered); array_init(&filtered); zephir_read_property(&_1$$3, this_ptr, SL("errorMessages"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_1$$3, 0, "phalcon/Mvc/Model.zep", 1637); + zephir_is_iterable(&_1$$3, 0, "phalcon/Mvc/Model.zep", 1647); if (Z_TYPE_P(&_1$$3) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_1$$3), _2$$3) { @@ -2657,7 +2672,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", 1633); + zephir_array_append(&filtered, &message, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1643); } } ZEND_HASH_FOREACH_END(); } else { @@ -2674,7 +2689,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", 1633); + zephir_array_append(&filtered, &message, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1643); } ZEPHIR_CALL_METHOD(NULL, &_1$$3, "next", NULL, 0); zephir_check_call_status(); @@ -2728,7 +2743,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getModelsMetaData) { zephir_check_call_status(); ZEPHIR_CPY_WRT(&metaData, &_1$$3); if (UNEXPECTED(Z_TYPE_P(&metaData) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The injected service 'modelsMetadata' is not valid", "phalcon/Mvc/Model.zep", 1671); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The injected service 'modelsMetadata' is not valid", "phalcon/Mvc/Model.zep", 1681); return; } zephir_update_property_zval(this_ptr, SL("modelsMetaData"), &metaData); @@ -2870,7 +2885,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, 5, &_3$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "phalcon/Mvc/Model.zep", 1750 TSRMLS_CC); + zephir_throw_exception_debug(&_2$$3, "phalcon/Mvc/Model.zep", 1760 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -2886,7 +2901,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getRelated) { if (_5$$4) { zephir_read_property(&_7$$5, this_ptr, SL("related"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_VAR(&result); - zephir_array_fetch(&result, &_7$$5, &lowerAlias, PH_NOISY, "phalcon/Mvc/Model.zep", 1762 TSRMLS_CC); + zephir_array_fetch(&result, &_7$$5, &lowerAlias, PH_NOISY, "phalcon/Mvc/Model.zep", 1772 TSRMLS_CC); } else { ZEPHIR_CALL_METHOD(&result, &manager, "getrelationrecords", NULL, 0, &relation, this_ptr, arguments); zephir_check_call_status(); @@ -3042,21 +3057,21 @@ PHP_METHOD(Phalcon_Mvc_Model, getUpdatedFields) { zephir_read_property(&_0, this_ptr, SL("oldSnapshot"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&oldSnapshot, &_0); if (UNEXPECTED(!(ZEPHIR_GLOBAL(orm).update_snapshot_on_save))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Update snapshot on save must be enabled for this method to work properly", "phalcon/Mvc/Model.zep", 1861); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Update snapshot on save must be enabled for this method to work properly", "phalcon/Mvc/Model.zep", 1871); return; } if (UNEXPECTED(Z_TYPE_P(&snapshot) != IS_ARRAY)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record doesn't have a valid data snapshot", "phalcon/Mvc/Model.zep", 1867); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record doesn't have a valid data snapshot", "phalcon/Mvc/Model.zep", 1877); return; } zephir_read_property(&_0, this_ptr, SL("dirtyState"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!ZEPHIR_IS_LONG(&_0, 0))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Change checking cannot be performed because the object has not been persisted or is deleted", "phalcon/Mvc/Model.zep", 1876); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Change checking cannot be performed because the object has not been persisted or is deleted", "phalcon/Mvc/Model.zep", 1886); return; } ZEPHIR_INIT_VAR(&updated); array_init(&updated); - zephir_is_iterable(&snapshot, 0, "phalcon/Mvc/Model.zep", 1891); + zephir_is_iterable(&snapshot, 0, "phalcon/Mvc/Model.zep", 1901); if (Z_TYPE_P(&snapshot) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&snapshot), _3, _4, _1) { @@ -3070,11 +3085,11 @@ PHP_METHOD(Phalcon_Mvc_Model, getUpdatedFields) { ZVAL_COPY(&value, _1); _5$$6 = !(zephir_array_isset(&oldSnapshot, &name)); if (!(_5$$6)) { - zephir_array_fetch(&_6$$6, &oldSnapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1886 TSRMLS_CC); + zephir_array_fetch(&_6$$6, &oldSnapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1896 TSRMLS_CC); _5$$6 = !ZEPHIR_IS_IDENTICAL(&value, &_6$$6); } if (_5$$6) { - zephir_array_append(&updated, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1887); + zephir_array_append(&updated, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1897); } } ZEND_HASH_FOREACH_END(); } else { @@ -3092,11 +3107,11 @@ PHP_METHOD(Phalcon_Mvc_Model, getUpdatedFields) { zephir_check_call_status(); _7$$8 = !(zephir_array_isset(&oldSnapshot, &name)); if (!(_7$$8)) { - zephir_array_fetch(&_8$$8, &oldSnapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1886 TSRMLS_CC); + zephir_array_fetch(&_8$$8, &oldSnapshot, &name, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 1896 TSRMLS_CC); _7$$8 = !ZEPHIR_IS_IDENTICAL(&value, &_8$$8); } if (_7$$8) { - zephir_array_append(&updated, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1887); + zephir_array_append(&updated, &name, PH_SEPARATE, "phalcon/Mvc/Model.zep", 1897); } ZEPHIR_CALL_METHOD(NULL, &snapshot, "next", NULL, 0); zephir_check_call_status(); @@ -3480,12 +3495,12 @@ PHP_METHOD(Phalcon_Mvc_Model, query) { ZEPHIR_CALL_METHOD(NULL, &criteria, "__construct", NULL, 0); zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(NULL, &criteria, "setdi", NULL, 444, container); + ZEPHIR_CALL_METHOD(NULL, &criteria, "setdi", NULL, 446, container); zephir_check_call_status(); } ZEPHIR_INIT_VAR(&_3); zephir_get_called_class(&_3 TSRMLS_CC); - ZEPHIR_CALL_METHOD(NULL, &criteria, "setmodelname", NULL, 445, &_3); + ZEPHIR_CALL_METHOD(NULL, &criteria, "setmodelname", NULL, 447, &_3); zephir_check_call_status(); RETURN_CCTOR(&criteria); @@ -3575,18 +3590,18 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) { zephir_read_property(&_0, this_ptr, SL("dirtyState"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!ZEPHIR_IS_LONG(&_0, 0))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record cannot be refreshed because it does not exist or is deleted", "phalcon/Mvc/Model.zep", 2146); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record cannot be refreshed because it does not exist or is deleted", "phalcon/Mvc/Model.zep", 2156); return; } ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&readConnection, this_ptr, "getreadconnection", NULL, 437); + ZEPHIR_CALL_METHOD(&readConnection, this_ptr, "getreadconnection", NULL, 439); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, SL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&manager, &_1); - ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 440); + ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 442); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 441); + ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 443); zephir_check_call_status(); if (zephir_is_true(&schema)) { ZEPHIR_INIT_VAR(&table); @@ -3602,7 +3617,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) { ZEPHIR_CALL_METHOD(&_2$$6, this_ptr, "_exists", NULL, 0, &metaData, &readConnection); zephir_check_call_status(); if (UNEXPECTED(!zephir_is_true(&_2$$6))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record cannot be refreshed because it does not exist or is deleted", "phalcon/Mvc/Model.zep", 2171); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record cannot be refreshed because it does not exist or is deleted", "phalcon/Mvc/Model.zep", 2181); return; } zephir_read_property(&_3$$6, this_ptr, SL("uniqueKey"), PH_NOISY_CC | PH_READONLY); @@ -3611,14 +3626,14 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) { zephir_read_property(&_1, this_ptr, SL("uniqueParams"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&uniqueParams, &_1); if (UNEXPECTED(Z_TYPE_P(&uniqueParams) != IS_ARRAY)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record cannot be refreshed because it does not exist or is deleted", "phalcon/Mvc/Model.zep", 2182); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The record cannot be refreshed because it does not exist or is deleted", "phalcon/Mvc/Model.zep", 2192); return; } ZEPHIR_INIT_VAR(&fields); array_init(&fields); ZEPHIR_CALL_METHOD(&_4, &metaData, "getattributes", NULL, 0, this_ptr); zephir_check_call_status(); - zephir_is_iterable(&_4, 0, "phalcon/Mvc/Model.zep", 2197); + zephir_is_iterable(&_4, 0, "phalcon/Mvc/Model.zep", 2207); if (Z_TYPE_P(&_4) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_4), _5) { @@ -3627,7 +3642,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) { ZEPHIR_INIT_NVAR(&_7$$9); zephir_create_array(&_7$$9, 1, 0 TSRMLS_CC); zephir_array_fast_append(&_7$$9, &attribute); - zephir_array_append(&fields, &_7$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2191); + zephir_array_append(&fields, &_7$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2201); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_4, "rewind", NULL, 0); @@ -3643,7 +3658,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) { ZEPHIR_INIT_NVAR(&_8$$10); zephir_create_array(&_8$$10, 1, 0 TSRMLS_CC); zephir_array_fast_append(&_8$$10, &attribute); - zephir_array_append(&fields, &_8$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2191); + zephir_array_append(&fields, &_8$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 2201); ZEPHIR_CALL_METHOD(NULL, &_4, "next", NULL, 0); zephir_check_call_status(); } @@ -3745,7 +3760,7 @@ PHP_METHOD(Phalcon_Mvc_Model, save) { ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&writeConnection, this_ptr, "getwriteconnection", NULL, 438); + ZEPHIR_CALL_METHOD(&writeConnection, this_ptr, "getwriteconnection", NULL, 440); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "prepareSave"); @@ -3761,9 +3776,9 @@ PHP_METHOD(Phalcon_Mvc_Model, save) { RETURN_MM_BOOL(0); } } - ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 440); + ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 442); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 441); + ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 443); zephir_check_call_status(); if (zephir_is_true(&schema)) { ZEPHIR_INIT_VAR(&table); @@ -3773,7 +3788,7 @@ PHP_METHOD(Phalcon_Mvc_Model, save) { } else { ZEPHIR_CPY_WRT(&table, &source); } - ZEPHIR_CALL_METHOD(&readConnection, this_ptr, "getreadconnection", NULL, 437); + ZEPHIR_CALL_METHOD(&readConnection, this_ptr, "getreadconnection", NULL, 439); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&exists, this_ptr, "_exists", NULL, 0, &metaData, &readConnection); zephir_check_call_status(); @@ -3804,9 +3819,9 @@ PHP_METHOD(Phalcon_Mvc_Model, save) { object_init_ex(&_7$$11, phalcon_mvc_model_validationfailed_ce); ZEPHIR_CALL_METHOD(&_8$$11, this_ptr, "getmessages", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_7$$11, "__construct", NULL, 446, this_ptr, &_8$$11); + ZEPHIR_CALL_METHOD(NULL, &_7$$11, "__construct", NULL, 448, this_ptr, &_8$$11); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$11, "phalcon/Mvc/Model.zep", 2346 TSRMLS_CC); + zephir_throw_exception_debug(&_7$$11, "phalcon/Mvc/Model.zep", 2356 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -3956,7 +3971,7 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 5, &_2$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model.zep", 2467 TSRMLS_CC); + zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model.zep", 2477 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -3967,7 +3982,7 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) { zephir_check_call_status(); ZEPHIR_CPY_WRT(&manager, &_5$$3); if (UNEXPECTED(Z_TYPE_P(&manager) != IS_OBJECT)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The injected service 'modelsManager' is not valid", "phalcon/Mvc/Model.zep", 2483); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The injected service 'modelsManager' is not valid", "phalcon/Mvc/Model.zep", 2493); return; } zephir_update_property_zval(this_ptr, SL("modelsManager"), &manager); @@ -3978,13 +3993,13 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) { if (zephir_is_true(&_5$$3)) { if (zephir_array_isset_string_fetch(&snapshot, &attributes, SL("snapshot"), 1)) { zephir_update_property_zval(this_ptr, SL("snapshot"), &snapshot); - zephir_array_fetch_string(&_7$$7, &attributes, SL("_attributes"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 2499 TSRMLS_CC); + zephir_array_fetch_string(&_7$$7, &attributes, SL("_attributes"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 2509 TSRMLS_CC); ZEPHIR_CPY_WRT(&attributes, &_7$$7); } else { zephir_update_property_zval(this_ptr, SL("snapshot"), &attributes); } } - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 2511); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 2521); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&attributes), _10$$3, _11$$3, _8$$3) { @@ -4082,6 +4097,24 @@ PHP_METHOD(Phalcon_Mvc_Model, setDirtyState) { } +/** + * Sets the dependency injection container + */ +PHP_METHOD(Phalcon_Mvc_Model, setDI) { + + zval *container, container_sub; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&container_sub); + + zephir_fetch_params_without_memory_grow(1, 0, &container); + + + + zephir_update_property_zval(this_ptr, SL("container"), container); + +} + /** * Sets a custom events manager */ @@ -4192,7 +4225,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", 2612); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 2630); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2$$3, _3$$3, _0$$3) { @@ -4216,7 +4249,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) { ZEPHIR_CONCAT_SVS(&_5$$7, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", &_6, 5, &_5$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_4$$7, "phalcon/Mvc/Model.zep", 2592 TSRMLS_CC); + zephir_throw_exception_debug(&_4$$7, "phalcon/Mvc/Model.zep", 2610 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -4232,7 +4265,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) { ZEPHIR_CONCAT_SVS(&_8$$10, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_7$$10, "__construct", &_6, 5, &_8$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$10, "phalcon/Mvc/Model.zep", 2603 TSRMLS_CC); + zephir_throw_exception_debug(&_7$$10, "phalcon/Mvc/Model.zep", 2621 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -4266,7 +4299,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) { ZEPHIR_CONCAT_SVS(&_10$$14, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_9$$14, "__construct", &_6, 5, &_10$$14); zephir_check_call_status(); - zephir_throw_exception_debug(&_9$$14, "phalcon/Mvc/Model.zep", 2592 TSRMLS_CC); + zephir_throw_exception_debug(&_9$$14, "phalcon/Mvc/Model.zep", 2610 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -4282,7 +4315,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) { ZEPHIR_CONCAT_SVS(&_12$$17, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_11$$17, "__construct", &_6, 5, &_12$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_11$$17, "phalcon/Mvc/Model.zep", 2603 TSRMLS_CC); + zephir_throw_exception_debug(&_11$$17, "phalcon/Mvc/Model.zep", 2621 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -4355,7 +4388,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", 2677); + zephir_is_iterable(&data, 0, "phalcon/Mvc/Model.zep", 2695); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2$$3, _3$$3, _0$$3) { @@ -4375,7 +4408,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) { _4$$4 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_4$$4) { - ZEPHIR_CALL_SELF(&_5$$6, "caseinsensitivecolumnmap", &_6, 435, columnMap, &key); + ZEPHIR_CALL_SELF(&_5$$6, "caseinsensitivecolumnmap", &_6, 437, columnMap, &key); zephir_check_call_status(); ZEPHIR_CPY_WRT(&key, &_5$$6); } @@ -4388,7 +4421,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) { ZEPHIR_CONCAT_SVS(&_8$$8, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_7$$8, "__construct", &_9, 5, &_8$$8); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$8, "phalcon/Mvc/Model.zep", 2657 TSRMLS_CC); + zephir_throw_exception_debug(&_7$$8, "phalcon/Mvc/Model.zep", 2675 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -4404,7 +4437,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) { ZEPHIR_CONCAT_SVS(&_11$$11, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_10$$11, "__construct", &_9, 5, &_11$$11); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$11, "phalcon/Mvc/Model.zep", 2668 TSRMLS_CC); + zephir_throw_exception_debug(&_10$$11, "phalcon/Mvc/Model.zep", 2686 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -4434,7 +4467,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) { _12$$12 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_12$$12) { - ZEPHIR_CALL_SELF(&_13$$14, "caseinsensitivecolumnmap", &_6, 435, columnMap, &key); + ZEPHIR_CALL_SELF(&_13$$14, "caseinsensitivecolumnmap", &_6, 437, columnMap, &key); zephir_check_call_status(); ZEPHIR_CPY_WRT(&key, &_13$$14); } @@ -4447,7 +4480,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) { ZEPHIR_CONCAT_SVS(&_15$$16, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_14$$16, "__construct", &_9, 5, &_15$$16); zephir_check_call_status(); - zephir_throw_exception_debug(&_14$$16, "phalcon/Mvc/Model.zep", 2657 TSRMLS_CC); + zephir_throw_exception_debug(&_14$$16, "phalcon/Mvc/Model.zep", 2675 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -4463,7 +4496,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) { ZEPHIR_CONCAT_SVS(&_17$$19, "Column '", &key, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_16$$19, "__construct", &_9, 5, &_17$$19); zephir_check_call_status(); - zephir_throw_exception_debug(&_16$$19, "phalcon/Mvc/Model.zep", 2668 TSRMLS_CC); + zephir_throw_exception_debug(&_16$$19, "phalcon/Mvc/Model.zep", 2686 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -4812,7 +4845,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", 2949); + zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model.zep", 2967); if (Z_TYPE_P(&_0) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_0), _1) { @@ -4824,7 +4857,7 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) { _3$$4 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_3$$4) { - ZEPHIR_CALL_SELF(&_4$$5, "caseinsensitivecolumnmap", &_5, 435, &columnMap, &attribute); + ZEPHIR_CALL_SELF(&_4$$5, "caseinsensitivecolumnmap", &_5, 437, &columnMap, &attribute); zephir_check_call_status(); ZEPHIR_CPY_WRT(&attribute, &_4$$5); } @@ -4837,7 +4870,7 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) { ZEPHIR_CONCAT_SVS(&_7$$7, "Column '", &attribute, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_6$$7, "__construct", &_8, 5, &_7$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$7, "phalcon/Mvc/Model.zep", 2927 TSRMLS_CC); + zephir_throw_exception_debug(&_6$$7, "phalcon/Mvc/Model.zep", 2945 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -4875,7 +4908,7 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) { _9$$14 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_9$$14) { - ZEPHIR_CALL_SELF(&_10$$15, "caseinsensitivecolumnmap", &_5, 435, &columnMap, &attribute); + ZEPHIR_CALL_SELF(&_10$$15, "caseinsensitivecolumnmap", &_5, 437, &columnMap, &attribute); zephir_check_call_status(); ZEPHIR_CPY_WRT(&attribute, &_10$$15); } @@ -4888,7 +4921,7 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) { ZEPHIR_CONCAT_SVS(&_12$$17, "Column '", &attribute, "' doesn't make part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_11$$17, "__construct", &_8, 5, &_12$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_11$$17, "phalcon/Mvc/Model.zep", 2927 TSRMLS_CC); + zephir_throw_exception_debug(&_11$$17, "phalcon/Mvc/Model.zep", 2945 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -4955,7 +4988,7 @@ PHP_METHOD(Phalcon_Mvc_Model, update) { if (zephir_is_true(&_0)) { ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "getreadconnection", NULL, 437); + ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "getreadconnection", NULL, 439); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1$$3, this_ptr, "_exists", NULL, 0, &metaData, &_2$$3); zephir_check_call_status(); @@ -5090,7 +5123,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", 3156); + zephir_is_iterable(&belongsTo, 0, "phalcon/Mvc/Model.zep", 3174); if (Z_TYPE_P(&belongsTo) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&belongsTo), _1) { @@ -5105,7 +5138,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", 3051 TSRMLS_CC); + zephir_array_fetch_string(&_3$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3069 TSRMLS_CC); action = zephir_get_intval(&_3$$5); } if (action != 1) { @@ -5125,7 +5158,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", 3094); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3112); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _8$$7, _9$$7, _6$$7) { @@ -5139,11 +5172,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", 3086 TSRMLS_CC); + zephir_array_fetch(&_10$$8, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3104 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_11$$8); ZEPHIR_CONCAT_SVSV(&_11$$8, "[", &_10$$8, "] = ?", &position); - zephir_array_append(&conditions, &_11$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3086); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3087); + zephir_array_append(&conditions, &_11$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3104); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3105); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -5163,11 +5196,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", 3086 TSRMLS_CC); + zephir_array_fetch(&_12$$10, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3104 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_13$$10); ZEPHIR_CONCAT_SVSV(&_13$$10, "[", &_12$$10, "] = ?", &position); - zephir_array_append(&conditions, &_13$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3086); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3087); + zephir_array_append(&conditions, &_13$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3104); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3105); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -5183,15 +5216,15 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_LNVAR(_14$$12); ZEPHIR_CONCAT_SVS(&_14$$12, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_14$$12, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3098); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3099); + zephir_array_append(&conditions, &_14$$12, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3116); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3117); 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", 3110); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3128); } if (validateWithNulls) { ZEPHIR_OBS_NVAR(&allowNulls); @@ -5257,7 +5290,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { action = 1; if (zephir_array_isset_string(&foreignKey, SL("action"))) { ZEPHIR_OBS_NVAR(&_24$$24); - zephir_array_fetch_string(&_24$$24, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3051 TSRMLS_CC); + zephir_array_fetch_string(&_24$$24, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3069 TSRMLS_CC); action = zephir_get_intval(&_24$$24); } if (action != 1) { @@ -5277,7 +5310,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", 3094); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3112); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _29$$26, _30$$26, _27$$26) { @@ -5291,11 +5324,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { ZVAL_COPY(&field, _27$$26); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_31$$27, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3086 TSRMLS_CC); + zephir_array_fetch(&_31$$27, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3104 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_32$$27); ZEPHIR_CONCAT_SVSV(&_32$$27, "[", &_31$$27, "] = ?", &position); - zephir_array_append(&conditions, &_32$$27, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3086); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3087); + zephir_array_append(&conditions, &_32$$27, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3104); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3105); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -5315,11 +5348,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { zephir_check_call_status(); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_33$$29, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3086 TSRMLS_CC); + zephir_array_fetch(&_33$$29, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3104 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_34$$29); ZEPHIR_CONCAT_SVSV(&_34$$29, "[", &_33$$29, "] = ?", &position); - zephir_array_append(&conditions, &_34$$29, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3086); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3087); + zephir_array_append(&conditions, &_34$$29, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3104); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3105); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -5335,15 +5368,15 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) { zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_LNVAR(_35$$31); ZEPHIR_CONCAT_SVS(&_35$$31, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_35$$31, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3098); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3099); + zephir_array_append(&conditions, &_35$$31, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3116); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3117); 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", 3110); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3128); } if (validateWithNulls) { ZEPHIR_OBS_NVAR(&allowNulls); @@ -5469,7 +5502,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", 3276); + zephir_is_iterable(&relations, 0, "phalcon/Mvc/Model.zep", 3294); if (Z_TYPE_P(&relations) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relations), _1) { @@ -5487,7 +5520,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", 3208 TSRMLS_CC); + zephir_array_fetch_string(&_4$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3226 TSRMLS_CC); action = zephir_get_intval(&_4$$5); } if (action != 2) { @@ -5506,7 +5539,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { ZEPHIR_INIT_NVAR(&bindParams); array_init(&bindParams); if (Z_TYPE_P(&fields) == IS_ARRAY) { - zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3241); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3259); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _9$$7, _10$$7, _7$$7) { @@ -5520,11 +5553,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { ZVAL_COPY(&field, _7$$7); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_11$$8, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3238 TSRMLS_CC); + zephir_array_fetch(&_11$$8, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3256 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_12$$8); ZEPHIR_CONCAT_SVSV(&_12$$8, "[", &_11$$8, "] = ?", &position); - zephir_array_append(&conditions, &_12$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3238); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3239); + zephir_array_append(&conditions, &_12$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3256); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3257); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &fields, "rewind", NULL, 0); @@ -5541,11 +5574,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { zephir_check_call_status(); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_13$$9, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3238 TSRMLS_CC); + zephir_array_fetch(&_13$$9, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3256 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_14$$9); ZEPHIR_CONCAT_SVSV(&_14$$9, "[", &_13$$9, "] = ?", &position); - zephir_array_append(&conditions, &_14$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3238); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3239); + zephir_array_append(&conditions, &_14$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3256); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3257); ZEPHIR_CALL_METHOD(NULL, &fields, "next", NULL, 0); zephir_check_call_status(); } @@ -5557,12 +5590,12 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_LNVAR(_15$$10); ZEPHIR_CONCAT_SVS(&_15$$10, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_15$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3244); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3245); + zephir_array_append(&conditions, &_15$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3262); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3263); } 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", 3252); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3270); } ZEPHIR_INIT_NVAR(&_16$$3); zephir_create_array(&_16$$3, 2, 0 TSRMLS_CC); @@ -5601,7 +5634,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { } if (_19$$13) { ZEPHIR_OBS_NVAR(&_20$$15); - zephir_array_fetch_string(&_20$$15, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3208 TSRMLS_CC); + zephir_array_fetch_string(&_20$$15, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3226 TSRMLS_CC); action = zephir_get_intval(&_20$$15); } if (action != 2) { @@ -5620,7 +5653,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { ZEPHIR_INIT_NVAR(&bindParams); array_init(&bindParams); if (Z_TYPE_P(&fields) == IS_ARRAY) { - zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3241); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3259); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _25$$17, _26$$17, _23$$17) { @@ -5634,11 +5667,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { ZVAL_COPY(&field, _23$$17); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_27$$18, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3238 TSRMLS_CC); + zephir_array_fetch(&_27$$18, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3256 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_28$$18); ZEPHIR_CONCAT_SVSV(&_28$$18, "[", &_27$$18, "] = ?", &position); - zephir_array_append(&conditions, &_28$$18, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3238); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3239); + zephir_array_append(&conditions, &_28$$18, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3256); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3257); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &fields, "rewind", NULL, 0); @@ -5655,11 +5688,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { zephir_check_call_status(); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_29$$19, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3238 TSRMLS_CC); + zephir_array_fetch(&_29$$19, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3256 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_30$$19); ZEPHIR_CONCAT_SVSV(&_30$$19, "[", &_29$$19, "] = ?", &position); - zephir_array_append(&conditions, &_30$$19, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3238); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3239); + zephir_array_append(&conditions, &_30$$19, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3256); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3257); ZEPHIR_CALL_METHOD(NULL, &fields, "next", NULL, 0); zephir_check_call_status(); } @@ -5671,12 +5704,12 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) { zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_LNVAR(_31$$20); ZEPHIR_CONCAT_SVS(&_31$$20, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_31$$20, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3244); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3245); + zephir_array_append(&conditions, &_31$$20, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3262); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3263); } 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", 3252); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3270); } ZEPHIR_INIT_NVAR(&_32$$13); zephir_create_array(&_32$$13, 2, 0 TSRMLS_CC); @@ -5766,7 +5799,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", 3399); + zephir_is_iterable(&relations, 0, "phalcon/Mvc/Model.zep", 3417); if (Z_TYPE_P(&relations) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relations), _1) { @@ -5784,7 +5817,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", 3322 TSRMLS_CC); + zephir_array_fetch_string(&_4$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3340 TSRMLS_CC); action = zephir_get_intval(&_4$$5); } if (action != 1) { @@ -5803,7 +5836,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { ZEPHIR_INIT_NVAR(&bindParams); array_init(&bindParams); if (Z_TYPE_P(&fields) == IS_ARRAY) { - zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3356); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3374); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _8$$7, _9$$7, _6$$7) { @@ -5817,11 +5850,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { ZVAL_COPY(&field, _6$$7); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_10$$8, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3353 TSRMLS_CC); + zephir_array_fetch(&_10$$8, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3371 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_11$$8); ZEPHIR_CONCAT_SVSV(&_11$$8, "[", &_10$$8, "] = ?", &position); - zephir_array_append(&conditions, &_11$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3353); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3354); + zephir_array_append(&conditions, &_11$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3371); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3372); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &fields, "rewind", NULL, 0); @@ -5838,11 +5871,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { zephir_check_call_status(); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_12$$9, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3353 TSRMLS_CC); + zephir_array_fetch(&_12$$9, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3371 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_13$$9); ZEPHIR_CONCAT_SVSV(&_13$$9, "[", &_12$$9, "] = ?", &position); - zephir_array_append(&conditions, &_13$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3353); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3354); + zephir_array_append(&conditions, &_13$$9, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3371); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3372); ZEPHIR_CALL_METHOD(NULL, &fields, "next", NULL, 0); zephir_check_call_status(); } @@ -5854,12 +5887,12 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_LNVAR(_14$$10); ZEPHIR_CONCAT_SVS(&_14$$10, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_14$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3359); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3360); + zephir_array_append(&conditions, &_14$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3377); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3378); } 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", 3367); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3385); } ZEPHIR_INIT_NVAR(&_16$$3); zephir_create_array(&_16$$3, 2, 0 TSRMLS_CC); @@ -5910,7 +5943,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { } if (_22$$14) { ZEPHIR_OBS_NVAR(&_23$$16); - zephir_array_fetch_string(&_23$$16, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3322 TSRMLS_CC); + zephir_array_fetch_string(&_23$$16, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3340 TSRMLS_CC); action = zephir_get_intval(&_23$$16); } if (action != 1) { @@ -5929,7 +5962,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { ZEPHIR_INIT_NVAR(&bindParams); array_init(&bindParams); if (Z_TYPE_P(&fields) == IS_ARRAY) { - zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3356); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3374); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _27$$18, _28$$18, _25$$18) { @@ -5943,11 +5976,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { ZVAL_COPY(&field, _25$$18); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_29$$19, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3353 TSRMLS_CC); + zephir_array_fetch(&_29$$19, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3371 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_30$$19); ZEPHIR_CONCAT_SVSV(&_30$$19, "[", &_29$$19, "] = ?", &position); - zephir_array_append(&conditions, &_30$$19, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3353); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3354); + zephir_array_append(&conditions, &_30$$19, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3371); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3372); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &fields, "rewind", NULL, 0); @@ -5964,11 +5997,11 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { zephir_check_call_status(); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_31$$20, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3353 TSRMLS_CC); + zephir_array_fetch(&_31$$20, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3371 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_32$$20); ZEPHIR_CONCAT_SVSV(&_32$$20, "[", &_31$$20, "] = ?", &position); - zephir_array_append(&conditions, &_32$$20, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3353); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3354); + zephir_array_append(&conditions, &_32$$20, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3371); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3372); ZEPHIR_CALL_METHOD(NULL, &fields, "next", NULL, 0); zephir_check_call_status(); } @@ -5980,12 +6013,12 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) { zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_LNVAR(_33$$21); ZEPHIR_CONCAT_SVS(&_33$$21, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_33$$21, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3359); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3360); + zephir_array_append(&conditions, &_33$$21, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3377); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3378); } 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", 3367); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3385); } ZEPHIR_INIT_NVAR(&_35$$14); zephir_create_array(&_35$$14, 2, 0 TSRMLS_CC); @@ -6141,7 +6174,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_INIT_NVAR(&columnMap); ZVAL_NULL(&columnMap); } - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 3516); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 3534); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _1) { @@ -6156,7 +6189,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_CONCAT_SVS(&_4$$7, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", &_5, 5, &_4$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 3458 TSRMLS_CC); + zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 3476 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -6174,9 +6207,9 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { if (_6$$11) { ZEPHIR_CALL_METHOD(&value, connection, "getdefaultvalue", &_7, 0); zephir_check_call_status(); - zephir_array_fetch(&_8$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3477 TSRMLS_CC); + zephir_array_fetch(&_8$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3495 TSRMLS_CC); 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", 3478 TSRMLS_CC); + zephir_array_fetch(&_9$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3496 TSRMLS_CC); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_9$$12, PH_COPY | PH_SEPARATE); } else { zephir_array_update_zval(&snapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); @@ -6189,28 +6222,28 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_CONCAT_SVS(&_11$$14, "Column '", &field, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_10$$14, "__construct", &_5, 5, &_11$$14); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$14, "phalcon/Mvc/Model.zep", 3489 TSRMLS_CC); + zephir_throw_exception_debug(&_10$$14, "phalcon/Mvc/Model.zep", 3507 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3492); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3493); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3494); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3510); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3511); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3512); } else { if (zephir_array_isset(&defaultValues, &field)) { ZEPHIR_CALL_METHOD(&_12$$16, connection, "getdefaultvalue", &_13, 0); zephir_check_call_status(); - zephir_array_append(&values, &_12$$16, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3497); - zephir_array_fetch(&_14$$16, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3499 TSRMLS_CC); + zephir_array_append(&values, &_12$$16, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3515); + zephir_array_fetch(&_14$$16, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3517 TSRMLS_CC); zephir_array_update_zval(&snapshot, &attributeField, &_14$$16, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_15$$16, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3500 TSRMLS_CC); + zephir_array_fetch(&_15$$16, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3518 TSRMLS_CC); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_15$$16, PH_COPY | PH_SEPARATE); } else { - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3502); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3520); zephir_array_update_zval(&snapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3506); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3507); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3524); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3525); } } } @@ -6235,7 +6268,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_CONCAT_SVS(&_17$$20, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_16$$20, "__construct", &_5, 5, &_17$$20); zephir_check_call_status(); - zephir_throw_exception_debug(&_16$$20, "phalcon/Mvc/Model.zep", 3458 TSRMLS_CC); + zephir_throw_exception_debug(&_16$$20, "phalcon/Mvc/Model.zep", 3476 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -6253,9 +6286,9 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { if (_18$$24) { ZEPHIR_CALL_METHOD(&value, connection, "getdefaultvalue", &_19, 0); zephir_check_call_status(); - zephir_array_fetch(&_20$$25, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3477 TSRMLS_CC); + zephir_array_fetch(&_20$$25, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3495 TSRMLS_CC); zephir_array_update_zval(&snapshot, &attributeField, &_20$$25, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_21$$25, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3478 TSRMLS_CC); + zephir_array_fetch(&_21$$25, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3496 TSRMLS_CC); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_21$$25, PH_COPY | PH_SEPARATE); } else { zephir_array_update_zval(&snapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); @@ -6268,28 +6301,28 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_CONCAT_SVS(&_23$$27, "Column '", &field, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_22$$27, "__construct", &_5, 5, &_23$$27); zephir_check_call_status(); - zephir_throw_exception_debug(&_22$$27, "phalcon/Mvc/Model.zep", 3489 TSRMLS_CC); + zephir_throw_exception_debug(&_22$$27, "phalcon/Mvc/Model.zep", 3507 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3492); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3493); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3494); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3510); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3511); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3512); } else { if (zephir_array_isset(&defaultValues, &field)) { ZEPHIR_CALL_METHOD(&_24$$29, connection, "getdefaultvalue", &_25, 0); zephir_check_call_status(); - zephir_array_append(&values, &_24$$29, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3497); - zephir_array_fetch(&_26$$29, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3499 TSRMLS_CC); + zephir_array_append(&values, &_24$$29, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3515); + zephir_array_fetch(&_26$$29, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3517 TSRMLS_CC); zephir_array_update_zval(&snapshot, &attributeField, &_26$$29, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_27$$29, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3500 TSRMLS_CC); + zephir_array_fetch(&_27$$29, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3518 TSRMLS_CC); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_27$$29, PH_COPY | PH_SEPARATE); } else { - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3502); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3520); zephir_array_update_zval(&snapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3506); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3507); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3524); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3525); } } } @@ -6305,7 +6338,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { zephir_check_call_status(); useExplicitIdentity = zephir_get_boolval(&_28$$31); if (useExplicitIdentity) { - zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3526); + zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3544); } if (Z_TYPE_P(&columnMap) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&attributeField); @@ -6316,7 +6349,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_CONCAT_SVS(&_30$$34, "Identity column '", identityField, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_29$$34, "__construct", &_5, 5, &_30$$34); zephir_check_call_status(); - zephir_throw_exception_debug(&_29$$34, "phalcon/Mvc/Model.zep", 3536 TSRMLS_CC); + zephir_throw_exception_debug(&_29$$34, "phalcon/Mvc/Model.zep", 3554 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -6331,12 +6364,12 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { } if (_31$$36) { if (useExplicitIdentity) { - zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3548); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3548); + zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3566); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3566); } } else { if (!(useExplicitIdentity)) { - zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3556); + zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3574); } ZEPHIR_OBS_NVAR(&bindType); if (UNEXPECTED(!(zephir_array_isset_fetch(&bindType, &bindDataTypes, identityField, 0 TSRMLS_CC)))) { @@ -6346,17 +6379,17 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_CONCAT_SVS(&_33$$41, "Identity column '", identityField, "' isn\\'t part of the table columns"); ZEPHIR_CALL_METHOD(NULL, &_32$$41, "__construct", &_5, 5, &_33$$41); zephir_check_call_status(); - zephir_throw_exception_debug(&_32$$41, "phalcon/Mvc/Model.zep", 3565 TSRMLS_CC); + zephir_throw_exception_debug(&_32$$41, "phalcon/Mvc/Model.zep", 3583 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3568); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3569); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3586); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3587); } } else { if (useExplicitIdentity) { - zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3573); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3574); + zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3591); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3592); } } } @@ -6376,9 +6409,9 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { ZEPHIR_CALL_METHOD(&sequenceName, this_ptr, "getsequencename", NULL, 0); zephir_check_call_status(); } else { - ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 441); + ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 443); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 440); + ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 442); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&sequenceName); if (ZEPHIR_IS_EMPTY(&schema)) { @@ -6401,7 +6434,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) { zephir_update_property_zval(this_ptr, SL("uniqueParams"), &__$null); } if (zephir_is_true(&success)) { - zephir_is_iterable(&unsetDefaultValues, 0, "phalcon/Mvc/Model.zep", 3637); + zephir_is_iterable(&unsetDefaultValues, 0, "phalcon/Mvc/Model.zep", 3655); if (Z_TYPE_P(&unsetDefaultValues) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&unsetDefaultValues), _40$$51, _41$$51, _38$$51) { @@ -6566,7 +6599,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_INIT_NVAR(&columnMap); ZVAL_NULL(&columnMap); } - zephir_is_iterable(&nonPrimary, 0, "phalcon/Mvc/Model.zep", 3812); + zephir_is_iterable(&nonPrimary, 0, "phalcon/Mvc/Model.zep", 3830); if (Z_TYPE_P(&nonPrimary) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&nonPrimary), _2) { @@ -6581,7 +6614,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_5$$9, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_4$$9, "__construct", &_6, 5, &_5$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_4$$9, "phalcon/Mvc/Model.zep", 3701 TSRMLS_CC); + zephir_throw_exception_debug(&_4$$9, "phalcon/Mvc/Model.zep", 3719 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -6597,16 +6630,16 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_8$$12, "Column '", &field, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_7$$12, "__construct", &_6, 5, &_8$$12); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$12, "phalcon/Mvc/Model.zep", 3714 TSRMLS_CC); + zephir_throw_exception_debug(&_7$$12, "phalcon/Mvc/Model.zep", 3732 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_OBS_NVAR(&value); if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { if (!(useDynamicUpdate)) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3726); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3727); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3728); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3744); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3745); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3746); } else { ZEPHIR_OBS_NVAR(&snapshotValue); if (!(zephir_array_isset_fetch(&snapshotValue, &snapshot, &attributeField, 0 TSRMLS_CC))) { @@ -6626,7 +6659,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_10$$22, "Column '", &field, "' have not defined a data type"); ZEPHIR_CALL_METHOD(NULL, &_9$$22, "__construct", &_6, 5, &_10$$22); zephir_check_call_status(); - zephir_throw_exception_debug(&_9$$22, "phalcon/Mvc/Model.zep", 3753 TSRMLS_CC); + zephir_throw_exception_debug(&_9$$22, "phalcon/Mvc/Model.zep", 3771 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -6656,17 +6689,17 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { } } if (changed) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3792); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3793); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3794); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3810); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3811); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3812); } } 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", 3802); - zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3803); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3804); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3820); + zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3821); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3822); } } } ZEND_HASH_FOREACH_END(); @@ -6690,7 +6723,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_17$$31, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_16$$31, "__construct", &_6, 5, &_17$$31); zephir_check_call_status(); - zephir_throw_exception_debug(&_16$$31, "phalcon/Mvc/Model.zep", 3701 TSRMLS_CC); + zephir_throw_exception_debug(&_16$$31, "phalcon/Mvc/Model.zep", 3719 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -6706,16 +6739,16 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_19$$34, "Column '", &field, "' have not defined a bind data type"); ZEPHIR_CALL_METHOD(NULL, &_18$$34, "__construct", &_6, 5, &_19$$34); zephir_check_call_status(); - zephir_throw_exception_debug(&_18$$34, "phalcon/Mvc/Model.zep", 3714 TSRMLS_CC); + zephir_throw_exception_debug(&_18$$34, "phalcon/Mvc/Model.zep", 3732 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_OBS_NVAR(&value); if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { if (!(useDynamicUpdate)) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3726); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3727); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3728); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3744); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3745); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3746); } else { ZEPHIR_OBS_NVAR(&snapshotValue); if (!(zephir_array_isset_fetch(&snapshotValue, &snapshot, &attributeField, 0 TSRMLS_CC))) { @@ -6735,7 +6768,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_21$$44, "Column '", &field, "' have not defined a data type"); ZEPHIR_CALL_METHOD(NULL, &_20$$44, "__construct", &_6, 5, &_21$$44); zephir_check_call_status(); - zephir_throw_exception_debug(&_20$$44, "phalcon/Mvc/Model.zep", 3753 TSRMLS_CC); + zephir_throw_exception_debug(&_20$$44, "phalcon/Mvc/Model.zep", 3771 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -6765,17 +6798,17 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { } } if (changed) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3792); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3793); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3794); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3810); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3811); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3812); } } 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", 3802); - zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3803); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3804); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3820); + zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3821); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3822); } } ZEPHIR_CALL_METHOD(NULL, &nonPrimary, "next", NULL, 0); @@ -6799,12 +6832,12 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CALL_METHOD(&primaryKeys, metaData, "getprimarykeyattributes", NULL, 0, this_ptr); zephir_check_call_status(); if (UNEXPECTED(!(zephir_fast_count_int(&primaryKeys TSRMLS_CC)))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A primary key must be defined in the model in order to perform the operation", "phalcon/Mvc/Model.zep", 3836); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A primary key must be defined in the model in order to perform the operation", "phalcon/Mvc/Model.zep", 3854); return; } ZEPHIR_INIT_NVAR(&uniqueParams); array_init(&uniqueParams); - zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 3863); + zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 3881); if (Z_TYPE_P(&primaryKeys) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&primaryKeys), _26$$53) { @@ -6819,7 +6852,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_29$$57, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_28$$57, "__construct", &_6, 5, &_29$$57); zephir_check_call_status(); - zephir_throw_exception_debug(&_28$$57, "phalcon/Mvc/Model.zep", 3849 TSRMLS_CC); + zephir_throw_exception_debug(&_28$$57, "phalcon/Mvc/Model.zep", 3867 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -6829,10 +6862,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", 3857); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3875); } else { zephir_array_update_zval(&newSnapshot, &attributeField, &__$null, PH_COPY | PH_SEPARATE); - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3860); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3878); } } ZEND_HASH_FOREACH_END(); } else { @@ -6855,7 +6888,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) { ZEPHIR_CONCAT_SVS(&_31$$63, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_30$$63, "__construct", &_6, 5, &_31$$63); zephir_check_call_status(); - zephir_throw_exception_debug(&_30$$63, "phalcon/Mvc/Model.zep", 3849 TSRMLS_CC); + zephir_throw_exception_debug(&_30$$63, "phalcon/Mvc/Model.zep", 3867 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -6865,10 +6898,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", 3857); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3875); } else { zephir_array_update_zval(&newSnapshot, &attributeField, &__$null, PH_COPY | PH_SEPARATE); - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3860); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3878); } ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "next", NULL, 0); zephir_check_call_status(); @@ -6999,7 +7032,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { array_init(&uniqueParams); ZEPHIR_INIT_NVAR(&uniqueTypes); array_init(&uniqueTypes); - zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 3985); + zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 4003); if (Z_TYPE_P(&primaryKeys) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&primaryKeys), _1$$3) { @@ -7014,7 +7047,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { ZEPHIR_CONCAT_SVS(&_4$$9, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_3$$9, "__construct", &_5, 5, &_4$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$9, "phalcon/Mvc/Model.zep", 3944 TSRMLS_CC); + zephir_throw_exception_debug(&_3$$9, "phalcon/Mvc/Model.zep", 3962 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -7032,9 +7065,9 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { if (_6$$11) { numberEmpty++; } - zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3965); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3983); } else { - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3967); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3985); numberEmpty++; } ZEPHIR_OBS_NVAR(&type); @@ -7045,16 +7078,16 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { ZEPHIR_CONCAT_SVS(&_8$$14, "Column '", &field, "' isn't part of the table columns"); ZEPHIR_CALL_METHOD(NULL, &_7$$14, "__construct", &_5, 5, &_8$$14); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$14, "phalcon/Mvc/Model.zep", 3974 TSRMLS_CC); + zephir_throw_exception_debug(&_7$$14, "phalcon/Mvc/Model.zep", 3992 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3977); + zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3995); ZEPHIR_CALL_METHOD(&_9$$7, connection, "escapeidentifier", &_10, 0, &field); zephir_check_call_status(); ZEPHIR_INIT_LNVAR(_11$$7); ZEPHIR_CONCAT_VS(&_11$$7, &_9$$7, " = ?"); - zephir_array_append(&wherePk, &_11$$7, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3978); + zephir_array_append(&wherePk, &_11$$7, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3996); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "rewind", NULL, 0); @@ -7076,7 +7109,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { ZEPHIR_CONCAT_SVS(&_13$$17, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_12$$17, "__construct", &_5, 5, &_13$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_12$$17, "phalcon/Mvc/Model.zep", 3944 TSRMLS_CC); + zephir_throw_exception_debug(&_12$$17, "phalcon/Mvc/Model.zep", 3962 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -7094,9 +7127,9 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { if (_14$$19) { numberEmpty++; } - zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3965); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3983); } else { - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3967); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3985); numberEmpty++; } ZEPHIR_OBS_NVAR(&type); @@ -7107,16 +7140,16 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { ZEPHIR_CONCAT_SVS(&_16$$22, "Column '", &field, "' isn't part of the table columns"); ZEPHIR_CALL_METHOD(NULL, &_15$$22, "__construct", &_5, 5, &_16$$22); zephir_check_call_status(); - zephir_throw_exception_debug(&_15$$22, "phalcon/Mvc/Model.zep", 3974 TSRMLS_CC); + zephir_throw_exception_debug(&_15$$22, "phalcon/Mvc/Model.zep", 3992 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3977); + zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3995); ZEPHIR_CALL_METHOD(&_17$$15, connection, "escapeidentifier", &_18, 0, &field); zephir_check_call_status(); ZEPHIR_INIT_LNVAR(_19$$15); ZEPHIR_CONCAT_VS(&_19$$15, &_17$$15, " = ?"); - zephir_array_append(&wherePk, &_19$$15, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3978); + zephir_array_append(&wherePk, &_19$$15, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3996); ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "next", NULL, 0); zephir_check_call_status(); } @@ -7148,9 +7181,9 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { zephir_read_property(&_22$$27, this_ptr, SL("uniqueTypes"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&uniqueTypes, &_22$$27); } - ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 440); + ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 442); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 441); + ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 443); zephir_check_call_status(); if (zephir_is_true(&schema)) { ZEPHIR_INIT_VAR(&table); @@ -7167,7 +7200,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) { ZVAL_NULL(&_25); ZEPHIR_CALL_METHOD(&num, connection, "fetchone", NULL, 0, &_24, &_25, &uniqueParams, &uniqueTypes); zephir_check_call_status(); - zephir_array_fetch_string(&_26, &num, SL("rowcount"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4039 TSRMLS_CC); + zephir_array_fetch_string(&_26, &num, SL("rowcount"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4057 TSRMLS_CC); if (zephir_is_true(&_26)) { ZEPHIR_INIT_ZVAL_NREF(_27$$30); ZVAL_LONG(&_27$$30, 0); @@ -7349,7 +7382,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", 4134); + zephir_array_append(¶ms, parameters, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4152); } } else { ZEPHIR_CPY_WRT(¶ms, parameters); @@ -7490,7 +7523,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _invokeFinder) { ZEPHIR_CONCAT_SVS(&_4$$7, "The static method '", &method, "' requires one argument"); ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", NULL, 5, &_4$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 4253 TSRMLS_CC); + zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 4271 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -7530,7 +7563,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _invokeFinder) { ZEPHIR_CONCAT_SVS(&_8$$13, "Cannot resolve attribute '", &extraMethod, "' in the model"); ZEPHIR_CALL_METHOD(NULL, &_7$$13, "__construct", NULL, 5, &_8$$13); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$13, "phalcon/Mvc/Model.zep", 4290 TSRMLS_CC); + zephir_throw_exception_debug(&_7$$13, "phalcon/Mvc/Model.zep", 4308 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -7670,7 +7703,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSave) { } } if (ZEPHIR_GLOBAL(orm).virtual_foreign_keys) { - ZEPHIR_CALL_METHOD(&_3$$8, this_ptr, "_checkforeignkeysrestrict", NULL, 447); + ZEPHIR_CALL_METHOD(&_3$$8, this_ptr, "_checkforeignkeysrestrict", NULL, 449); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&_3$$8)) { RETURN_MM_BOOL(0); @@ -7701,7 +7734,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", 4485); + zephir_is_iterable(¬Null, 0, "phalcon/Mvc/Model.zep", 4503); if (Z_TYPE_P(¬Null) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(¬Null), _4$$11) { @@ -7716,7 +7749,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSave) { ZEPHIR_CONCAT_SVS(&_7$$18, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_6$$18, "__construct", &_8, 5, &_7$$18); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$18, "phalcon/Mvc/Model.zep", 4410 TSRMLS_CC); + zephir_throw_exception_debug(&_6$$18, "phalcon/Mvc/Model.zep", 4428 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -7740,7 +7773,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSave) { if (_10$$26) { _11$$26 = !(zephir_array_isset(&defaultValues, &field)); if (!(_11$$26)) { - zephir_array_fetch(&_12$$26, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4439 TSRMLS_CC); + zephir_array_fetch(&_12$$26, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4457 TSRMLS_CC); _11$$26 = !ZEPHIR_IS_IDENTICAL(&value, &_12$$26); } _10$$26 = _11$$26; @@ -7802,7 +7835,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSave) { ZEPHIR_CONCAT_SVS(&_18$$37, "Column '", &field, "' isn't part of the column map"); ZEPHIR_CALL_METHOD(NULL, &_17$$37, "__construct", &_8, 5, &_18$$37); zephir_check_call_status(); - zephir_throw_exception_debug(&_17$$37, "phalcon/Mvc/Model.zep", 4410 TSRMLS_CC); + zephir_throw_exception_debug(&_17$$37, "phalcon/Mvc/Model.zep", 4428 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -7826,7 +7859,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSave) { if (_20$$45) { _21$$45 = !(zephir_array_isset(&defaultValues, &field)); if (!(_21$$45)) { - zephir_array_fetch(&_22$$45, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4439 TSRMLS_CC); + zephir_array_fetch(&_22$$45, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4457 TSRMLS_CC); _21$$45 = !ZEPHIR_IS_IDENTICAL(&value, &_22$$45); } _20$$45 = _21$$45; @@ -8024,7 +8057,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", 4662); + zephir_is_iterable(related, 0, "phalcon/Mvc/Model.zep", 4680); if (Z_TYPE_P(related) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(related), _4, _5, _2) { @@ -8051,7 +8084,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_10, 0, &_9$$6); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects can be stored as part of belongs-to relations", "phalcon/Mvc/Model.zep", 4605); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects can be stored as part of belongs-to relations", "phalcon/Mvc/Model.zep", 4623); return; } ZEPHIR_CALL_METHOD(&columns, &relation, "getfields", &_11, 0); @@ -8068,7 +8101,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_15, 0, &_14$$7); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4615); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4633); return; } zephir_read_property(&_16$$5, &record, SL("dirtyState"), PH_NOISY_CC | PH_READONLY); @@ -8081,7 +8114,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) { if (_17$$5) { ZEPHIR_CALL_METHOD(&_19$$8, &record, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_19$$8, 0, "phalcon/Mvc/Model.zep", 4648); + zephir_is_iterable(&_19$$8, 0, "phalcon/Mvc/Model.zep", 4666); if (Z_TYPE_P(&_19$$8) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_19$$8), _20$$8) { @@ -8165,7 +8198,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_31, 0, &_30$$16); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects can be stored as part of belongs-to relations", "phalcon/Mvc/Model.zep", 4605); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects can be stored as part of belongs-to relations", "phalcon/Mvc/Model.zep", 4623); return; } ZEPHIR_CALL_METHOD(&columns, &relation, "getfields", &_11, 0); @@ -8182,7 +8215,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_33, 0, &_32$$17); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4615); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4633); return; } zephir_read_property(&_34$$15, &record, SL("dirtyState"), PH_NOISY_CC | PH_READONLY); @@ -8195,7 +8228,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) { if (_35$$15) { ZEPHIR_CALL_METHOD(&_37$$18, &record, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_37$$18, 0, "phalcon/Mvc/Model.zep", 4648); + zephir_is_iterable(&_37$$18, 0, "phalcon/Mvc/Model.zep", 4666); if (Z_TYPE_P(&_37$$18) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_37$$18), _38$$18) { @@ -8422,7 +8455,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", 4892); + zephir_is_iterable(related, 0, "phalcon/Mvc/Model.zep", 4910); if (Z_TYPE_P(related) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(related), _3, _4, _1) { @@ -8455,7 +8488,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_11, 0, &_10$$6); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects/arrays can be stored as part of has-many/has-one/has-many-to-many relations", "phalcon/Mvc/Model.zep", 4722); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects/arrays can be stored as part of has-many/has-one/has-many-to-many relations", "phalcon/Mvc/Model.zep", 4740); return; } ZEPHIR_CALL_METHOD(&columns, &relation, "getfields", &_12, 0); @@ -8472,7 +8505,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_16, 0, &_15$$7); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4732); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4750); return; } if (Z_TYPE_P(&record) == IS_OBJECT) { @@ -8497,7 +8530,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { ZEPHIR_CONCAT_SVS(&_20$$10, "The column '", &columns, "' needs to be present in the model"); ZEPHIR_CALL_METHOD(NULL, &_19$$10, "__construct", &_21, 5, &_20$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_19$$10, "phalcon/Mvc/Model.zep", 4749 TSRMLS_CC); + zephir_throw_exception_debug(&_19$$10, "phalcon/Mvc/Model.zep", 4767 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -8512,7 +8545,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { ZEPHIR_CALL_METHOD(&intermediateReferencedFields, &relation, "getintermediatereferencedfields", &_26, 0); zephir_check_call_status(); } - zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 4878); + zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 4896); if (Z_TYPE_P(&relatedRecords) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relatedRecords), _27$$4) { @@ -8527,7 +8560,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_29$$12))) { ZEPHIR_CALL_METHOD(&_30$$14, &recordAfter, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_30$$14, 0, "phalcon/Mvc/Model.zep", 4808); + zephir_is_iterable(&_30$$14, 0, "phalcon/Mvc/Model.zep", 4826); if (Z_TYPE_P(&_30$$14) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_30$$14), _31$$14) { @@ -8591,7 +8624,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_39$$19))) { ZEPHIR_CALL_METHOD(&_40$$20, &intermediateModel, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_40$$20, 0, "phalcon/Mvc/Model.zep", 4872); + zephir_is_iterable(&_40$$20, 0, "phalcon/Mvc/Model.zep", 4890); if (Z_TYPE_P(&_40$$20) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_40$$20), _41$$20) { @@ -8663,7 +8696,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_47$$25))) { ZEPHIR_CALL_METHOD(&_48$$27, &recordAfter, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_48$$27, 0, "phalcon/Mvc/Model.zep", 4808); + zephir_is_iterable(&_48$$27, 0, "phalcon/Mvc/Model.zep", 4826); if (Z_TYPE_P(&_48$$27) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_48$$27), _49$$27) { @@ -8727,7 +8760,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_56$$32))) { ZEPHIR_CALL_METHOD(&_57$$33, &intermediateModel, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_57$$33, 0, "phalcon/Mvc/Model.zep", 4872); + zephir_is_iterable(&_57$$33, 0, "phalcon/Mvc/Model.zep", 4890); if (Z_TYPE_P(&_57$$33) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_57$$33), _58$$33) { @@ -8798,7 +8831,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { ZEPHIR_CONCAT_SVSVS(&_67$$39, "There are no defined relations for the model '", &className, "' using alias '", &name, "'"); ZEPHIR_CALL_METHOD(NULL, &_66$$39, "__construct", &_21, 5, &_67$$39); zephir_check_call_status(); - zephir_throw_exception_debug(&_66$$39, "phalcon/Mvc/Model.zep", 4884 TSRMLS_CC); + zephir_throw_exception_debug(&_66$$39, "phalcon/Mvc/Model.zep", 4902 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -8838,7 +8871,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_73, 0, &_72$$43); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects/arrays can be stored as part of has-many/has-one/has-many-to-many relations", "phalcon/Mvc/Model.zep", 4722); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Only objects/arrays can be stored as part of has-many/has-one/has-many-to-many relations", "phalcon/Mvc/Model.zep", 4740); return; } ZEPHIR_CALL_METHOD(&columns, &relation, "getfields", &_12, 0); @@ -8855,7 +8888,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { } ZEPHIR_CALL_METHOD(NULL, connection, "rollback", &_75, 0, &_74$$44); zephir_check_call_status(); - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4732); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Not implemented", "phalcon/Mvc/Model.zep", 4750); return; } if (Z_TYPE_P(&record) == IS_OBJECT) { @@ -8881,7 +8914,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { ZEPHIR_CONCAT_SVS(&_80$$47, "The column '", &columns, "' needs to be present in the model"); ZEPHIR_CALL_METHOD(NULL, &_79$$47, "__construct", &_21, 5, &_80$$47); zephir_check_call_status(); - zephir_throw_exception_debug(&_79$$47, "phalcon/Mvc/Model.zep", 4749 TSRMLS_CC); + zephir_throw_exception_debug(&_79$$47, "phalcon/Mvc/Model.zep", 4767 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -8896,7 +8929,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { ZEPHIR_CALL_METHOD(&intermediateReferencedFields, &relation, "getintermediatereferencedfields", &_26, 0); zephir_check_call_status(); } - zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 4878); + zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 4896); if (Z_TYPE_P(&relatedRecords) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relatedRecords), _82$$41) { @@ -8911,7 +8944,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_84$$49))) { ZEPHIR_CALL_METHOD(&_85$$51, &recordAfter, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_85$$51, 0, "phalcon/Mvc/Model.zep", 4808); + zephir_is_iterable(&_85$$51, 0, "phalcon/Mvc/Model.zep", 4826); if (Z_TYPE_P(&_85$$51) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_85$$51), _86$$51) { @@ -8975,7 +9008,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_93$$56))) { ZEPHIR_CALL_METHOD(&_94$$57, &intermediateModel, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_94$$57, 0, "phalcon/Mvc/Model.zep", 4872); + zephir_is_iterable(&_94$$57, 0, "phalcon/Mvc/Model.zep", 4890); if (Z_TYPE_P(&_94$$57) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_94$$57), _95$$57) { @@ -9047,7 +9080,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_101$$62))) { ZEPHIR_CALL_METHOD(&_102$$64, &recordAfter, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_102$$64, 0, "phalcon/Mvc/Model.zep", 4808); + zephir_is_iterable(&_102$$64, 0, "phalcon/Mvc/Model.zep", 4826); if (Z_TYPE_P(&_102$$64) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_102$$64), _103$$64) { @@ -9111,7 +9144,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { if (!(zephir_is_true(&_110$$69))) { ZEPHIR_CALL_METHOD(&_111$$70, &intermediateModel, "getmessages", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_111$$70, 0, "phalcon/Mvc/Model.zep", 4872); + zephir_is_iterable(&_111$$70, 0, "phalcon/Mvc/Model.zep", 4890); if (Z_TYPE_P(&_111$$70) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_111$$70), _112$$70) { @@ -9182,7 +9215,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) { ZEPHIR_CONCAT_SVSVS(&_121$$76, "There are no defined relations for the model '", &className, "' using alias '", &name, "'"); ZEPHIR_CALL_METHOD(NULL, &_120$$76, "__construct", &_21, 5, &_121$$76); zephir_check_call_status(); - zephir_throw_exception_debug(&_120$$76, "phalcon/Mvc/Model.zep", 4884 TSRMLS_CC); + zephir_throw_exception_debug(&_120$$76, "phalcon/Mvc/Model.zep", 4902 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -9245,7 +9278,7 @@ PHP_METHOD(Phalcon_Mvc_Model, allowEmptyStringValues) { ZEPHIR_INIT_VAR(&keysAttributes); array_init(&keysAttributes); - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 4925); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 4943); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _0) { @@ -9854,7 +9887,7 @@ PHP_METHOD(Phalcon_Mvc_Model, skipAttributesOnCreate) { ZEPHIR_INIT_VAR(&keysAttributes); array_init(&keysAttributes); - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5226); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5244); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _0) { @@ -9928,7 +9961,7 @@ PHP_METHOD(Phalcon_Mvc_Model, skipAttributesOnUpdate) { ZEPHIR_INIT_VAR(&keysAttributes); array_init(&keysAttributes); - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5261); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5279); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _0) { @@ -10163,7 +10196,7 @@ PHP_METHOD(Phalcon_Mvc_Model, caseInsensitiveColumnMap) { ZEPHIR_INIT_VAR(&_0); zephir_array_keys(&_0, columnMap TSRMLS_CC); - zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model.zep", 5397); + zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model.zep", 5415); if (Z_TYPE_P(&_0) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_0), _1) { diff --git a/ext/phalcon/mvc/model.zep.h b/ext/phalcon/mvc/model.zep.h index 6a01ed43235..901a3dd7a32 100644 --- a/ext/phalcon/mvc/model.zep.h +++ b/ext/phalcon/mvc/model.zep.h @@ -27,6 +27,7 @@ PHP_METHOD(Phalcon_Mvc_Model, fireEvent); PHP_METHOD(Phalcon_Mvc_Model, fireEventCancel); PHP_METHOD(Phalcon_Mvc_Model, getChangedFields); PHP_METHOD(Phalcon_Mvc_Model, getDirtyState); +PHP_METHOD(Phalcon_Mvc_Model, getDI); PHP_METHOD(Phalcon_Mvc_Model, getEventsManager); PHP_METHOD(Phalcon_Mvc_Model, getMessages); PHP_METHOD(Phalcon_Mvc_Model, getModelsManager); @@ -57,6 +58,7 @@ PHP_METHOD(Phalcon_Mvc_Model, serialize); PHP_METHOD(Phalcon_Mvc_Model, unserialize); PHP_METHOD(Phalcon_Mvc_Model, setConnectionService); PHP_METHOD(Phalcon_Mvc_Model, setDirtyState); +PHP_METHOD(Phalcon_Mvc_Model, setDI); PHP_METHOD(Phalcon_Mvc_Model, setEventsManager); PHP_METHOD(Phalcon_Mvc_Model, setReadConnectionService); PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData); @@ -308,6 +310,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_getdirtystate, #endif ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) +#endif +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_geteventsmanager, 0, 0, Phalcon\\Events\\ManagerInterface, 0) #else @@ -537,6 +546,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_setdirtystate, 0, 0, 1) #endif ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_setdi, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_seteventsmanager, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, eventsManager, Phalcon\\Events\\ManagerInterface, 0) ZEND_END_ARG_INFO() @@ -962,6 +975,7 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_model_method_entry) { PHP_ME(Phalcon_Mvc_Model, fireEventCancel, arginfo_phalcon_mvc_model_fireeventcancel, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model, getChangedFields, arginfo_phalcon_mvc_model_getchangedfields, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model, getDirtyState, arginfo_phalcon_mvc_model_getdirtystate, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Mvc_Model, getDI, arginfo_phalcon_mvc_model_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model, getEventsManager, arginfo_phalcon_mvc_model_geteventsmanager, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model, getMessages, arginfo_phalcon_mvc_model_getmessages, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model, getModelsManager, arginfo_phalcon_mvc_model_getmodelsmanager, ZEND_ACC_PUBLIC) @@ -992,6 +1006,7 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_model_method_entry) { 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) PHP_ME(Phalcon_Mvc_Model, setDirtyState, arginfo_phalcon_mvc_model_setdirtystate, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Mvc_Model, setDI, arginfo_phalcon_mvc_model_setdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model, setEventsManager, arginfo_phalcon_mvc_model_seteventsmanager, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model, setReadConnectionService, arginfo_phalcon_mvc_model_setreadconnectionservice, ZEND_ACC_FINAL|ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model, setOldSnapshotData, arginfo_phalcon_mvc_model_setoldsnapshotdata, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/model/behavior/timestampable.zep.c b/ext/phalcon/mvc/model/behavior/timestampable.zep.c index 7f4d7c9d90a..00938f852f8 100644 --- a/ext/phalcon/mvc/model/behavior/timestampable.zep.c +++ b/ext/phalcon/mvc/model/behavior/timestampable.zep.c @@ -96,7 +96,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, 448, &options); + ZEPHIR_CALL_METHOD(×tamp, this_ptr, "gettimestamp", NULL, 450, &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); @@ -155,7 +155,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, 422, &format); + ZEPHIR_RETURN_CALL_FUNCTION("date", NULL, 420, &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 9991583e63f..128d4ddcf3f 100644 --- a/ext/phalcon/mvc/model/binder.zep.c +++ b/ext/phalcon/mvc/model/binder.zep.c @@ -396,7 +396,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) { ZEPHIR_INIT_VAR(&reflection); if (!ZEPHIR_IS_STRING(&methodName, "")) { object_init_ex(&reflection, zephir_get_internal_ce(SL("reflectionmethod"))); - ZEPHIR_CALL_METHOD(NULL, &reflection, "__construct", NULL, 449, handler, &methodName); + ZEPHIR_CALL_METHOD(NULL, &reflection, "__construct", NULL, 451, handler, &methodName); zephir_check_call_status(); } else { object_init_ex(&reflection, zephir_get_internal_ce(SL("reflectionfunction"))); @@ -438,7 +438,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) { zephir_array_fetch(¶mValue, ¶ms, ¶mKey, PH_NOISY, "phalcon/Mvc/Model/Binder.zep", 171 TSRMLS_CC); ZEPHIR_INIT_NVAR(&_6$$5); ZVAL_STRING(&_6$$5, "Phalcon\\Mvc\\Model"); - ZEPHIR_CALL_FUNCTION(&_7$$5, "is_subclass_of", &_8, 450, &className, &_6$$5); + ZEPHIR_CALL_FUNCTION(&_7$$5, "is_subclass_of", &_8, 452, &className, &_6$$5); zephir_check_call_status(); if (ZEPHIR_IS_STRING(&className, "Phalcon\\Mvc\\Model")) { if (Z_TYPE_P(&realClasses) == IS_NULL) { @@ -520,7 +520,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) { zephir_array_fetch(¶mValue, ¶ms, ¶mKey, PH_NOISY, "phalcon/Mvc/Model/Binder.zep", 171 TSRMLS_CC); ZEPHIR_INIT_NVAR(&_15$$19); ZVAL_STRING(&_15$$19, "Phalcon\\Mvc\\Model"); - ZEPHIR_CALL_FUNCTION(&_16$$19, "is_subclass_of", &_8, 450, &className, &_15$$19); + ZEPHIR_CALL_FUNCTION(&_16$$19, "is_subclass_of", &_8, 452, &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 3760284cde3..8552a791694 100644 --- a/ext/phalcon/mvc/model/criteria.zep.c +++ b/ext/phalcon/mvc/model/criteria.zep.c @@ -1776,12 +1776,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, fromInput) { ZEPHIR_INIT_VAR(&_19$$16); ZEPHIR_CONCAT_SVS(&_19$$16, " ", &operator, " "); zephir_fast_join(&_18$$16, &_19$$16, &conditions TSRMLS_CC); - ZEPHIR_CALL_METHOD(NULL, &criteria, "where", NULL, 451, &_18$$16); + ZEPHIR_CALL_METHOD(NULL, &criteria, "where", NULL, 453, &_18$$16); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &criteria, "bind", NULL, 452, &bind); + ZEPHIR_CALL_METHOD(NULL, &criteria, "bind", NULL, 454, &bind); zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(NULL, &criteria, "setmodelname", NULL, 445, &modelName); + ZEPHIR_CALL_METHOD(NULL, &criteria, "setmodelname", NULL, 447, &modelName); zephir_check_call_status(); RETURN_CCTOR(&criteria); diff --git a/ext/phalcon/mvc/model/manager.zep.c b/ext/phalcon/mvc/model/manager.zep.c index c6ab8764fa9..aa6db53daef 100644 --- a/ext/phalcon/mvc/model/manager.zep.c +++ b/ext/phalcon/mvc/model/manager.zep.c @@ -1413,7 +1413,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, 453, &_2, &referencedModel, fields, referencedFields, options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 455, &_2, &referencedModel, fields, referencedFields, options); zephir_check_call_status(); ZEPHIR_OBS_VAR(&alias); if (zephir_array_isset_string_fetch(&alias, options, SL("alias"), 0)) { @@ -1516,7 +1516,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, 453, &_2, &referencedModel, fields, referencedFields, options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 455, &_2, &referencedModel, fields, referencedFields, options); zephir_check_call_status(); ZEPHIR_OBS_VAR(&alias); if (zephir_array_isset_string_fetch(&alias, options, SL("alias"), 0)) { @@ -1621,7 +1621,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, 453, &_1, &referencedModel, fields, referencedFields, options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 455, &_1, &referencedModel, fields, referencedFields, options); zephir_check_call_status(); ZEPHIR_OBS_VAR(&alias); if (zephir_array_isset_string_fetch(&alias, options, SL("alias"), 0)) { @@ -1751,9 +1751,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, 453, &_1, &referencedModel, fields, referencedFields, options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 455, &_1, &referencedModel, fields, referencedFields, options); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &relation, "setintermediaterelation", NULL, 454, intermediateFields, &intermediateModel, intermediateReferencedFields); + ZEPHIR_CALL_METHOD(NULL, &relation, "setintermediaterelation", NULL, 456, intermediateFields, &intermediateModel, intermediateReferencedFields); zephir_check_call_status(); ZEPHIR_OBS_VAR(&alias); if (zephir_array_isset_string_fetch(&alias, options, SL("alias"), 0)) { @@ -2435,7 +2435,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", 1299); - ZEPHIR_CALL_METHOD(&_5$$3, this_ptr, "_mergefindparameters", NULL, 455, &extraParameters, parameters); + ZEPHIR_CALL_METHOD(&_5$$3, this_ptr, "_mergefindparameters", NULL, 457, &extraParameters, parameters); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&builder, this_ptr, "createbuilder", NULL, 0, &_5$$3); zephir_check_call_status(); @@ -2548,10 +2548,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationRecords) { ZEPHIR_CALL_METHOD(&_30, record, "getdi", NULL, 0); zephir_check_call_status(); zephir_array_update_string(&findParams, SL("di"), &_30, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&findArguments, this_ptr, "_mergefindparameters", NULL, 455, &findParams, parameters); + ZEPHIR_CALL_METHOD(&findArguments, this_ptr, "_mergefindparameters", NULL, 457, &findParams, parameters); zephir_check_call_status(); if (Z_TYPE_P(&extraParameters) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(&findParams, this_ptr, "_mergefindparameters", NULL, 455, &extraParameters, &findArguments); + ZEPHIR_CALL_METHOD(&findParams, this_ptr, "_mergefindparameters", NULL, 457, &extraParameters, &findArguments); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&findParams, &findArguments); diff --git a/ext/phalcon/mvc/model/metadata/stream.zep.c b/ext/phalcon/mvc/model/metadata/stream.zep.c index 80307773a3b..3e5cbac5570 100644 --- a/ext/phalcon/mvc/model/metadata/stream.zep.c +++ b/ext/phalcon/mvc/model/metadata/stream.zep.c @@ -195,7 +195,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Stream, write) { ZEPHIR_CONCAT_SVS(&_5$$3, "= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_router_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_router_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) +#endif +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_router_geteventsmanager, 0, 0, Phalcon\\Events\\ManagerInterface, 0) #else @@ -408,6 +417,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_router_getdefaults, #endif ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_router_setdi, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_router_seteventsmanager, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, eventsManager, Phalcon\\Events\\ManagerInterface, 0) ZEND_END_ARG_INFO() @@ -438,6 +451,7 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_router_method_entry) { PHP_ME(Phalcon_Mvc_Router, addTrace, arginfo_phalcon_mvc_router_addtrace, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router, attach, arginfo_phalcon_mvc_router_attach, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router, clear, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Mvc_Router, getDI, arginfo_phalcon_mvc_router_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router, getEventsManager, arginfo_phalcon_mvc_router_geteventsmanager, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router, getActionName, arginfo_phalcon_mvc_router_getactionname, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router, getControllerName, arginfo_phalcon_mvc_router_getcontrollername, ZEND_ACC_PUBLIC) @@ -460,6 +474,7 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_router_method_entry) { PHP_ME(Phalcon_Mvc_Router, setDefaultNamespace, arginfo_phalcon_mvc_router_setdefaultnamespace, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router, setDefaults, arginfo_phalcon_mvc_router_setdefaults, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router, getDefaults, arginfo_phalcon_mvc_router_getdefaults, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Mvc_Router, setDI, arginfo_phalcon_mvc_router_setdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router, setEventsManager, arginfo_phalcon_mvc_router_seteventsmanager, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router, wasMatched, arginfo_phalcon_mvc_router_wasmatched, ZEND_ACC_PUBLIC) PHP_FE_END diff --git a/ext/phalcon/mvc/router/group.zep.c b/ext/phalcon/mvc/router/group.zep.c index 283821c101f..ae98c1f75c5 100644 --- a/ext/phalcon/mvc/router/group.zep.c +++ b/ext/phalcon/mvc/router/group.zep.c @@ -872,7 +872,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addRoute) { ZEPHIR_CALL_METHOD(NULL, &route, "__construct", NULL, 105, &_2, &mergedPaths, httpMethods); zephir_check_call_status(); zephir_update_property_array_append(this_ptr, SL("routes"), &route); - ZEPHIR_CALL_METHOD(NULL, &route, "setgroup", NULL, 496, this_ptr); + ZEPHIR_CALL_METHOD(NULL, &route, "setgroup", NULL, 498, this_ptr); zephir_check_call_status(); RETURN_CCTOR(&route); diff --git a/ext/phalcon/mvc/view.zep.c b/ext/phalcon/mvc/view.zep.c index c63df9f3e9b..2e4856c8702 100644 --- a/ext/phalcon/mvc/view.zep.c +++ b/ext/phalcon/mvc/view.zep.c @@ -801,11 +801,11 @@ PHP_METHOD(Phalcon_Mvc_View, getPartial) { } - ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 393); + ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 391); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "partial", NULL, 0, &partialPath, params); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_FUNCTION("ob_get_clean", NULL, 400); + ZEPHIR_RETURN_CALL_FUNCTION("ob_get_clean", NULL, 398); zephir_check_call_status(); RETURN_MM(); @@ -1777,7 +1777,7 @@ PHP_METHOD(Phalcon_Mvc_View, start) { ZEPHIR_MM_GROW(); - ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 393); + ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 391); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("content"), &__$null); RETURN_THIS(); @@ -1937,7 +1937,7 @@ PHP_METHOD(Phalcon_Mvc_View, engineRender) { { ZEPHIR_INIT_NVAR(&viewsDir); ZVAL_COPY(&viewsDir, _2); - ZEPHIR_CALL_METHOD(&_4$$3, this_ptr, "isabsolutepath", &_5, 497, &viewPath); + ZEPHIR_CALL_METHOD(&_4$$3, this_ptr, "isabsolutepath", &_5, 499, &viewPath); zephir_check_call_status(); if (!(zephir_is_true(&_4$$3))) { ZEPHIR_INIT_NVAR(&viewsDirPath); @@ -2055,7 +2055,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, 497, &viewPath); + ZEPHIR_CALL_METHOD(&_24$$16, this_ptr, "isabsolutepath", &_5, 499, &viewPath); zephir_check_call_status(); if (!(zephir_is_true(&_24$$16))) { ZEPHIR_INIT_NVAR(&viewsDirPath); @@ -2288,7 +2288,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, 498, this_ptr, &di); + ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 500, this_ptr, &di); zephir_check_call_status(); zephir_array_update_string(&engines, SL(".phtml"), &_2$$4, PH_COPY | PH_SEPARATE); } else { @@ -2505,7 +2505,7 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) { zephir_update_property_zval(this_ptr, SL("currentRenderLevel"), &_0); zephir_read_property(&_0, this_ptr, SL("disabled"), PH_NOISY_CC | PH_READONLY); if (!ZEPHIR_IS_FALSE_IDENTICAL(&_0)) { - ZEPHIR_CALL_FUNCTION(&_1$$3, "ob_get_contents", NULL, 499); + ZEPHIR_CALL_FUNCTION(&_1$$3, "ob_get_contents", NULL, 501); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("content"), &_1$$3); RETURN_MM_BOOL(0); @@ -2563,7 +2563,7 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) { RETURN_MM_BOOL(0); } } - ZEPHIR_CALL_FUNCTION(&_8, "ob_get_contents", NULL, 499); + ZEPHIR_CALL_FUNCTION(&_8, "ob_get_contents", NULL, 501); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("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 76970a13f12..ae3814f034a 100644 --- a/ext/phalcon/mvc/view/engine/php.zep.c +++ b/ext/phalcon/mvc/view/engine/php.zep.c @@ -85,7 +85,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Php, render) { if (mustClean) { - ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 500); + ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 502); zephir_check_call_status(); } if (Z_TYPE_P(params) == IS_ARRAY) { @@ -135,7 +135,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Php, render) { } if (mustClean) { zephir_read_property(&_6$$7, this_ptr, SL("view"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_7$$7, "ob_get_contents", NULL, 499); + ZEPHIR_CALL_FUNCTION(&_7$$7, "ob_get_contents", NULL, 501); 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 c9f12bdfd14..746a15df842 100644 --- a/ext/phalcon/mvc/view/engine/volt.zep.c +++ b/ext/phalcon/mvc/view/engine/volt.zep.c @@ -155,7 +155,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, convertEncoding) { _0 = ZEPHIR_IS_STRING(&to, "utf8"); } if (_0) { - ZEPHIR_RETURN_CALL_FUNCTION("utf8_encode", NULL, 501, &text); + ZEPHIR_RETURN_CALL_FUNCTION("utf8_encode", NULL, 503, &text); zephir_check_call_status(); RETURN_MM(); } @@ -208,18 +208,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, SL("view"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &compiler, "__construct", NULL, 502, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &compiler, "__construct", NULL, 504, &_1$$3); zephir_check_call_status(); zephir_read_property(&_2$$3, this_ptr, SL("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, 503, &container); + ZEPHIR_CALL_METHOD(NULL, &compiler, "setdi", NULL, 505, &container); zephir_check_call_status(); } zephir_read_property(&_2$$3, this_ptr, SL("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, 504, &options); + ZEPHIR_CALL_METHOD(NULL, &compiler, "setoptions", NULL, 506, &options); zephir_check_call_status(); } zephir_update_property_zval(this_ptr, SL("compiler"), &compiler); @@ -365,7 +365,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, render) { if (mustClean) { - ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 500); + ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 502); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(&compiler, this_ptr, "getcompiler", NULL, 0); @@ -441,7 +441,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, render) { } if (mustClean) { zephir_read_property(&_11$$11, this_ptr, SL("view"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_12$$11, "ob_get_contents", NULL, 499); + ZEPHIR_CALL_FUNCTION(&_12$$11, "ob_get_contents", NULL, 501); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_11$$11, "setcontent", NULL, 0, &_12$$11); zephir_check_call_status(); @@ -601,7 +601,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, sort) { ZEPHIR_MAKE_REF(&value); - ZEPHIR_CALL_FUNCTION(NULL, "asort", NULL, 505, &value); + ZEPHIR_CALL_FUNCTION(NULL, "asort", NULL, 507, &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 c19ca394af9..6329d813517 100644 --- a/ext/phalcon/mvc/view/engine/volt/compiler.zep.c +++ b/ext/phalcon/mvc/view/engine/volt/compiler.zep.c @@ -293,7 +293,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, attributeReader) { } } } else { - ZEPHIR_CALL_METHOD(&leftCode, this_ptr, "expression", NULL, 506, &left); + ZEPHIR_CALL_METHOD(&leftCode, this_ptr, "expression", NULL, 508, &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", 137 TSRMLS_CC); @@ -315,7 +315,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", 151 TSRMLS_CC); zephir_concat_self(&exprCode, &_11$$11 TSRMLS_CC); } else { - ZEPHIR_CALL_METHOD(&_12$$12, this_ptr, "expression", NULL, 506, &right); + ZEPHIR_CALL_METHOD(&_12$$12, this_ptr, "expression", NULL, 508, &right); zephir_check_call_status(); zephir_concat_self(&exprCode, &_12$$12 TSRMLS_CC); } @@ -575,7 +575,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, 507, &_18$$35); + ZEPHIR_CALL_METHOD(NULL, &_17$$35, "__construct", NULL, 509, &_18$$35); zephir_check_call_status(); zephir_throw_exception_debug(&_17$$35, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 366 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -637,7 +637,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileAutoEscape) { } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_CALL_METHOD(&compilation, this_ptr, "statementlist", NULL, 508, &_0, &_1); + ZEPHIR_CALL_METHOD(&compilation, this_ptr, "statementlist", NULL, 510, &_0, &_1); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("autoescape"), &oldAutoescape); RETURN_CCTOR(&compilation); @@ -702,15 +702,15 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileCache) { 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, 507, &_1$$3, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 509, &_1$$3, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 429 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 506, &expr); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 508, &expr); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 506, &expr); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 508, &expr); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_3); ZEPHIR_CONCAT_SVS(&_3, "di->get('viewCache'); "); @@ -746,7 +746,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileCache) { } else { ZVAL_BOOL(&_14, 0); } - ZEPHIR_CALL_METHOD(&_12, this_ptr, "statementlist", NULL, 508, &_13, &_14); + ZEPHIR_CALL_METHOD(&_12, this_ptr, "statementlist", NULL, 510, &_13, &_14); zephir_check_call_status(); zephir_concat_self(&compilation, &_12 TSRMLS_CC); ZEPHIR_OBS_NVAR(&lifetime); @@ -836,13 +836,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, 507, &_1$$4, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 509, &_1$$4, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$4, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 505 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 506, &expr); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 508, &expr); zephir_check_call_status(); ZEPHIR_CONCAT_SVS(return_value, ""); RETURN_MM(); @@ -875,7 +875,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", 525); return; } - ZEPHIR_CALL_METHOD(&_0, this_ptr, "expression", NULL, 506, &expr); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "expression", NULL, 508, &expr); zephir_check_call_status(); ZEPHIR_CONCAT_SVS(return_value, ""); RETURN_MM(); @@ -916,13 +916,13 @@ 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, 507, &_1$$3, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 509, &_1$$3, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 545 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 506, &expr); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 508, &expr); zephir_check_call_status(); zephir_array_fetch_string(&_2, &expr, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 553 TSRMLS_CC); if (ZEPHIR_IS_LONG(&_2, 350)) { @@ -974,13 +974,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, 507, &_1$$3, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 509, &_1$$3, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 588 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 506, &expr); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 508, &expr); zephir_check_call_status(); ZEPHIR_CONCAT_SVS(return_value, ""); RETURN_MM(); @@ -1059,7 +1059,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, 507, &_1$$4); + ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 509, &_1$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$4, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 623 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -1072,7 +1072,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, 507, &_3$$5); + ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 509, &_3$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_2$$5, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 635 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -1186,7 +1186,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", 696 TSRMLS_CC); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 506, &expr); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 508, &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", 703 TSRMLS_CC); @@ -1246,7 +1246,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileForeach) { } else { ZVAL_BOOL(&_4, 0); } - ZEPHIR_CALL_METHOD(&code, this_ptr, "statementlist", NULL, 508, &blockStatements, &_4); + ZEPHIR_CALL_METHOD(&code, this_ptr, "statementlist", NULL, 510, &blockStatements, &_4); zephir_check_call_status(); ZEPHIR_OBS_VAR(&loopContext); zephir_read_property(&loopContext, this_ptr, SL("loopPointers"), PH_NOISY_CC); @@ -1297,7 +1297,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, 506, &ifExpr); + ZEPHIR_CALL_METHOD(&_16$$15, this_ptr, "expression", NULL, 508, &ifExpr); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_17$$15); ZEPHIR_CONCAT_SVS(&_17$$15, "if (", &_16$$15, ") { ?>"); @@ -1424,13 +1424,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, 507, &_1$$3, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 509, &_1$$3, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 850 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 506, &expr); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 508, &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", 856 TSRMLS_CC); if (extendsMode) { @@ -1438,7 +1438,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileIf) { } else { ZVAL_BOOL(&_5, 0); } - ZEPHIR_CALL_METHOD(&_3, this_ptr, "statementlist", NULL, 508, &_4, &_5); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "statementlist", NULL, 510, &_4, &_5); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_6); ZEPHIR_CONCAT_SVSV(&_6, "", &_3); @@ -1450,7 +1450,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, 508, &blockStatements, &_8$$4); + ZEPHIR_CALL_METHOD(&_7$$4, this_ptr, "statementlist", NULL, 510, &blockStatements, &_8$$4); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_9$$4); ZEPHIR_CONCAT_SV(&_9$$4, "", &_7$$4); @@ -1518,14 +1518,14 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileInclude) { RETURN_CCTOR(&compilation); } } - ZEPHIR_CALL_METHOD(&path, this_ptr, "expression", NULL, 506, &pathExpr); + ZEPHIR_CALL_METHOD(&path, this_ptr, "expression", NULL, 508, &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, 506, ¶ms); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "expression", NULL, 508, ¶ms); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "partial(", &path, ", ", &_3, "); ?>"); RETURN_MM(); @@ -1602,7 +1602,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, 507, &_2$$4); + ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 509, &_2$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 962 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -1653,7 +1653,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileMacro) { zephir_concat_self_str(&code, " } else { ", sizeof(" } else { ")-1 TSRMLS_CC); 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, 506, &defaultValue); + ZEPHIR_CALL_METHOD(&_14$$8, this_ptr, "expression", &_15, 508, &defaultValue); zephir_check_call_status(); ZEPHIR_INIT_LNVAR(_16$$8); ZEPHIR_CONCAT_SVSVS(&_16$$8, "$", &variableName, " = ", &_14$$8, ";"); @@ -1696,7 +1696,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileMacro) { zephir_concat_self_str(&code, " } else { ", sizeof(" } else { ")-1 TSRMLS_CC); 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, 506, &defaultValue); + ZEPHIR_CALL_METHOD(&_22$$11, this_ptr, "expression", &_15, 508, &defaultValue); zephir_check_call_status(); ZEPHIR_INIT_LNVAR(_23$$11); ZEPHIR_CONCAT_SVSVS(&_23$$11, "$", &variableName, " = ", &_22$$11, ";"); @@ -1722,7 +1722,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, 508, &blockStatements, &_26$$13); + ZEPHIR_CALL_METHOD(&_25$$13, this_ptr, "statementlist", NULL, 510, &blockStatements, &_26$$13); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_27$$13); ZEPHIR_CONCAT_VS(&_27$$13, &_25$$13, ""); RETURN_MM(); @@ -1827,10 +1827,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", 1067 TSRMLS_CC); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", &_3, 506, &_2$$4); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", &_3, 508, &_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", 1074 TSRMLS_CC); - ZEPHIR_CALL_METHOD(&target, this_ptr, "expression", &_3, 506, &_4$$4); + ZEPHIR_CALL_METHOD(&target, this_ptr, "expression", &_3, 508, &_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", 1080 TSRMLS_CC); do { @@ -1877,10 +1877,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", 1067 TSRMLS_CC); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", &_3, 506, &_11$$10); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", &_3, 508, &_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", 1074 TSRMLS_CC); - ZEPHIR_CALL_METHOD(&target, this_ptr, "expression", &_3, 506, &_12$$10); + ZEPHIR_CALL_METHOD(&target, this_ptr, "expression", &_3, 508, &_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", 1080 TSRMLS_CC); do { @@ -2021,13 +2021,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, 507, &_1$$3, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 509, &_1$$3, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1135 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 506, &expr); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 508, &expr); zephir_check_call_status(); ZEPHIR_INIT_VAR(&compilation); ZEPHIR_CONCAT_SVS(&compilation, ""); @@ -2038,7 +2038,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSwitch) { } else { ZVAL_BOOL(&_3$$4, 0); } - ZEPHIR_CALL_METHOD(&lines, this_ptr, "statementlist", NULL, 508, &caseClauses, &_3$$4); + ZEPHIR_CALL_METHOD(&lines, this_ptr, "statementlist", NULL, 510, &caseClauses, &_3$$4); zephir_check_call_status(); if (zephir_fast_strlen_ev(&lines) != 0) { ZEPHIR_INIT_VAR(&_4$$5); @@ -2124,7 +2124,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, 509, &_2$$4, &_1$$4); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "fireextensionevent", &_3, 511, &_2$$4, &_1$$4); zephir_check_call_status(); if (Z_TYPE_P(&exprCode) == IS_STRING) { break; @@ -2141,7 +2141,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) { ZEPHIR_INIT_NVAR(&singleExpr); ZVAL_COPY(&singleExpr, _4$$6); zephir_array_fetch_string(&_6$$7, &singleExpr, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1219 TSRMLS_CC); - ZEPHIR_CALL_METHOD(&singleExprCode, this_ptr, "expression", &_7, 506, &_6$$7); + ZEPHIR_CALL_METHOD(&singleExprCode, this_ptr, "expression", &_7, 508, &_6$$7); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&name); if (zephir_array_isset_string_fetch(&name, &singleExpr, SL("name"), 0)) { @@ -2164,7 +2164,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) { ZEPHIR_CALL_METHOD(&singleExpr, &expr, "current", NULL, 0); zephir_check_call_status(); zephir_array_fetch_string(&_9$$10, &singleExpr, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1219 TSRMLS_CC); - ZEPHIR_CALL_METHOD(&singleExprCode, this_ptr, "expression", &_7, 506, &_9$$10); + ZEPHIR_CALL_METHOD(&singleExprCode, this_ptr, "expression", &_7, 508, &_9$$10); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&name); if (zephir_array_isset_string_fetch(&name, &singleExpr, SL("name"), 0)) { @@ -2190,7 +2190,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) { } ZEPHIR_OBS_NVAR(&left); if (zephir_array_isset_string_fetch(&left, &expr, SL("left"), 0)) { - ZEPHIR_CALL_METHOD(&leftCode, this_ptr, "expression", &_7, 506, &left); + ZEPHIR_CALL_METHOD(&leftCode, this_ptr, "expression", &_7, 508, &left); zephir_check_call_status(); } if (ZEPHIR_IS_LONG(&type, 311)) { @@ -2201,13 +2201,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) { } if (ZEPHIR_IS_LONG(&type, 124)) { zephir_array_fetch_string(&_14$$16, &expr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1266 TSRMLS_CC); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "resolvefilter", &_15, 510, &_14$$16, &leftCode); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "resolvefilter", &_15, 0, &_14$$16, &leftCode); zephir_check_call_status(); break; } ZEPHIR_OBS_NVAR(&right); if (zephir_array_isset_string_fetch(&right, &expr, SL("right"), 0)) { - ZEPHIR_CALL_METHOD(&rightCode, this_ptr, "expression", &_7, 506, &right); + ZEPHIR_CALL_METHOD(&rightCode, this_ptr, "expression", &_7, 508, &right); zephir_check_call_status(); } ZEPHIR_INIT_NVAR(&exprCode); @@ -2383,7 +2383,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) { if (ZEPHIR_IS_LONG(&type, 365)) { ZEPHIR_OBS_NVAR(&start); if (zephir_array_isset_string_fetch(&start, &expr, SL("start"), 0)) { - ZEPHIR_CALL_METHOD(&startCode, this_ptr, "expression", &_7, 506, &start); + ZEPHIR_CALL_METHOD(&startCode, this_ptr, "expression", &_7, 508, &start); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&startCode); @@ -2391,7 +2391,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) { } ZEPHIR_OBS_NVAR(&end); if (zephir_array_isset_string_fetch(&end, &expr, SL("end"), 0)) { - ZEPHIR_CALL_METHOD(&endCode, this_ptr, "expression", &_7, 506, &end); + ZEPHIR_CALL_METHOD(&endCode, this_ptr, "expression", &_7, 508, &end); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&endCode); @@ -2483,7 +2483,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) { } if (ZEPHIR_IS_LONG(&type, 366)) { zephir_array_fetch_string(&_23$$72, &expr, SL("ternary"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1500 TSRMLS_CC); - ZEPHIR_CALL_METHOD(&_22$$72, this_ptr, "expression", &_7, 506, &_23$$72); + ZEPHIR_CALL_METHOD(&_22$$72, this_ptr, "expression", &_7, 508, &_23$$72); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&exprCode); ZEPHIR_CONCAT_SVSVSVS(&exprCode, "(", &_22$$72, " ? ", &leftCode, " : ", &rightCode, ")"); @@ -2510,7 +2510,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) { zephir_array_fetch_string(&_26$$76, &expr, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1518 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_27$$76); ZEPHIR_CONCAT_SVSVSV(&_27$$76, "Unknown expression ", &type, " in ", &_25$$76, " on line ", &_26$$76); - ZEPHIR_CALL_METHOD(NULL, &_24$$76, "__construct", &_28, 507, &_27$$76); + ZEPHIR_CALL_METHOD(NULL, &_24$$76, "__construct", &_28, 509, &_27$$76); zephir_check_call_status(); zephir_throw_exception_debug(&_24$$76, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1518 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -2703,7 +2703,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) { ZVAL_NULL(&funcArguments); ZEPHIR_OBS_NVAR(&funcArguments); if (zephir_array_isset_string_fetch(&funcArguments, &expr, SL("arguments"), 0)) { - ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 506, &funcArguments); + ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 508, &funcArguments); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&arguments); @@ -2726,7 +2726,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) { zephir_array_fast_append(&_1$$6, &funcArguments); ZEPHIR_INIT_VAR(&_2$$6); ZVAL_STRING(&_2$$6, "compileFunction"); - ZEPHIR_CALL_METHOD(&code, this_ptr, "fireextensionevent", NULL, 509, &_2$$6, &_1$$6); + ZEPHIR_CALL_METHOD(&code, this_ptr, "fireextensionevent", NULL, 511, &_2$$6, &_1$$6); zephir_check_call_status(); if (Z_TYPE_P(&code) == IS_STRING) { RETURN_CCTOR(&code); @@ -2758,7 +2758,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) { zephir_array_fetch_string(&_6$$9, &expr, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1645 TSRMLS_CC); ZEPHIR_INIT_VAR(&_7$$9); ZEPHIR_CONCAT_SVSVSV(&_7$$9, "Invalid definition for user function '", &name, "' in ", &_5$$9, " on line ", &_6$$9); - ZEPHIR_CALL_METHOD(NULL, &_4$$9, "__construct", NULL, 507, &_7$$9); + ZEPHIR_CALL_METHOD(NULL, &_4$$9, "__construct", NULL, 509, &_7$$9); zephir_check_call_status(); zephir_throw_exception_debug(&_4$$9, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1645 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -2787,7 +2787,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) { zephir_read_property(&_11$$17, this_ptr, SL("exprLevel"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&exprLevel, &_11$$17); if (Z_TYPE_P(&block) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(&code, this_ptr, "statementlistorextends", NULL, 511, &block); + ZEPHIR_CALL_METHOD(&code, this_ptr, "statementlistorextends", NULL, 0, &block); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&exprLevel, 1)) { ZEPHIR_CPY_WRT(&escapedCode, &code); @@ -2876,7 +2876,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) { ZEPHIR_CONCAT_SVSVS(return_value, "$this->callMacro('", &name, "', [", &arguments, "])"); RETURN_MM(); } - ZEPHIR_CALL_METHOD(&_14, this_ptr, "expression", NULL, 506, &nameExpr); + ZEPHIR_CALL_METHOD(&_14, this_ptr, "expression", NULL, 508, &nameExpr); zephir_check_call_status(); ZEPHIR_CONCAT_VSVS(return_value, &_14, "(", &arguments, ")"); RETURN_MM(); @@ -3177,28 +3177,28 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveTest) { if (zephir_array_isset_string_fetch(&name, &testName, SL("value"), 0)) { 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", 2036 TSRMLS_CC); - ZEPHIR_CALL_METHOD(&_0$$12, this_ptr, "expression", NULL, 506, &_1$$12); + ZEPHIR_CALL_METHOD(&_0$$12, this_ptr, "expression", NULL, 508, &_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", 2043 TSRMLS_CC); - ZEPHIR_CALL_METHOD(&_2$$13, this_ptr, "expression", NULL, 506, &_3$$13); + ZEPHIR_CALL_METHOD(&_2$$13, this_ptr, "expression", NULL, 508, &_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", 2050 TSRMLS_CC); - ZEPHIR_CALL_METHOD(&_4$$14, this_ptr, "expression", NULL, 506, &_5$$14); + ZEPHIR_CALL_METHOD(&_4$$14, this_ptr, "expression", NULL, 508, &_5$$14); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "gettype(", &left, ") === (", &_4$$14, ")"); RETURN_MM(); } } } - ZEPHIR_CALL_METHOD(&_6, this_ptr, "expression", NULL, 506, &test); + ZEPHIR_CALL_METHOD(&_6, this_ptr, "expression", NULL, 508, &test); zephir_check_call_status(); ZEPHIR_CONCAT_VSV(return_value, &left, " == ", &_6); RETURN_MM(); @@ -3392,7 +3392,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSource) { } else { ZVAL_BOOL(&_0, 0); } - ZEPHIR_CALL_METHOD(&compilation, this_ptr, "statementlist", NULL, 508, &intermediate, &_0); + ZEPHIR_CALL_METHOD(&compilation, this_ptr, "statementlist", NULL, 510, &intermediate, &_0); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, SL("extended"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&extended, &_1); @@ -3424,11 +3424,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSource) { ZEPHIR_OBS_NVAR(&localBlock); zephir_array_fetch(&localBlock, &blocks, &name, PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2165 TSRMLS_CC); zephir_update_property_zval(this_ptr, SL("currentBlock"), &name); - ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 508, &localBlock); + ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 510, &localBlock); zephir_check_call_status(); } else { if (Z_TYPE_P(&block) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 508, &block); + ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 510, &block); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&blockCompilation, &block); @@ -3465,11 +3465,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSource) { ZEPHIR_OBS_NVAR(&localBlock); zephir_array_fetch(&localBlock, &blocks, &name, PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2165 TSRMLS_CC); zephir_update_property_zval(this_ptr, SL("currentBlock"), &name); - ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 508, &localBlock); + ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 510, &localBlock); zephir_check_call_status(); } else { if (Z_TYPE_P(&block) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 508, &block); + ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 510, &block); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&blockCompilation, &block); @@ -3647,7 +3647,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", 2263 TSRMLS_CC); 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, 507, &_3$$5); + ZEPHIR_CALL_METHOD(NULL, &_0$$5, "__construct", NULL, 509, &_3$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$5, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2263 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -3685,7 +3685,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, 506, &funcArguments); + ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 508, &funcArguments); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&arguments, &left); @@ -3700,7 +3700,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, 509, &_8$$9, &_7$$9); + ZEPHIR_CALL_METHOD(&code, this_ptr, "fireextensionevent", NULL, 511, &_8$$9, &_7$$9); zephir_check_call_status(); if (Z_TYPE_P(&code) == IS_STRING) { RETURN_CCTOR(&code); @@ -3731,7 +3731,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", 2357 TSRMLS_CC); 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, 507, &_13$$11); + ZEPHIR_CALL_METHOD(NULL, &_10$$11, "__construct", NULL, 509, &_13$$11); zephir_check_call_status(); zephir_throw_exception_debug(&_10$$11, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2357 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -3859,7 +3859,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) { zephir_array_fetch_string(&_19, &filter, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2551 TSRMLS_CC); ZEPHIR_INIT_VAR(&_20); ZEPHIR_CONCAT_SVSVSV(&_20, "Unknown filter \"", &name, "\" in ", &_18, " on line ", &_19); - ZEPHIR_CALL_METHOD(NULL, &_17, "__construct", NULL, 507, &_20); + ZEPHIR_CALL_METHOD(NULL, &_17, "__construct", NULL, 509, &_20); zephir_check_call_status(); zephir_throw_exception_debug(&_17, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2551 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -4027,7 +4027,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", 2599 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_7$$7); ZEPHIR_CONCAT_SVSV(&_7$$7, "Invalid statement in ", &_5$$7, " on line ", &_6$$7); - ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", &_8, 507, &_7$$7, &statement); + ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", &_8, 509, &_7$$7, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_4$$7, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2601 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -4039,7 +4039,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, 509, &_10$$8, &_9$$8); + ZEPHIR_CALL_METHOD(&tempCompilation, this_ptr, "fireextensionevent", &_11, 511, &_10$$8, &_9$$8); zephir_check_call_status(); if (Z_TYPE_P(&tempCompilation) == IS_STRING) { zephir_concat_self(&compilation, &tempCompilation TSRMLS_CC); @@ -4144,7 +4144,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, 508, &blockStatements, &_34$$24); + ZEPHIR_CALL_METHOD(&_33$$24, this_ptr, "statementlist", &_35, 510, &blockStatements, &_34$$24); zephir_check_call_status(); zephir_concat_self(&compilation, &_33$$24 TSRMLS_CC); } @@ -4265,7 +4265,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) { zephir_array_fetch_string(&_61$$38, &statement, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2839 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_62$$38); ZEPHIR_CONCAT_SVSVSV(&_62$$38, "Unknown statement ", &type, " in ", &_60$$38, " on line ", &_61$$38); - ZEPHIR_CALL_METHOD(NULL, &_59$$38, "__construct", &_8, 507, &_62$$38); + ZEPHIR_CALL_METHOD(NULL, &_59$$38, "__construct", &_8, 509, &_62$$38); zephir_check_call_status(); zephir_throw_exception_debug(&_59$$38, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2839 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -4295,7 +4295,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) { zephir_array_fetch_string(&_65$$41, &statement, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2599 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_66$$41); ZEPHIR_CONCAT_SVSV(&_66$$41, "Invalid statement in ", &_64$$41, " on line ", &_65$$41); - ZEPHIR_CALL_METHOD(NULL, &_63$$41, "__construct", &_8, 507, &_66$$41, &statement); + ZEPHIR_CALL_METHOD(NULL, &_63$$41, "__construct", &_8, 509, &_66$$41, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_63$$41, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2601 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -4307,7 +4307,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) { zephir_array_fast_append(&_67$$42, &statement); ZEPHIR_INIT_NVAR(&_68$$42); ZVAL_STRING(&_68$$42, "compileStatement"); - ZEPHIR_CALL_METHOD(&tempCompilation, this_ptr, "fireextensionevent", &_11, 509, &_68$$42, &_67$$42); + ZEPHIR_CALL_METHOD(&tempCompilation, this_ptr, "fireextensionevent", &_11, 511, &_68$$42, &_67$$42); zephir_check_call_status(); if (Z_TYPE_P(&tempCompilation) == IS_STRING) { zephir_concat_self(&compilation, &tempCompilation TSRMLS_CC); @@ -4412,7 +4412,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) { } else { ZVAL_BOOL(&_84$$58, 0); } - ZEPHIR_CALL_METHOD(&_83$$58, this_ptr, "statementlist", &_35, 508, &blockStatements, &_84$$58); + ZEPHIR_CALL_METHOD(&_83$$58, this_ptr, "statementlist", &_35, 510, &blockStatements, &_84$$58); zephir_check_call_status(); zephir_concat_self(&compilation, &_83$$58 TSRMLS_CC); } @@ -4533,7 +4533,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) { zephir_array_fetch_string(&_101$$72, &statement, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2839 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_102$$72); ZEPHIR_CONCAT_SVSVSV(&_102$$72, "Unknown statement ", &type, " in ", &_100$$72, " on line ", &_101$$72); - ZEPHIR_CALL_METHOD(NULL, &_99$$72, "__construct", &_8, 507, &_102$$72); + ZEPHIR_CALL_METHOD(NULL, &_99$$72, "__construct", &_8, 509, &_102$$72); zephir_check_call_status(); zephir_throw_exception_debug(&_99$$72, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2839 TSRMLS_CC); ZEPHIR_MM_RESTORE(); @@ -4621,7 +4621,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementListOrExtends) { ZEPHIR_INIT_NVAR(&statement); } if (isStatementList) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "statementlist", NULL, 508, statements); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "statementlist", NULL, 510, statements); 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 20cec2bb7ce..753918ea07c 100644 --- a/ext/phalcon/mvc/view/simple.zep.c +++ b/ext/phalcon/mvc/view/simple.zep.c @@ -349,7 +349,7 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, partial) { } - ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 393); + ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 391); zephir_check_call_status(); if (Z_TYPE_P(params) == IS_ARRAY) { zephir_read_property(&_0$$3, this_ptr, SL("viewParams"), PH_NOISY_CC | PH_READONLY); @@ -451,7 +451,7 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, render) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_CREATE_SYMBOL_TABLE(); - ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 393); + ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 391); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, SL("viewParams"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&viewParams, &_1); @@ -712,7 +712,7 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, loadTemplateEngines) { if (Z_TYPE_P(®isteredEngines) != IS_ARRAY) { ZEPHIR_INIT_VAR(&_2$$4); object_init_ex(&_2$$4, phalcon_mvc_view_engine_php_ce); - ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 498, this_ptr, &di); + ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 500, 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/security.zep.c b/ext/phalcon/security.zep.c index 2e42112b6b0..20633e34070 100644 --- a/ext/phalcon/security.zep.c +++ b/ext/phalcon/security.zep.c @@ -49,7 +49,9 @@ */ ZEPHIR_INIT_CLASS(Phalcon_Security) { - ZEPHIR_REGISTER_CLASS_EX(Phalcon, Security, phalcon, security, phalcon_di_abstractinjectionaware_ce, phalcon_security_method_entry, 0); + ZEPHIR_REGISTER_CLASS(Phalcon, Security, phalcon, security, phalcon_security_method_entry, 0); + + zend_declare_property_null(phalcon_security_ce, SL("container"), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_null(phalcon_security_ce, SL("defaultHash"), ZEND_ACC_PROTECTED TSRMLS_CC); @@ -69,10 +71,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Security) { zend_declare_property_long(phalcon_security_ce, SL("workFactor"), 8, ZEND_ACC_PROTECTED TSRMLS_CC); - zend_declare_property_null(phalcon_security_ce, SL("localSession"), ZEND_ACC_PRIVATE TSRMLS_CC); - - zend_declare_property_null(phalcon_security_ce, SL("localRequest"), ZEND_ACC_PRIVATE TSRMLS_CC); - zephir_declare_class_constant_long(phalcon_security_ce, SL("CRYPT_DEFAULT"), 0); zephir_declare_class_constant_long(phalcon_security_ce, SL("CRYPT_BLOWFISH"), 4); @@ -93,6 +91,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Security) { zephir_declare_class_constant_long(phalcon_security_ce, SL("CRYPT_STD_DES"), 1); + zend_class_implements(phalcon_security_ce TSRMLS_CC, 1, phalcon_di_injectionawareinterface_ce); return SUCCESS; } @@ -127,28 +126,14 @@ PHP_METHOD(Phalcon_Security, getWorkFactor) { */ PHP_METHOD(Phalcon_Security, __construct) { + zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *session = NULL, session_sub, *request = NULL, request_sub, __$null, _0; zval *this_ptr = getThis(); - ZVAL_UNDEF(&session_sub); - ZVAL_UNDEF(&request_sub); - ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 0, 2, &session, &request); - - if (!session) { - session = &session_sub; - session = &__$null; - } - if (!request) { - request = &request_sub; - request = &__$null; - } - ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, phalcon_security_random_ce); @@ -157,8 +142,6 @@ PHP_METHOD(Phalcon_Security, __construct) { zephir_check_call_status(); } zephir_update_property_zval(this_ptr, SL("random"), &_0); - zephir_update_property_zval(this_ptr, SL("localRequest"), request); - zephir_update_property_zval(this_ptr, SL("localSession"), session); ZEPHIR_MM_RESTORE(); } @@ -230,20 +213,28 @@ PHP_METHOD(Phalcon_Security, checkToken) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zend_bool destroyIfValid, _0, _3; - zval *tokenKey = NULL, tokenKey_sub, *tokenValue = NULL, tokenValue_sub, *destroyIfValid_param = NULL, __$null, session, request, equals, userToken, knownToken, _1$$3, _2$$5; + zephir_fcall_cache_entry *_3 = NULL; + zend_bool destroyIfValid, _9; + zval *tokenKey = NULL, tokenKey_sub, *tokenValue = NULL, tokenValue_sub, *destroyIfValid_param = NULL, __$null, container, session, request, equals, userToken, knownToken, _0, _5, _6, _1$$3, _2$$3, _4$$3, _7$$4, _8$$6; zval *this_ptr = getThis(); ZVAL_UNDEF(&tokenKey_sub); ZVAL_UNDEF(&tokenValue_sub); ZVAL_NULL(&__$null); + ZVAL_UNDEF(&container); ZVAL_UNDEF(&session); ZVAL_UNDEF(&request); ZVAL_UNDEF(&equals); ZVAL_UNDEF(&userToken); ZVAL_UNDEF(&knownToken); + ZVAL_UNDEF(&_0); + ZVAL_UNDEF(&_5); + ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_1$$3); - ZVAL_UNDEF(&_2$$5); + ZVAL_UNDEF(&_2$$3); + ZVAL_UNDEF(&_4$$3); + ZVAL_UNDEF(&_7$$4); + ZVAL_UNDEF(&_8$$6); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 0, 3, &tokenKey, &tokenValue, &destroyIfValid_param); @@ -265,43 +256,56 @@ PHP_METHOD(Phalcon_Security, checkToken) { } - ZEPHIR_CALL_METHOD(&session, this_ptr, "getlocalsession", NULL, 0); - zephir_check_call_status(); - _0 = zephir_is_true(&session); - if (_0) { - _0 = !zephir_is_true(tokenKey); + zephir_read_property(&_0, this_ptr, SL("container"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CPY_WRT(&container, &_0); + if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { + ZEPHIR_INIT_VAR(&_1$$3); + object_init_ex(&_1$$3, phalcon_security_exception_ce); + ZEPHIR_INIT_VAR(&_4$$3); + ZVAL_STRING(&_4$$3, "the 'session' service"); + ZEPHIR_CALL_CE_STATIC(&_2$$3, phalcon_security_exception_ce, "containerservicenotfound", &_3, 0, &_4$$3); + zephir_check_call_status(); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 5, &_2$$3); + zephir_check_call_status(); + zephir_throw_exception_debug(&_1$$3, "phalcon/Security.zep", 111 TSRMLS_CC); + ZEPHIR_MM_RESTORE(); + return; } - if (EXPECTED(_0)) { - zephir_read_property(&_1$$3, this_ptr, SL("tokenKeySessionId"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(tokenKey, &session, "get", NULL, 0, &_1$$3); + ZEPHIR_INIT_VAR(&_6); + ZVAL_STRING(&_6, "session"); + ZEPHIR_CALL_METHOD(&_5, &container, "getshared", NULL, 0, &_6); + zephir_check_call_status(); + ZEPHIR_CPY_WRT(&session, &_5); + if (!(zephir_is_true(tokenKey))) { + zephir_read_property(&_7$$4, this_ptr, SL("tokenKeySessionId"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(tokenKey, &session, "get", NULL, 0, &_7$$4); zephir_check_call_status(); } if (!(zephir_is_true(tokenKey))) { RETURN_MM_BOOL(0); } if (!(zephir_is_true(tokenValue))) { - ZEPHIR_CALL_METHOD(&request, this_ptr, "getlocalrequest", NULL, 0); + ZEPHIR_INIT_VAR(&_8$$6); + ZVAL_STRING(&_8$$6, "request"); + ZEPHIR_CALL_METHOD(&request, &container, "getshared", NULL, 0, &_8$$6); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_2$$5); - ZVAL_STRING(&_2$$5, "string"); - ZEPHIR_CALL_METHOD(&userToken, &request, "getpost", NULL, 0, tokenKey, &_2$$5); + ZEPHIR_INIT_NVAR(&_8$$6); + ZVAL_STRING(&_8$$6, "string"); + ZEPHIR_CALL_METHOD(&userToken, &request, "getpost", NULL, 0, tokenKey, &_8$$6); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&userToken, tokenValue); } ZEPHIR_CALL_METHOD(&knownToken, this_ptr, "getrequesttoken", NULL, 0); zephir_check_call_status(); - if (Z_TYPE_P(&knownToken) == IS_NULL) { - RETURN_MM_BOOL(0); - } ZEPHIR_INIT_VAR(&equals); ZEPHIR_INIT_NVAR(&equals); ZVAL_BOOL(&equals, zephir_hash_equals(&knownToken, &userToken)); - _3 = zephir_is_true(&equals); - if (_3) { - _3 = destroyIfValid; + _9 = zephir_is_true(&equals); + if (_9) { + _9 = destroyIfValid; } - if (_3) { + if (_9) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "destroytoken", NULL, 0); zephir_check_call_status(); } @@ -355,7 +359,7 @@ PHP_METHOD(Phalcon_Security, computeHmac) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 5, &_3$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$3, "phalcon/Security.zep", 173 TSRMLS_CC); + zephir_throw_exception_debug(&_1$$3, "phalcon/Security.zep", 172 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -369,27 +373,50 @@ PHP_METHOD(Phalcon_Security, computeHmac) { PHP_METHOD(Phalcon_Security, destroyToken) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zval __$null, session, _0$$3, _1$$3; + zval __$null, container, session, _0, _5, _6, _7, _1$$3, _2$$3, _4$$3; zend_long ZEPHIR_LAST_CALL_STATUS; + zephir_fcall_cache_entry *_3 = NULL; zval *this_ptr = getThis(); ZVAL_NULL(&__$null); + ZVAL_UNDEF(&container); ZVAL_UNDEF(&session); - ZVAL_UNDEF(&_0$$3); + ZVAL_UNDEF(&_0); + ZVAL_UNDEF(&_5); + ZVAL_UNDEF(&_6); + ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_1$$3); + ZVAL_UNDEF(&_2$$3); + ZVAL_UNDEF(&_4$$3); ZEPHIR_MM_GROW(); - ZEPHIR_CALL_METHOD(&session, this_ptr, "getlocalsession", NULL, 0); - zephir_check_call_status(); - if (UNEXPECTED(zephir_is_true(&session))) { - zephir_read_property(&_0$$3, this_ptr, SL("tokenKeySessionId"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &session, "remove", NULL, 0, &_0$$3); + zephir_read_property(&_0, this_ptr, SL("container"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CPY_WRT(&container, &_0); + if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { + ZEPHIR_INIT_VAR(&_1$$3); + object_init_ex(&_1$$3, phalcon_security_exception_ce); + ZEPHIR_INIT_VAR(&_4$$3); + ZVAL_STRING(&_4$$3, "the 'session' service"); + ZEPHIR_CALL_CE_STATIC(&_2$$3, phalcon_security_exception_ce, "containerservicenotfound", &_3, 0, &_4$$3); zephir_check_call_status(); - zephir_read_property(&_1$$3, this_ptr, SL("tokenValueSessionId"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &session, "remove", NULL, 0, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 5, &_2$$3); zephir_check_call_status(); + zephir_throw_exception_debug(&_1$$3, "phalcon/Security.zep", 190 TSRMLS_CC); + ZEPHIR_MM_RESTORE(); + return; } + ZEPHIR_INIT_VAR(&_6); + ZVAL_STRING(&_6, "session"); + ZEPHIR_CALL_METHOD(&_5, &container, "getshared", NULL, 0, &_6); + zephir_check_call_status(); + ZEPHIR_CPY_WRT(&session, &_5); + zephir_read_property(&_0, this_ptr, SL("tokenKeySessionId"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(NULL, &session, "remove", NULL, 0, &_0); + zephir_check_call_status(); + zephir_read_property(&_7, this_ptr, SL("tokenValueSessionId"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(NULL, &session, "remove", NULL, 0, &_7); + zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("token"), &__$null); zephir_update_property_zval(this_ptr, SL("tokenKey"), &__$null); zephir_update_property_zval(this_ptr, SL("requestToken"), &__$null); @@ -409,6 +436,18 @@ PHP_METHOD(Phalcon_Security, getDefaultHash) { } +/** + * Returns the internal dependency injector + */ +PHP_METHOD(Phalcon_Security, getDI) { + + zval *this_ptr = getThis(); + + + RETURN_MEMBER(getThis(), "container"); + +} + /** * Returns a secure random number generator instance */ @@ -463,25 +502,47 @@ PHP_METHOD(Phalcon_Security, getRequestToken) { */ PHP_METHOD(Phalcon_Security, getSessionToken) { - zval session, _0$$3; + zval container, session, _0, _5, _6, _1$$3, _2$$3, _4$$3; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; + zephir_fcall_cache_entry *_3 = NULL; zval *this_ptr = getThis(); + ZVAL_UNDEF(&container); ZVAL_UNDEF(&session); - ZVAL_UNDEF(&_0$$3); + ZVAL_UNDEF(&_0); + ZVAL_UNDEF(&_5); + ZVAL_UNDEF(&_6); + ZVAL_UNDEF(&_1$$3); + ZVAL_UNDEF(&_2$$3); + ZVAL_UNDEF(&_4$$3); ZEPHIR_MM_GROW(); - ZEPHIR_CALL_METHOD(&session, this_ptr, "getlocalsession", NULL, 0); - zephir_check_call_status(); - if (UNEXPECTED(zephir_is_true(&session))) { - zephir_read_property(&_0$$3, this_ptr, SL("tokenValueSessionId"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_METHOD(&session, "get", NULL, 0, &_0$$3); + zephir_read_property(&_0, this_ptr, SL("container"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CPY_WRT(&container, &_0); + if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { + ZEPHIR_INIT_VAR(&_1$$3); + object_init_ex(&_1$$3, phalcon_security_exception_ce); + ZEPHIR_INIT_VAR(&_4$$3); + ZVAL_STRING(&_4$$3, "the 'session' service"); + ZEPHIR_CALL_CE_STATIC(&_2$$3, phalcon_security_exception_ce, "containerservicenotfound", &_3, 0, &_4$$3); zephir_check_call_status(); - RETURN_MM(); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 5, &_2$$3); + zephir_check_call_status(); + zephir_throw_exception_debug(&_1$$3, "phalcon/Security.zep", 262 TSRMLS_CC); + ZEPHIR_MM_RESTORE(); + return; } - RETURN_MM_NULL(); + ZEPHIR_INIT_VAR(&_6); + ZVAL_STRING(&_6, "session"); + ZEPHIR_CALL_METHOD(&_5, &container, "getshared", NULL, 0, &_6); + zephir_check_call_status(); + ZEPHIR_CPY_WRT(&session, &_5); + zephir_read_property(&_0, this_ptr, SL("tokenValueSessionId"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_RETURN_CALL_METHOD(&session, "get", NULL, 0, &_0); + zephir_check_call_status(); + RETURN_MM(); } @@ -540,19 +601,26 @@ PHP_METHOD(Phalcon_Security, getSaltBytes) { */ PHP_METHOD(Phalcon_Security, getToken) { - zval session, _0, _1$$3, _2$$3, _3$$3, _4$$3, _5$$4, _6$$4; + zval container, session, _0, _1$$3, _2$$3, _3$$3, _4$$3, _5$$3, _10$$3, _11$$3, _12$$3, _6$$4, _7$$4, _9$$4; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; + zephir_fcall_cache_entry *_8 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); + ZVAL_UNDEF(&container); ZVAL_UNDEF(&session); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - ZVAL_UNDEF(&_5$$4); + ZVAL_UNDEF(&_5$$3); + ZVAL_UNDEF(&_10$$3); + ZVAL_UNDEF(&_11$$3); + ZVAL_UNDEF(&_12$$3); ZVAL_UNDEF(&_6$$4); + ZVAL_UNDEF(&_7$$4); + ZVAL_UNDEF(&_9$$4); ZEPHIR_MM_GROW(); @@ -566,14 +634,30 @@ PHP_METHOD(Phalcon_Security, getToken) { ZEPHIR_CALL_METHOD(&_3$$3, &_2$$3, "base64safe", NULL, 0, &_4$$3); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("token"), &_3$$3); - ZEPHIR_CALL_METHOD(&session, this_ptr, "getlocalsession", NULL, 0); - zephir_check_call_status(); - if (UNEXPECTED(zephir_is_true(&session))) { - zephir_read_property(&_5$$4, this_ptr, SL("tokenValueSessionId"), PH_NOISY_CC | PH_READONLY); - zephir_read_property(&_6$$4, this_ptr, SL("token"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &session, "set", NULL, 0, &_5$$4, &_6$$4); + zephir_read_property(&_5$$3, this_ptr, SL("container"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CPY_WRT(&container, &_5$$3); + if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { + ZEPHIR_INIT_VAR(&_6$$4); + object_init_ex(&_6$$4, phalcon_security_exception_ce); + ZEPHIR_INIT_VAR(&_9$$4); + ZVAL_STRING(&_9$$4, "the 'session' service"); + ZEPHIR_CALL_CE_STATIC(&_7$$4, phalcon_security_exception_ce, "containerservicenotfound", &_8, 0, &_9$$4); + zephir_check_call_status(); + ZEPHIR_CALL_METHOD(NULL, &_6$$4, "__construct", NULL, 5, &_7$$4); zephir_check_call_status(); + zephir_throw_exception_debug(&_6$$4, "phalcon/Security.zep", 310 TSRMLS_CC); + ZEPHIR_MM_RESTORE(); + return; } + ZEPHIR_INIT_VAR(&_11$$3); + ZVAL_STRING(&_11$$3, "session"); + ZEPHIR_CALL_METHOD(&_10$$3, &container, "getshared", NULL, 0, &_11$$3); + zephir_check_call_status(); + ZEPHIR_CPY_WRT(&session, &_10$$3); + zephir_read_property(&_5$$3, this_ptr, SL("tokenValueSessionId"), PH_NOISY_CC | PH_READONLY); + zephir_read_property(&_12$$3, this_ptr, SL("token"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(NULL, &session, "set", NULL, 0, &_5$$3, &_12$$3); + zephir_check_call_status(); } RETURN_MM_MEMBER(getThis(), "token"); @@ -585,36 +669,59 @@ PHP_METHOD(Phalcon_Security, getToken) { */ PHP_METHOD(Phalcon_Security, getTokenKey) { - zval session, _0, _1$$4, _2$$4, _3$$4, _4$$4, _5$$4; + zval container, session, _0, _1$$3, _6$$3, _7$$3, _8$$3, _9$$3, _10$$3, _11$$3, _2$$4, _3$$4, _5$$4; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; + zephir_fcall_cache_entry *_4 = NULL; zval *this_ptr = getThis(); + ZVAL_UNDEF(&container); ZVAL_UNDEF(&session); ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_1$$4); + ZVAL_UNDEF(&_1$$3); + ZVAL_UNDEF(&_6$$3); + ZVAL_UNDEF(&_7$$3); + ZVAL_UNDEF(&_8$$3); + ZVAL_UNDEF(&_9$$3); + ZVAL_UNDEF(&_10$$3); + ZVAL_UNDEF(&_11$$3); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$4); - ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_5$$4); ZEPHIR_MM_GROW(); zephir_read_property(&_0, this_ptr, SL("tokenKey"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { - ZEPHIR_CALL_METHOD(&session, this_ptr, "getlocalsession", NULL, 0); - zephir_check_call_status(); - if (UNEXPECTED(zephir_is_true(&session))) { - zephir_read_property(&_1$$4, this_ptr, SL("random"), PH_NOISY_CC | PH_READONLY); - zephir_read_property(&_3$$4, this_ptr, SL("numberBytes"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(&_2$$4, &_1$$4, "base64safe", NULL, 0, &_3$$4); + zephir_read_property(&_1$$3, this_ptr, SL("container"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CPY_WRT(&container, &_1$$3); + if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { + ZEPHIR_INIT_VAR(&_2$$4); + object_init_ex(&_2$$4, phalcon_security_exception_ce); + ZEPHIR_INIT_VAR(&_5$$4); + ZVAL_STRING(&_5$$4, "the 'session' service"); + ZEPHIR_CALL_CE_STATIC(&_3$$4, phalcon_security_exception_ce, "containerservicenotfound", &_4, 0, &_5$$4); zephir_check_call_status(); - zephir_update_property_zval(this_ptr, SL("tokenKey"), &_2$$4); - zephir_read_property(&_4$$4, this_ptr, SL("tokenKeySessionId"), PH_NOISY_CC | PH_READONLY); - zephir_read_property(&_5$$4, this_ptr, SL("tokenKey"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &session, "set", NULL, 0, &_4$$4, &_5$$4); + ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 5, &_3$$4); zephir_check_call_status(); + zephir_throw_exception_debug(&_2$$4, "phalcon/Security.zep", 338 TSRMLS_CC); + ZEPHIR_MM_RESTORE(); + return; } + zephir_read_property(&_1$$3, this_ptr, SL("random"), PH_NOISY_CC | PH_READONLY); + zephir_read_property(&_7$$3, this_ptr, SL("numberBytes"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(&_6$$3, &_1$$3, "base64safe", NULL, 0, &_7$$3); + zephir_check_call_status(); + zephir_update_property_zval(this_ptr, SL("tokenKey"), &_6$$3); + ZEPHIR_INIT_VAR(&_9$$3); + ZVAL_STRING(&_9$$3, "session"); + ZEPHIR_CALL_METHOD(&_8$$3, &container, "getshared", NULL, 0, &_9$$3); + zephir_check_call_status(); + ZEPHIR_CPY_WRT(&session, &_8$$3); + zephir_read_property(&_10$$3, this_ptr, SL("tokenKeySessionId"), PH_NOISY_CC | PH_READONLY); + zephir_read_property(&_11$$3, this_ptr, SL("tokenKey"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(NULL, &session, "set", NULL, 0, &_10$$3, &_11$$3); + zephir_check_call_status(); } RETURN_MM_MEMBER(getThis(), "tokenKey"); @@ -715,7 +822,7 @@ PHP_METHOD(Phalcon_Security, hash) { zephir_check_call_status(); } if (UNEXPECTED(Z_TYPE_P(&saltBytes) != IS_STRING)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_security_exception_ce, "Unable to get random bytes for the salt", "phalcon/Security.zep", 391); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_security_exception_ce, "Unable to get random bytes for the salt", "phalcon/Security.zep", 420); return; } ZEPHIR_RETURN_CALL_FUNCTION("crypt", NULL, 0, &password, &saltBytes); @@ -734,7 +841,7 @@ PHP_METHOD(Phalcon_Security, hash) { ZEPHIR_CALL_METHOD(&saltBytes, this_ptr, "getsaltbytes", NULL, 0, &_5$$15); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&saltBytes) != IS_STRING)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_security_exception_ce, "Unable to get random bytes for the salt", "phalcon/Security.zep", 410); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_security_exception_ce, "Unable to get random bytes for the salt", "phalcon/Security.zep", 439); return; } ZEPHIR_INIT_VAR(&_6$$15); @@ -747,7 +854,7 @@ PHP_METHOD(Phalcon_Security, hash) { ZEPHIR_CALL_METHOD(&saltBytes, this_ptr, "getsaltbytes", NULL, 0, &_7$$17); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&saltBytes) != IS_STRING)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_security_exception_ce, "Unable to get random bytes for the salt", "phalcon/Security.zep", 439); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_security_exception_ce, "Unable to get random bytes for the salt", "phalcon/Security.zep", 468); return; } if (workFactor < 4) { @@ -816,6 +923,24 @@ PHP_METHOD(Phalcon_Security, setDefaultHash) { } +/** + * Sets the dependency injector + */ +PHP_METHOD(Phalcon_Security, setDI) { + + zval *container, container_sub; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&container_sub); + + zephir_fetch_params_without_memory_grow(1, 0, &container); + + + + zephir_update_property_zval(this_ptr, SL("container"), container); + +} + /** * Sets a number of bytes to be generated by the openssl pseudo random * generator @@ -844,113 +969,3 @@ PHP_METHOD(Phalcon_Security, setRandomBytes) { } -PHP_METHOD(Phalcon_Security, getLocalRequest) { - - zval container, _0, _1, _6, _7, _2$$4, _3$$4, _5$$4, _8$$5, _9$$5; - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_4 = NULL; - zval *this_ptr = getThis(); - - ZVAL_UNDEF(&container); - ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&_6); - ZVAL_UNDEF(&_7); - ZVAL_UNDEF(&_2$$4); - ZVAL_UNDEF(&_3$$4); - ZVAL_UNDEF(&_5$$4); - ZVAL_UNDEF(&_8$$5); - ZVAL_UNDEF(&_9$$5); - - ZEPHIR_MM_GROW(); - - zephir_read_property(&_0, this_ptr, SL("localRequest"), PH_NOISY_CC | PH_READONLY); - if (zephir_is_true(&_0)) { - RETURN_MM_MEMBER(getThis(), "localRequest"); - } - zephir_read_property(&_1, this_ptr, SL("container"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&container, &_1); - if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { - ZEPHIR_INIT_VAR(&_2$$4); - object_init_ex(&_2$$4, phalcon_security_exception_ce); - ZEPHIR_INIT_VAR(&_5$$4); - ZVAL_STRING(&_5$$4, "the 'request' service"); - ZEPHIR_CALL_CE_STATIC(&_3$$4, phalcon_security_exception_ce, "containerservicenotfound", &_4, 0, &_5$$4); - zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 5, &_3$$4); - zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$4, "phalcon/Security.zep", 498 TSRMLS_CC); - ZEPHIR_MM_RESTORE(); - return; - } - ZEPHIR_INIT_VAR(&_7); - ZVAL_STRING(&_7, "request"); - ZEPHIR_CALL_METHOD(&_6, &container, "has", NULL, 0, &_7); - zephir_check_call_status(); - if (UNEXPECTED(zephir_is_true(&_6))) { - ZEPHIR_INIT_VAR(&_9$$5); - ZVAL_STRING(&_9$$5, "request"); - ZEPHIR_CALL_METHOD(&_8$$5, &container, "getshared", NULL, 0, &_9$$5); - zephir_check_call_status(); - RETURN_CCTOR(&_8$$5); - } - RETURN_MM_NULL(); - -} - -PHP_METHOD(Phalcon_Security, getLocalSession) { - - zval container, _0, _1, _6, _7, _2$$4, _3$$4, _5$$4, _8$$5, _9$$5; - zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_4 = NULL; - zval *this_ptr = getThis(); - - ZVAL_UNDEF(&container); - ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&_6); - ZVAL_UNDEF(&_7); - ZVAL_UNDEF(&_2$$4); - ZVAL_UNDEF(&_3$$4); - ZVAL_UNDEF(&_5$$4); - ZVAL_UNDEF(&_8$$5); - ZVAL_UNDEF(&_9$$5); - - ZEPHIR_MM_GROW(); - - zephir_read_property(&_0, this_ptr, SL("localSession"), PH_NOISY_CC | PH_READONLY); - if (zephir_is_true(&_0)) { - RETURN_MM_MEMBER(getThis(), "localSession"); - } - zephir_read_property(&_1, this_ptr, SL("container"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&container, &_1); - if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { - ZEPHIR_INIT_VAR(&_2$$4); - object_init_ex(&_2$$4, phalcon_security_exception_ce); - ZEPHIR_INIT_VAR(&_5$$4); - ZVAL_STRING(&_5$$4, "the 'session' service"); - ZEPHIR_CALL_CE_STATIC(&_3$$4, phalcon_security_exception_ce, "containerservicenotfound", &_4, 0, &_5$$4); - zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 5, &_3$$4); - zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$4, "phalcon/Security.zep", 520 TSRMLS_CC); - ZEPHIR_MM_RESTORE(); - return; - } - ZEPHIR_INIT_VAR(&_7); - ZVAL_STRING(&_7, "session"); - ZEPHIR_CALL_METHOD(&_6, &container, "has", NULL, 0, &_7); - zephir_check_call_status(); - if (UNEXPECTED(zephir_is_true(&_6))) { - ZEPHIR_INIT_VAR(&_9$$5); - ZVAL_STRING(&_9$$5, "session"); - ZEPHIR_CALL_METHOD(&_8$$5, &container, "getshared", NULL, 0, &_9$$5); - zephir_check_call_status(); - RETURN_CCTOR(&_8$$5); - } - RETURN_MM_NULL(); - -} - diff --git a/ext/phalcon/security.zep.h b/ext/phalcon/security.zep.h index 252f62c768d..d8cb169ce1e 100644 --- a/ext/phalcon/security.zep.h +++ b/ext/phalcon/security.zep.h @@ -11,6 +11,7 @@ PHP_METHOD(Phalcon_Security, checkToken); PHP_METHOD(Phalcon_Security, computeHmac); PHP_METHOD(Phalcon_Security, destroyToken); PHP_METHOD(Phalcon_Security, getDefaultHash); +PHP_METHOD(Phalcon_Security, getDI); PHP_METHOD(Phalcon_Security, getRandom); PHP_METHOD(Phalcon_Security, getRandomBytes); PHP_METHOD(Phalcon_Security, getRequestToken); @@ -21,19 +22,13 @@ PHP_METHOD(Phalcon_Security, getTokenKey); PHP_METHOD(Phalcon_Security, hash); PHP_METHOD(Phalcon_Security, isLegacyHash); PHP_METHOD(Phalcon_Security, setDefaultHash); +PHP_METHOD(Phalcon_Security, setDI); PHP_METHOD(Phalcon_Security, setRandomBytes); -PHP_METHOD(Phalcon_Security, getLocalRequest); -PHP_METHOD(Phalcon_Security, getLocalSession); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_security_setworkfactor, 0, 0, 1) ZEND_ARG_INFO(0, workFactor) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_security___construct, 0, 0, 0) - ZEND_ARG_OBJ_INFO(0, session, Phalcon\\Session\\ManagerInterface, 1) - ZEND_ARG_OBJ_INFO(0, request, Phalcon\\Http\\RequestInterface, 1) -ZEND_END_ARG_INFO() - #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_checkhash, 0, 2, _IS_BOOL, 0) #else @@ -111,6 +106,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_getdefaulthash, #endif ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_security_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) +#endif +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_security_getrandom, 0, 0, Phalcon\\Security\\Random, 0) #else @@ -126,16 +128,16 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_getrandombytes, ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 70200 -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_getrequesttoken, 0, 0, IS_STRING, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_getrequesttoken, 0, 0, IS_STRING, 0) #else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_getrequesttoken, 0, 0, IS_STRING, NULL, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_getrequesttoken, 0, 0, IS_STRING, NULL, 0) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 70200 -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_getsessiontoken, 0, 0, IS_STRING, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_getsessiontoken, 0, 0, IS_STRING, 0) #else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_getsessiontoken, 0, 0, IS_STRING, NULL, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_getsessiontoken, 0, 0, IS_STRING, NULL, 0) #endif ZEND_END_ARG_INFO() @@ -206,6 +208,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_setdefaulthash, #endif ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_security_setdi, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_security_setrandombytes, 0, 1, Phalcon\\Security, 0) #else @@ -218,29 +224,16 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_setrandombytes, #endif ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 70200 -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_security_getlocalrequest, 0, 0, Phalcon\\Http\\RequestInterface, 1) -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_getlocalrequest, 0, 0, IS_OBJECT, "Phalcon\\Http\\RequestInterface", 1) -#endif -ZEND_END_ARG_INFO() - -#if PHP_VERSION_ID >= 70200 -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_security_getlocalsession, 0, 0, Phalcon\\Session\\ManagerInterface, 1) -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_security_getlocalsession, 0, 0, IS_OBJECT, "Phalcon\\Session\\ManagerInterface", 1) -#endif -ZEND_END_ARG_INFO() - ZEPHIR_INIT_FUNCS(phalcon_security_method_entry) { PHP_ME(Phalcon_Security, setWorkFactor, arginfo_phalcon_security_setworkfactor, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Security, getWorkFactor, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Phalcon_Security, __construct, arginfo_phalcon_security___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) + PHP_ME(Phalcon_Security, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Security, checkHash, arginfo_phalcon_security_checkhash, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Security, checkToken, arginfo_phalcon_security_checktoken, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Security, computeHmac, arginfo_phalcon_security_computehmac, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Security, destroyToken, arginfo_phalcon_security_destroytoken, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Security, getDefaultHash, arginfo_phalcon_security_getdefaulthash, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Security, getDI, arginfo_phalcon_security_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Security, getRandom, arginfo_phalcon_security_getrandom, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Security, getRandomBytes, arginfo_phalcon_security_getrandombytes, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Security, getRequestToken, arginfo_phalcon_security_getrequesttoken, ZEND_ACC_PUBLIC) @@ -251,8 +244,7 @@ ZEPHIR_INIT_FUNCS(phalcon_security_method_entry) { PHP_ME(Phalcon_Security, hash, arginfo_phalcon_security_hash, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Security, isLegacyHash, arginfo_phalcon_security_islegacyhash, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Security, setDefaultHash, arginfo_phalcon_security_setdefaulthash, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Security, setDI, arginfo_phalcon_security_setdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Security, setRandomBytes, arginfo_phalcon_security_setrandombytes, ZEND_ACC_PUBLIC) - PHP_ME(Phalcon_Security, getLocalRequest, arginfo_phalcon_security_getlocalrequest, ZEND_ACC_PRIVATE) - PHP_ME(Phalcon_Security, getLocalSession, arginfo_phalcon_security_getlocalsession, ZEND_ACC_PRIVATE) PHP_FE_END }; diff --git a/ext/phalcon/session/adapter/stream.zep.c b/ext/phalcon/session/adapter/stream.zep.c index bfedaf17066..8c02c522e95 100644 --- a/ext/phalcon/session/adapter/stream.zep.c +++ b/ext/phalcon/session/adapter/stream.zep.c @@ -22,6 +22,7 @@ #include "ext/spl/spl_exceptions.h" #include "kernel/file.h" #include "kernel/time.h" +#include "kernel/string.h" /** @@ -110,7 +111,7 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, __construct) { ZEPHIR_INIT_VAR(&_4$$4); object_init_ex(&_4$$4, phalcon_session_exception_ce); ZEPHIR_INIT_VAR(&_5$$4); - ZEPHIR_CONCAT_SVS(&_5$$4, "The session save path [", &path, "] is not writable"); + ZEPHIR_CONCAT_SVS(&_5$$4, "The save_path [", &path, "]is not writeable"); ZEPHIR_CALL_METHOD(NULL, &_4$$4, "__construct", NULL, 5, &_5$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_4$$4, "phalcon/Session/Adapter/Stream.zep", 60 TSRMLS_CC); @@ -259,24 +260,27 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, gc) { } -/** - * Ignore the savePath and use local defined path - * - * @return bool - */ PHP_METHOD(Phalcon_Session_Adapter_Stream, open) { - zval *savePath, savePath_sub, *sessionName, sessionName_sub; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; + zval *savePath, savePath_sub, *sessionName, sessionName_sub, path; zval *this_ptr = getThis(); ZVAL_UNDEF(&savePath_sub); ZVAL_UNDEF(&sessionName_sub); + ZVAL_UNDEF(&path); - zephir_fetch_params_without_memory_grow(2, 0, &savePath, &sessionName); + ZEPHIR_MM_GROW(); + zephir_fetch_params(1, 2, 0, &savePath, &sessionName); - RETURN_BOOL(1); + if (1 != zephir_end_with_str(savePath, SL("/"))) { + ZEPHIR_INIT_VAR(&path); + ZEPHIR_CONCAT_VS(&path, savePath, "/"); + } + zephir_update_property_zval(this_ptr, SL("path"), &path); + RETURN_MM_BOOL(1); } diff --git a/ext/phalcon/session/manager.zep.c b/ext/phalcon/session/manager.zep.c index 09c0486a64e..b773a063135 100644 --- a/ext/phalcon/session/manager.zep.c +++ b/ext/phalcon/session/manager.zep.c @@ -38,7 +38,12 @@ */ ZEPHIR_INIT_CLASS(Phalcon_Session_Manager) { - ZEPHIR_REGISTER_CLASS_EX(Phalcon\\Session, Manager, phalcon, session_manager, phalcon_di_abstractinjectionaware_ce, phalcon_session_manager_method_entry, 0); + ZEPHIR_REGISTER_CLASS(Phalcon\\Session, Manager, phalcon, session_manager, phalcon_session_manager_method_entry, 0); + + /** + * @var + */ + zend_declare_property_null(phalcon_session_manager_ce, SL("container"), ZEND_ACC_PRIVATE TSRMLS_CC); /** * @var |null @@ -63,6 +68,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Session_Manager) { phalcon_session_manager_ce->create_object = zephir_init_properties_Phalcon_Session_Manager; zend_class_implements(phalcon_session_manager_ce TSRMLS_CC, 1, phalcon_session_managerinterface_ce); + zend_class_implements(phalcon_session_manager_ce TSRMLS_CC, 1, phalcon_di_injectionawareinterface_ce); return SUCCESS; } @@ -301,6 +307,18 @@ PHP_METHOD(Phalcon_Session_Manager, get) { } +/** + * Returns the DependencyInjector container + */ +PHP_METHOD(Phalcon_Session_Manager, getDI) { + + zval *this_ptr = getThis(); + + + RETURN_MEMBER(getThis(), "container"); + +} + /** * Returns the stored session handler */ @@ -536,6 +554,24 @@ PHP_METHOD(Phalcon_Session_Manager, set) { } +/** + * Sets the DependencyInjector container + */ +PHP_METHOD(Phalcon_Session_Manager, setDI) { + + zval *container, container_sub; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&container_sub); + + zephir_fetch_params_without_memory_grow(1, 0, &container); + + + + zephir_update_property_zval(this_ptr, SL("container"), container); + +} + /** * Set the handler for the session */ @@ -584,9 +620,9 @@ PHP_METHOD(Phalcon_Session_Manager, setId) { object_init_ex(&_1$$3, spl_ce_RuntimeException); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_SS(&_2$$3, "The session has already been started. ", "To change the id, use regenerateId()"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 265, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 264, &_2$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$3, "phalcon/Session/Manager.zep", 259 TSRMLS_CC); + zephir_throw_exception_debug(&_1$$3, "phalcon/Session/Manager.zep", 280 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } @@ -630,7 +666,7 @@ PHP_METHOD(Phalcon_Session_Manager, setName) { ZEPHIR_CALL_METHOD(&_0, this_ptr, "exists", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(zephir_is_true(&_0))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Cannot set session name after a session has started", "phalcon/Session/Manager.zep", 282); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Cannot set session name after a session has started", "phalcon/Session/Manager.zep", 303); return; } ZEPHIR_INIT_VAR(&_1); @@ -641,7 +677,7 @@ PHP_METHOD(Phalcon_Session_Manager, setName) { ZVAL_STRING(&_4, "/^[\\p{L}\\p{N}_-]+$/u"); zephir_preg_match(&_3, &_4, &name, &_1, 0, 0 , 0 TSRMLS_CC); if (UNEXPECTED(!zephir_is_true(&_3))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "The name contains non alphanum characters", "phalcon/Session/Manager.zep", 288); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "The name contains non alphanum characters", "phalcon/Session/Manager.zep", 309); return; } zephir_update_property_zval(this_ptr, SL("name"), &name); @@ -709,7 +745,7 @@ PHP_METHOD(Phalcon_Session_Manager, start) { if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { RETURN_MM_BOOL(1); } - ZEPHIR_CALL_FUNCTION(&_1, "headers_sent", NULL, 365); + ZEPHIR_CALL_FUNCTION(&_1, "headers_sent", NULL, 363); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_1)) { RETURN_MM_BOOL(0); @@ -717,7 +753,7 @@ PHP_METHOD(Phalcon_Session_Manager, start) { ZEPHIR_OBS_VAR(&_2); zephir_read_property(&_2, this_ptr, SL("handler"), PH_NOISY_CC); if (UNEXPECTED(!(zephir_is_instance_of(&_2, SL("SessionHandlerInterface") TSRMLS_CC)))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_session_exception_ce, "The session handler is not valid", "phalcon/Session/Manager.zep", 328); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_session_exception_ce, "The session handler is not valid", "phalcon/Session/Manager.zep", 349); return; } zephir_read_property(&_3, this_ptr, SL("handler"), PH_NOISY_CC | PH_READONLY); diff --git a/ext/phalcon/session/manager.zep.h b/ext/phalcon/session/manager.zep.h index cd9c575e5b9..2cd49fdea6e 100644 --- a/ext/phalcon/session/manager.zep.h +++ b/ext/phalcon/session/manager.zep.h @@ -11,6 +11,7 @@ PHP_METHOD(Phalcon_Session_Manager, __unset); PHP_METHOD(Phalcon_Session_Manager, destroy); PHP_METHOD(Phalcon_Session_Manager, exists); PHP_METHOD(Phalcon_Session_Manager, get); +PHP_METHOD(Phalcon_Session_Manager, getDI); PHP_METHOD(Phalcon_Session_Manager, getHandler); PHP_METHOD(Phalcon_Session_Manager, getId); PHP_METHOD(Phalcon_Session_Manager, getName); @@ -20,6 +21,7 @@ PHP_METHOD(Phalcon_Session_Manager, regenerateId); PHP_METHOD(Phalcon_Session_Manager, registerHandler); PHP_METHOD(Phalcon_Session_Manager, remove); PHP_METHOD(Phalcon_Session_Manager, set); +PHP_METHOD(Phalcon_Session_Manager, setDI); PHP_METHOD(Phalcon_Session_Manager, setHandler); PHP_METHOD(Phalcon_Session_Manager, setId); PHP_METHOD(Phalcon_Session_Manager, setName); @@ -91,6 +93,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_manager_get, 0, 0, 1) #endif ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_session_manager_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_manager_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) +#endif +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_session_manager_gethandler, 0, 0, SessionHandlerInterface, 0) #else @@ -164,6 +173,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_manager_set, 0, 0, 2) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_manager_setdi, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_session_manager_sethandler, 0, 1, Phalcon\\Session\\ManagerInterface, 0) #else @@ -235,6 +248,7 @@ ZEPHIR_INIT_FUNCS(phalcon_session_manager_method_entry) { PHP_ME(Phalcon_Session_Manager, destroy, NULL, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Session_Manager, exists, arginfo_phalcon_session_manager_exists, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Session_Manager, get, arginfo_phalcon_session_manager_get, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Session_Manager, getDI, arginfo_phalcon_session_manager_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Session_Manager, getHandler, arginfo_phalcon_session_manager_gethandler, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Session_Manager, getId, arginfo_phalcon_session_manager_getid, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Session_Manager, getName, arginfo_phalcon_session_manager_getname, ZEND_ACC_PUBLIC) @@ -244,6 +258,7 @@ ZEPHIR_INIT_FUNCS(phalcon_session_manager_method_entry) { PHP_ME(Phalcon_Session_Manager, registerHandler, arginfo_phalcon_session_manager_registerhandler, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Session_Manager, remove, arginfo_phalcon_session_manager_remove, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Session_Manager, set, arginfo_phalcon_session_manager_set, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Session_Manager, setDI, arginfo_phalcon_session_manager_setdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Session_Manager, setHandler, arginfo_phalcon_session_manager_sethandler, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Session_Manager, setId, arginfo_phalcon_session_manager_setid, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Session_Manager, setName, arginfo_phalcon_session_manager_setname, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/storage/adapter/abstractadapter.zep.c b/ext/phalcon/storage/adapter/abstractadapter.zep.c index ea58da80ade..5e5cb98dbc2 100644 --- a/ext/phalcon/storage/adapter/abstractadapter.zep.c +++ b/ext/phalcon/storage/adapter/abstractadapter.zep.c @@ -412,8 +412,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getUnserializedData) { */ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, initSerializer) { - zend_bool _1, _4; - zval _0, _2, _3, _5, _6$$4, _7$$4, _8$$4; + zval _0, _1, _2, _3; zval className; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; @@ -421,42 +420,24 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, initSerializer) { ZVAL_UNDEF(&className); ZVAL_UNDEF(&_0); + ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_5); - ZVAL_UNDEF(&_6$$4); - ZVAL_UNDEF(&_7$$4); - ZVAL_UNDEF(&_8$$4); ZEPHIR_MM_GROW(); - zephir_read_property(&_0, this_ptr, SL("serializer"), PH_NOISY_CC | PH_READONLY); - _1 = Z_TYPE_P(&_0) == IS_NULL; - if (_1) { - zephir_read_property(&_2, this_ptr, SL("serializerFactory"), PH_NOISY_CC | PH_READONLY); - _1 = Z_TYPE_P(&_2) == IS_NULL; - } - if (UNEXPECTED(_1)) { + zephir_read_property(&_0, this_ptr, SL("serializerFactory"), PH_NOISY_CC | PH_READONLY); + if (UNEXPECTED(Z_TYPE_P(&_0) == IS_NULL)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_storage_exception_ce, "A valid serializer is required", "phalcon/Storage/Adapter/AbstractAdapter.zep", 196); return; } - ZEPHIR_OBS_VAR(&_3); - zephir_read_property(&_3, this_ptr, SL("serializer"), PH_NOISY_CC); - _4 = Z_TYPE_P(&_3) == IS_OBJECT; - if (_4) { - ZEPHIR_OBS_VAR(&_5); - zephir_read_property(&_5, this_ptr, SL("serializer"), PH_NOISY_CC); - _4 = zephir_instance_of_ev(&_5, phalcon_storage_serializer_serializerinterface_ce TSRMLS_CC); - } - if (!(_4)) { - zephir_read_property(&_6$$4, this_ptr, SL("defaultSerializer"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_INIT_VAR(&className); - zephir_fast_strtolower(&className, &_6$$4); - zephir_read_property(&_7$$4, this_ptr, SL("serializerFactory"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(&_8$$4, &_7$$4, "newinstance", NULL, 0, &className); - zephir_check_call_status(); - zephir_update_property_zval(this_ptr, SL("serializer"), &_8$$4); - } + zephir_read_property(&_1, this_ptr, SL("defaultSerializer"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_INIT_VAR(&className); + zephir_fast_strtolower(&className, &_1); + zephir_read_property(&_2, this_ptr, SL("serializerFactory"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(&_3, &_2, "newinstance", NULL, 0, &className); + zephir_check_call_status(); + zephir_update_property_zval(this_ptr, SL("serializer"), &_3); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/storage/adapter/redis.zep.c b/ext/phalcon/storage/adapter/redis.zep.c index 7e6ec0fa15d..fd2e6de8551 100644 --- a/ext/phalcon/storage/adapter/redis.zep.c +++ b/ext/phalcon/storage/adapter/redis.zep.c @@ -319,8 +319,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, get) { */ PHP_METHOD(Phalcon_Storage_Adapter_Redis, getAdapter) { - zend_bool _6$$3, _8$$3; - zval auth, connection, host, index, options, port, result, persistent, persistentid, _0, _1$$3, _7$$3, _9$$3, _10$$3, _2$$4, _3$$5, _4$$6, _5$$6; + zend_bool _4$$3, _6$$3; + zval auth, connection, host, index, method, options, persistent, port, result, _0, _1$$3, _5$$3, _7$$3, _8$$3, _9$$3, _2$$4, _3$$4; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); @@ -329,20 +329,19 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, getAdapter) { ZVAL_UNDEF(&connection); ZVAL_UNDEF(&host); ZVAL_UNDEF(&index); + ZVAL_UNDEF(&method); ZVAL_UNDEF(&options); + ZVAL_UNDEF(&persistent); ZVAL_UNDEF(&port); ZVAL_UNDEF(&result); - ZVAL_UNDEF(&persistent); - ZVAL_UNDEF(&persistentid); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); + ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_7$$3); + ZVAL_UNDEF(&_8$$3); ZVAL_UNDEF(&_9$$3); - ZVAL_UNDEF(&_10$$3); ZVAL_UNDEF(&_2$$4); - ZVAL_UNDEF(&_3$$5); - ZVAL_UNDEF(&_4$$6); - ZVAL_UNDEF(&_5$$6); + ZVAL_UNDEF(&_3$$4); ZEPHIR_MM_GROW(); @@ -358,57 +357,56 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, getAdapter) { zephir_array_fetch_string(&auth, &options, SL("auth"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 119 TSRMLS_CC); ZEPHIR_OBS_VAR(&host); zephir_array_fetch_string(&host, &options, SL("host"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 120 TSRMLS_CC); - ZEPHIR_OBS_VAR(&port); - zephir_array_fetch_string(&port, &options, SL("port"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 121 TSRMLS_CC); ZEPHIR_OBS_VAR(&index); - zephir_array_fetch_string(&index, &options, SL("index"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 122 TSRMLS_CC); + zephir_array_fetch_string(&index, &options, SL("index"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 121 TSRMLS_CC); ZEPHIR_OBS_VAR(&persistent); - zephir_array_fetch_string(&persistent, &options, SL("persistent"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 123 TSRMLS_CC); - if (!(zephir_is_true(&persistent))) { - zephir_read_property(&_2$$4, this_ptr, SL("lifetime"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(&result, &connection, "connect", NULL, 0, &host, &port, &_2$$4); - zephir_check_call_status(); + zephir_array_fetch_string(&persistent, &options, SL("persistent"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 122 TSRMLS_CC); + ZEPHIR_OBS_VAR(&port); + zephir_array_fetch_string(&port, &options, SL("port"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 123 TSRMLS_CC); + if (zephir_is_true(&persistent)) { + ZEPHIR_INIT_VAR(&method); + ZVAL_STRING(&method, "pconnect"); } else { - ZEPHIR_INIT_VAR(&persistentid); - ZEPHIR_CONCAT_SV(&persistentid, "persistentid_", &index); - zephir_read_property(&_3$$5, this_ptr, SL("lifetime"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(&result, &connection, "pconnect", NULL, 0, &host, &port, &_3$$5, &persistentid); - zephir_check_call_status(); + ZEPHIR_INIT_NVAR(&method); + ZVAL_STRING(&method, "connect"); } + zephir_read_property(&_1$$3, this_ptr, SL("lifetime"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD_ZVAL(&result, &connection, &method, NULL, 0, &host, &port, &_1$$3); + zephir_check_call_status(); if (!(zephir_is_true(&result))) { - ZEPHIR_INIT_VAR(&_4$$6); - object_init_ex(&_4$$6, phalcon_storage_exception_ce); - ZEPHIR_INIT_VAR(&_5$$6); - ZEPHIR_CONCAT_SVSVS(&_5$$6, "Could not connect to the Redisd server [", &host, ":", &port, "]"); - ZEPHIR_CALL_METHOD(NULL, &_4$$6, "__construct", NULL, 5, &_5$$6); + ZEPHIR_INIT_VAR(&_2$$4); + object_init_ex(&_2$$4, phalcon_storage_exception_ce); + ZEPHIR_INIT_VAR(&_3$$4); + ZEPHIR_CONCAT_SVSVS(&_3$$4, "Could not connect to the Redisd server [", &host, ":", &port, "]"); + ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 5, &_3$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_4$$6, "phalcon/Storage/Adapter/Redis.zep", 135 TSRMLS_CC); + zephir_throw_exception_debug(&_2$$4, "phalcon/Storage/Adapter/Redis.zep", 131 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - _6$$3 = !(ZEPHIR_IS_EMPTY(&auth)); - if (_6$$3) { - ZEPHIR_CALL_METHOD(&_7$$3, &connection, "auth", NULL, 0, &auth); + _4$$3 = !(ZEPHIR_IS_EMPTY(&auth)); + if (_4$$3) { + ZEPHIR_CALL_METHOD(&_5$$3, &connection, "auth", NULL, 0, &auth); zephir_check_call_status(); - _6$$3 = !zephir_is_true(&_7$$3); + _4$$3 = !zephir_is_true(&_5$$3); } - if (_6$$3) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_storage_exception_ce, "Failed to authenticate with the Redis server", "phalcon/Storage/Adapter/Redis.zep", 139); + if (_4$$3) { + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_storage_exception_ce, "Failed to authenticate with the Redis server", "phalcon/Storage/Adapter/Redis.zep", 135); return; } - _8$$3 = ZEPHIR_GT_LONG(&index, 0); - if (_8$$3) { - ZEPHIR_CALL_METHOD(&_9$$3, &connection, "select", NULL, 0, &index); + _6$$3 = ZEPHIR_GT_LONG(&index, 0); + if (_6$$3) { + ZEPHIR_CALL_METHOD(&_7$$3, &connection, "select", NULL, 0, &index); zephir_check_call_status(); - _8$$3 = !zephir_is_true(&_9$$3); + _6$$3 = !zephir_is_true(&_7$$3); } - if (_8$$3) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_storage_exception_ce, "Redis server selected database failed", "phalcon/Storage/Adapter/Redis.zep", 143); + if (_6$$3) { + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_storage_exception_ce, "Redis server selected database failed", "phalcon/Storage/Adapter/Redis.zep", 139); return; } - zephir_read_property(&_1$$3, this_ptr, SL("prefix"), PH_NOISY_CC | PH_READONLY); - ZVAL_LONG(&_10$$3, 2); - ZEPHIR_CALL_METHOD(NULL, &connection, "setoption", NULL, 0, &_10$$3, &_1$$3); + zephir_read_property(&_8$$3, this_ptr, SL("prefix"), PH_NOISY_CC | PH_READONLY); + ZVAL_LONG(&_9$$3, 2); + ZEPHIR_CALL_METHOD(NULL, &connection, "setoption", NULL, 0, &_9$$3, &_8$$3); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "setserializer", NULL, 114, &connection); zephir_check_call_status(); @@ -664,7 +662,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, setSerializer) { ZEPHIR_INIT_NVAR(&_8$$5); ZVAL_STRING(&_8$$5, ""); zephir_update_property_zval(this_ptr, SL("defaultSerializer"), &_8$$5); - zephir_array_fetch(&_9$$5, &map, &serializer, PH_NOISY | PH_READONLY, "phalcon/Storage/Adapter/Redis.zep", 244 TSRMLS_CC); + zephir_array_fetch(&_9$$5, &map, &serializer, PH_NOISY | PH_READONLY, "phalcon/Storage/Adapter/Redis.zep", 240 TSRMLS_CC); ZVAL_LONG(&_10$$5, 1); ZEPHIR_CALL_METHOD(NULL, connection, "setoption", NULL, 0, &_10$$5, &_9$$5); zephir_check_call_status(); diff --git a/ext/phalcon/text.zep.c b/ext/phalcon/text.zep.c index 5f4c8fe86c9..19df03ca82d 100644 --- a/ext/phalcon/text.zep.c +++ b/ext/phalcon/text.zep.c @@ -284,7 +284,7 @@ PHP_METHOD(Phalcon_Text, endsWith) { } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_RETURN_CALL_CE_STATIC(phalcon_helper_str_ce, "endswith", &_0, 262, &text, &end, &_1); + ZEPHIR_RETURN_CALL_CE_STATIC(phalcon_helper_str_ce, "endswith", &_0, 261, &text, &end, &_1); zephir_check_call_status(); RETURN_MM(); @@ -465,7 +465,7 @@ PHP_METHOD(Phalcon_Text, startsWith) { } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_RETURN_CALL_CE_STATIC(phalcon_helper_str_ce, "startswith", &_0, 261, &text, &start, &_1); + ZEPHIR_RETURN_CALL_CE_STATIC(phalcon_helper_str_ce, "startswith", &_0, 260, &text, &start, &_1); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/url.zep.c b/ext/phalcon/url.zep.c index 55bf3851c31..18a3140aaa3 100644 --- a/ext/phalcon/url.zep.c +++ b/ext/phalcon/url.zep.c @@ -12,13 +12,13 @@ #include #include "kernel/main.h" -#include "kernel/object.h" -#include "kernel/memory.h" #include "kernel/string.h" +#include "kernel/memory.h" #include "kernel/operators.h" #include "kernel/fcall.h" #include "kernel/array.h" #include "kernel/exception.h" +#include "kernel/object.h" #include "kernel/concat.h" #include "ext/spl/spl_exceptions.h" #include "phalcon/url/utils.h" @@ -51,7 +51,7 @@ */ ZEPHIR_INIT_CLASS(Phalcon_Url) { - ZEPHIR_REGISTER_CLASS_EX(Phalcon, Url, phalcon, url, phalcon_di_abstractinjectionaware_ce, phalcon_url_method_entry, 0); + ZEPHIR_REGISTER_CLASS(Phalcon, Url, phalcon, url, phalcon_url_method_entry, 0); /** * @var null | string @@ -64,8 +64,10 @@ ZEPHIR_INIT_CLASS(Phalcon_Url) { zend_declare_property_null(phalcon_url_ce, SL("basePath"), ZEND_ACC_PROTECTED TSRMLS_CC); /** - * @var | null + * @var */ + zend_declare_property_null(phalcon_url_ce, SL("container"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(phalcon_url_ce, SL("router"), ZEND_ACC_PROTECTED TSRMLS_CC); /** @@ -74,30 +76,11 @@ ZEPHIR_INIT_CLASS(Phalcon_Url) { zend_declare_property_null(phalcon_url_ce, SL("staticBaseUri"), ZEND_ACC_PROTECTED TSRMLS_CC); zend_class_implements(phalcon_url_ce TSRMLS_CC, 1, phalcon_url_urlinterface_ce); + zend_class_implements(phalcon_url_ce TSRMLS_CC, 1, phalcon_di_injectionawareinterface_ce); return SUCCESS; } -PHP_METHOD(Phalcon_Url, __construct) { - - zval *router = NULL, router_sub, __$null; - zval *this_ptr = getThis(); - - ZVAL_UNDEF(&router_sub); - ZVAL_NULL(&__$null); - - zephir_fetch_params_without_memory_grow(0, 1, &router); - - if (!router) { - router = &router_sub; - router = &__$null; - } - - - zephir_update_property_zval(this_ptr, SL("router"), router); - -} - /** * Generates a URL * @@ -133,12 +116,13 @@ PHP_METHOD(Phalcon_Url, __construct) { */ PHP_METHOD(Phalcon_Url, get) { - zval strUri, _23$$15; + unsigned char _24$$14, _26$$14, _31$$16; + zval strUri, _19$$14; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zephir_fcall_cache_entry *_10 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zend_bool local, _0$$3, _1$$3, _27$$16; - zval *uri = NULL, uri_sub, *args = NULL, args_sub, *local_param = NULL, *baseUri = NULL, baseUri_sub, __$null, router, container, routeName, route, queryString, _2$$4, _3$$4, _4$$4, _5$$4, _6$$9, _18$$9, _21$$9, _22$$9, _7$$11, _12$$11, _13$$11, _17$$11, _8$$12, _9$$12, _11$$12, _14$$13, _15$$13, _16$$13, _19$$14, _20$$14, _24$$15, _25$$15, _26$$15, _28$$17, _29$$17, _30$$18, _31$$19; + zend_bool local, _0$$3, _1$$3, _22$$14, _23$$14, _25$$14, _29$$16, _30$$16, _32$$19; + zval *uri = NULL, uri_sub, *args = NULL, args_sub, *local_param = NULL, *baseUri = NULL, baseUri_sub, __$null, router, container, routeName, route, queryString, _2$$4, _3$$4, _4$$4, _5$$4, _6$$9, _14$$9, _17$$9, _18$$9, _7$$11, _12$$11, _13$$11, _8$$12, _9$$12, _11$$12, _15$$13, _16$$13, _20$$14, _21$$14, _27$$15, _28$$15, _33$$20, _34$$20, _35$$21, _36$$22; zval *this_ptr = getThis(); ZVAL_UNDEF(&uri_sub); @@ -155,30 +139,27 @@ PHP_METHOD(Phalcon_Url, get) { ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&_6$$9); + ZVAL_UNDEF(&_14$$9); + ZVAL_UNDEF(&_17$$9); ZVAL_UNDEF(&_18$$9); - ZVAL_UNDEF(&_21$$9); - ZVAL_UNDEF(&_22$$9); ZVAL_UNDEF(&_7$$11); ZVAL_UNDEF(&_12$$11); ZVAL_UNDEF(&_13$$11); - ZVAL_UNDEF(&_17$$11); ZVAL_UNDEF(&_8$$12); ZVAL_UNDEF(&_9$$12); ZVAL_UNDEF(&_11$$12); - ZVAL_UNDEF(&_14$$13); ZVAL_UNDEF(&_15$$13); ZVAL_UNDEF(&_16$$13); - ZVAL_UNDEF(&_19$$14); ZVAL_UNDEF(&_20$$14); - ZVAL_UNDEF(&_24$$15); - ZVAL_UNDEF(&_25$$15); - ZVAL_UNDEF(&_26$$15); - ZVAL_UNDEF(&_28$$17); - ZVAL_UNDEF(&_29$$17); - ZVAL_UNDEF(&_30$$18); - ZVAL_UNDEF(&_31$$19); + ZVAL_UNDEF(&_21$$14); + ZVAL_UNDEF(&_27$$15); + ZVAL_UNDEF(&_28$$15); + ZVAL_UNDEF(&_33$$20); + ZVAL_UNDEF(&_34$$20); + ZVAL_UNDEF(&_35$$21); + ZVAL_UNDEF(&_36$$22); ZVAL_UNDEF(&strUri); - ZVAL_UNDEF(&_23$$15); + ZVAL_UNDEF(&_19$$14); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 0, 4, &uri, &args, &local_param, &baseUri); @@ -209,9 +190,9 @@ PHP_METHOD(Phalcon_Url, get) { if (local == 0) { _0$$3 = Z_TYPE_P(uri) == IS_STRING; if (_0$$3) { - _1$$3 = zephir_memnstr_str(uri, SL("//"), "phalcon/Url.zep", 103); + _1$$3 = zephir_memnstr_str(uri, SL("//"), "phalcon/Url.zep", 100); if (!(_1$$3)) { - _1$$3 = zephir_memnstr_str(uri, SL(":"), "phalcon/Url.zep", 103); + _1$$3 = zephir_memnstr_str(uri, SL(":"), "phalcon/Url.zep", 100); } _0$$3 = _1$$3; } @@ -239,12 +220,12 @@ PHP_METHOD(Phalcon_Url, get) { if (Z_TYPE_P(uri) == IS_ARRAY) { ZEPHIR_OBS_VAR(&routeName); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&routeName, uri, SL("for"), 0)))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_url_exception_ce, "It's necessary to define the route name with the parameter 'for'", "phalcon/Url.zep", 122); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_url_exception_ce, "It's necessary to define the route name with the parameter 'for'", "phalcon/Url.zep", 119); return; } zephir_read_property(&_6$$9, this_ptr, SL("router"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&router, &_6$$9); - if (UNEXPECTED(!zephir_is_true(&router))) { + if (Z_TYPE_P(&router) != IS_OBJECT) { zephir_read_property(&_7$$11, this_ptr, SL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_7$$11); if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { @@ -256,88 +237,103 @@ PHP_METHOD(Phalcon_Url, get) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_8$$12, "__construct", NULL, 5, &_9$$12); zephir_check_call_status(); - zephir_throw_exception_debug(&_8$$12, "phalcon/Url.zep", 138 TSRMLS_CC); + zephir_throw_exception_debug(&_8$$12, "phalcon/Url.zep", 135 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&_13$$11); ZVAL_STRING(&_13$$11, "router"); - ZEPHIR_CALL_METHOD(&_12$$11, &container, "has", NULL, 0, &_13$$11); - zephir_check_call_status(); - if (UNEXPECTED(!zephir_is_true(&_12$$11))) { - ZEPHIR_INIT_VAR(&_14$$13); - object_init_ex(&_14$$13, phalcon_url_exception_ce); - ZEPHIR_INIT_VAR(&_16$$13); - ZVAL_STRING(&_16$$13, "the 'router' service"); - ZEPHIR_CALL_CE_STATIC(&_15$$13, phalcon_url_exception_ce, "containerservicenotfound", &_10, 0, &_16$$13); - zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_14$$13, "__construct", NULL, 5, &_15$$13); - zephir_check_call_status(); - zephir_throw_exception_debug(&_14$$13, "phalcon/Url.zep", 146 TSRMLS_CC); - ZEPHIR_MM_RESTORE(); - return; - } - ZEPHIR_INIT_NVAR(&_13$$11); - ZVAL_STRING(&_13$$11, "router"); - ZEPHIR_CALL_METHOD(&_17$$11, &container, "getshared", NULL, 0, &_13$$11); + ZEPHIR_CALL_METHOD(&_12$$11, &container, "getshared", NULL, 0, &_13$$11); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&router, &_17$$11); + ZEPHIR_CPY_WRT(&router, &_12$$11); zephir_update_property_zval(this_ptr, SL("router"), &router); } - ZEPHIR_CALL_METHOD(&_18$$9, &router, "getroutebyname", NULL, 0, &routeName); + ZEPHIR_CALL_METHOD(&_14$$9, &router, "getroutebyname", NULL, 0, &routeName); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&route, &_18$$9); + ZEPHIR_CPY_WRT(&route, &_14$$9); if (UNEXPECTED(Z_TYPE_P(&route) != IS_OBJECT)) { - ZEPHIR_INIT_VAR(&_19$$14); - object_init_ex(&_19$$14, phalcon_url_exception_ce); - ZEPHIR_INIT_VAR(&_20$$14); - ZEPHIR_CONCAT_SVS(&_20$$14, "Cannot obtain a route using the name '", &routeName, "'"); - ZEPHIR_CALL_METHOD(NULL, &_19$$14, "__construct", NULL, 5, &_20$$14); + ZEPHIR_INIT_VAR(&_15$$13); + object_init_ex(&_15$$13, phalcon_url_exception_ce); + ZEPHIR_INIT_VAR(&_16$$13); + ZEPHIR_CONCAT_SVS(&_16$$13, "Cannot obtain a route using the name '", &routeName, "'"); + ZEPHIR_CALL_METHOD(NULL, &_15$$13, "__construct", NULL, 5, &_16$$13); zephir_check_call_status(); - zephir_throw_exception_debug(&_19$$14, "phalcon/Url.zep", 161 TSRMLS_CC); + zephir_throw_exception_debug(&_15$$13, "phalcon/Url.zep", 150 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_INIT_VAR(&_21$$9); - ZEPHIR_CALL_METHOD(&_18$$9, &route, "getpattern", NULL, 0); + ZEPHIR_INIT_VAR(&_17$$9); + ZEPHIR_CALL_METHOD(&_14$$9, &route, "getpattern", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_22$$9, &route, "getreversedpaths", NULL, 0); + ZEPHIR_CALL_METHOD(&_18$$9, &route, "getreversedpaths", NULL, 0); zephir_check_call_status(); - phalcon_replace_paths(&_21$$9, &_18$$9, &_22$$9, uri TSRMLS_CC); - ZEPHIR_CPY_WRT(uri, &_21$$9); + phalcon_replace_paths(&_17$$9, &_14$$9, &_18$$9, uri TSRMLS_CC); + ZEPHIR_CPY_WRT(uri, &_17$$9); } if (local) { - zephir_get_strval(&_23$$15, uri); - ZEPHIR_CPY_WRT(&strUri, &_23$$15); - ZEPHIR_INIT_VAR(&_24$$15); - ZEPHIR_CONCAT_VV(&_24$$15, baseUri, &strUri); - ZEPHIR_INIT_VAR(&_25$$15); - ZVAL_STRING(&_25$$15, "#(? 2; + } + _23$$14 = _22$$14; + if (_23$$14) { + _24$$14 = ZEPHIR_STRING_OFFSET(&strUri, 0); + _23$$14 = _24$$14 == '/'; + } + _25$$14 = _23$$14; + if (_25$$14) { + _26$$14 = ZEPHIR_STRING_OFFSET(&strUri, 1); + _25$$14 = _26$$14 != '/'; + } + if (_25$$14) { + ZVAL_LONG(&_27$$15, 1); + ZEPHIR_INIT_VAR(&_28$$15); + zephir_substr(&_28$$15, &strUri, 1 , 0, ZEPHIR_SUBSTR_NO_LENGTH); + ZEPHIR_INIT_NVAR(uri); + ZEPHIR_CONCAT_VV(uri, baseUri, &_28$$15); + } else { + _29$$16 = ZEPHIR_IS_STRING(baseUri, "/"); + if (_29$$16) { + _29$$16 = zephir_fast_strlen_ev(&strUri) == 1; + } + _30$$16 = _29$$16; + if (_30$$16) { + _31$$16 = ZEPHIR_STRING_OFFSET(&strUri, 0); + _30$$16 = _31$$16 == '/'; + } + if (_30$$16) { + ZEPHIR_CPY_WRT(uri, baseUri); + } else { + ZEPHIR_INIT_NVAR(uri); + ZEPHIR_CONCAT_VV(uri, baseUri, &strUri); + } + } } if (zephir_is_true(args)) { ZEPHIR_CALL_FUNCTION(&queryString, "http_build_query", NULL, 0, args); zephir_check_call_status(); - _27$$16 = Z_TYPE_P(&queryString) == IS_STRING; - if (_27$$16) { - _27$$16 = ((zephir_fast_strlen_ev(&queryString)) ? 1 : 0); + _32$$19 = Z_TYPE_P(&queryString) == IS_STRING; + if (_32$$19) { + _32$$19 = ((zephir_fast_strlen_ev(&queryString)) ? 1 : 0); } - if (_27$$16) { - ZEPHIR_INIT_VAR(&_28$$17); - ZVAL_STRING(&_28$$17, "?"); - ZEPHIR_INIT_VAR(&_29$$17); - zephir_fast_strpos(&_29$$17, uri, &_28$$17, 0 ); - if (!ZEPHIR_IS_FALSE_IDENTICAL(&_29$$17)) { - ZEPHIR_INIT_VAR(&_30$$18); - ZEPHIR_CONCAT_SV(&_30$$18, "&", &queryString); - zephir_concat_self(uri, &_30$$18 TSRMLS_CC); + if (_32$$19) { + ZEPHIR_INIT_VAR(&_33$$20); + ZVAL_STRING(&_33$$20, "?"); + ZEPHIR_INIT_VAR(&_34$$20); + zephir_fast_strpos(&_34$$20, uri, &_33$$20, 0 ); + if (!ZEPHIR_IS_FALSE_IDENTICAL(&_34$$20)) { + ZEPHIR_INIT_VAR(&_35$$21); + ZEPHIR_CONCAT_SV(&_35$$21, "&", &queryString); + zephir_concat_self(uri, &_35$$21 TSRMLS_CC); } else { - ZEPHIR_INIT_VAR(&_31$$19); - ZEPHIR_CONCAT_SV(&_31$$19, "?", &queryString); - zephir_concat_self(uri, &_31$$19 TSRMLS_CC); + ZEPHIR_INIT_VAR(&_36$$22); + ZEPHIR_CONCAT_SV(&_36$$22, "?", &queryString); + zephir_concat_self(uri, &_36$$22 TSRMLS_CC); } } } @@ -399,6 +395,18 @@ PHP_METHOD(Phalcon_Url, getBaseUri) { } +/** + * Returns the DependencyInjector container + */ +PHP_METHOD(Phalcon_Url, getDI) { + + zval *this_ptr = getThis(); + + + RETURN_MEMBER(getThis(), "container"); + +} + /** * Generates a URL for a static resource * @@ -551,6 +559,24 @@ PHP_METHOD(Phalcon_Url, setBaseUri) { } +/** + * Sets the DependencyInjector container + */ +PHP_METHOD(Phalcon_Url, setDI) { + + zval *container, container_sub; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&container_sub); + + zephir_fetch_params_without_memory_grow(1, 0, &container); + + + + zephir_update_property_zval(this_ptr, SL("container"), container); + +} + /** * Sets a prefix for all static URLs generated * diff --git a/ext/phalcon/url.zep.h b/ext/phalcon/url.zep.h index aa26ebe777f..0fb02f78c35 100644 --- a/ext/phalcon/url.zep.h +++ b/ext/phalcon/url.zep.h @@ -3,21 +3,18 @@ extern zend_class_entry *phalcon_url_ce; ZEPHIR_INIT_CLASS(Phalcon_Url); -PHP_METHOD(Phalcon_Url, __construct); PHP_METHOD(Phalcon_Url, get); PHP_METHOD(Phalcon_Url, getBasePath); PHP_METHOD(Phalcon_Url, getBaseUri); +PHP_METHOD(Phalcon_Url, getDI); PHP_METHOD(Phalcon_Url, getStatic); PHP_METHOD(Phalcon_Url, getStaticBaseUri); PHP_METHOD(Phalcon_Url, setBasePath); PHP_METHOD(Phalcon_Url, setBaseUri); +PHP_METHOD(Phalcon_Url, setDI); PHP_METHOD(Phalcon_Url, setStaticBaseUri); PHP_METHOD(Phalcon_Url, path); -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_url___construct, 0, 0, 0) - ZEND_ARG_OBJ_INFO(0, router, Phalcon\\Mvc\\RouterInterface, 1) -ZEND_END_ARG_INFO() - #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_url_get, 0, 0, IS_STRING, 0) #else @@ -47,6 +44,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_url_getbaseuri, 0, 0, IS #endif ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_url_getdi, 0, 0, Phalcon\\Di\\DiInterface, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_url_getdi, 0, 0, IS_OBJECT, "Phalcon\\Di\\DiInterface", 0) +#endif +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_url_getstatic, 0, 0, IS_STRING, 0) #else @@ -86,6 +90,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_url_setbaseuri, 0, 1, IS #endif ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_url_setdi, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 0) +ZEND_END_ARG_INFO() + #if PHP_VERSION_ID >= 70200 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_url_setstaticbaseuri, 0, 1, Phalcon\\Url\\UrlInterface, 0) #else @@ -111,14 +119,15 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_url_path, 0, 0, IS_STRIN ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_url_method_entry) { - PHP_ME(Phalcon_Url, __construct, arginfo_phalcon_url___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Url, get, arginfo_phalcon_url_get, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Url, getBasePath, arginfo_phalcon_url_getbasepath, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Url, getBaseUri, arginfo_phalcon_url_getbaseuri, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Url, getDI, arginfo_phalcon_url_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Url, getStatic, arginfo_phalcon_url_getstatic, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Url, getStaticBaseUri, arginfo_phalcon_url_getstaticbaseuri, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Url, setBasePath, arginfo_phalcon_url_setbasepath, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Url, setBaseUri, arginfo_phalcon_url_setbaseuri, ZEND_ACC_PUBLIC) + PHP_ME(Phalcon_Url, setDI, arginfo_phalcon_url_setdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Url, setStaticBaseUri, arginfo_phalcon_url_setstaticbaseuri, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Url, path, arginfo_phalcon_url_path, ZEND_ACC_PUBLIC) PHP_FE_END diff --git a/ext/phalcon/validation.zep.c b/ext/phalcon/validation.zep.c index 9807dc9fc1b..db3a3ae6e0e 100644 --- a/ext/phalcon/validation.zep.c +++ b/ext/phalcon/validation.zep.c @@ -513,7 +513,7 @@ PHP_METHOD(Phalcon_Validation, getValue) { if (Z_TYPE_P(&entity) == IS_OBJECT) { ZEPHIR_INIT_NVAR(&method); ZEPHIR_CONCAT_SV(&method, "set", &camelizedField); - ZEPHIR_CALL_FUNCTION(&_10$$21, "property_exists", NULL, 434, &entity, &field); + ZEPHIR_CALL_FUNCTION(&_10$$21, "property_exists", NULL, 436, &entity, &field); zephir_check_call_status(); if ((zephir_method_exists(&entity, &method TSRMLS_CC) == SUCCESS)) { ZEPHIR_CALL_METHOD_ZVAL(NULL, &entity, &method, NULL, 0, &value); diff --git a/ext/phalcon/validation/validator/file/resolution/equal.zep.c b/ext/phalcon/validation/validator/file/resolution/equal.zep.c index 22bc44c8b50..0f474382329 100644 --- a/ext/phalcon/validation/validator/file/resolution/equal.zep.c +++ b/ext/phalcon/validation/validator/file/resolution/equal.zep.c @@ -119,7 +119,7 @@ PHP_METHOD(Phalcon_Validation_Validator_File_Resolution_Equal, validate) { ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); zephir_array_fetch_string(&_1, &value, SL("tmp_name"), PH_NOISY | PH_READONLY, "phalcon/Validation/Validator/File/Resolution/Equal.zep", 74 TSRMLS_CC); - ZEPHIR_CALL_FUNCTION(&tmp, "getimagesize", NULL, 367, &_1); + ZEPHIR_CALL_FUNCTION(&tmp, "getimagesize", NULL, 365, &_1); zephir_check_call_status(); ZEPHIR_OBS_VAR(&width); zephir_array_fetch_long(&width, &tmp, 0, PH_NOISY, "phalcon/Validation/Validator/File/Resolution/Equal.zep", 75 TSRMLS_CC); diff --git a/ext/phalcon/validation/validator/file/resolution/max.zep.c b/ext/phalcon/validation/validator/file/resolution/max.zep.c index dc6bd2ae902..cacebcfda46 100644 --- a/ext/phalcon/validation/validator/file/resolution/max.zep.c +++ b/ext/phalcon/validation/validator/file/resolution/max.zep.c @@ -129,7 +129,7 @@ PHP_METHOD(Phalcon_Validation_Validator_File_Resolution_Max, validate) { ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); zephir_array_fetch_string(&_1, &value, SL("tmp_name"), PH_NOISY | PH_READONLY, "phalcon/Validation/Validator/File/Resolution/Max.zep", 79 TSRMLS_CC); - ZEPHIR_CALL_FUNCTION(&tmp, "getimagesize", NULL, 367, &_1); + ZEPHIR_CALL_FUNCTION(&tmp, "getimagesize", NULL, 365, &_1); zephir_check_call_status(); ZEPHIR_OBS_VAR(&width); zephir_array_fetch_long(&width, &tmp, 0, PH_NOISY, "phalcon/Validation/Validator/File/Resolution/Max.zep", 80 TSRMLS_CC); diff --git a/ext/phalcon/validation/validator/file/resolution/min.zep.c b/ext/phalcon/validation/validator/file/resolution/min.zep.c index 58f1dd6ae5a..f16534e830f 100644 --- a/ext/phalcon/validation/validator/file/resolution/min.zep.c +++ b/ext/phalcon/validation/validator/file/resolution/min.zep.c @@ -129,7 +129,7 @@ PHP_METHOD(Phalcon_Validation_Validator_File_Resolution_Min, validate) { ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); zephir_array_fetch_string(&_1, &value, SL("tmp_name"), PH_NOISY | PH_READONLY, "phalcon/Validation/Validator/File/Resolution/Min.zep", 79 TSRMLS_CC); - ZEPHIR_CALL_FUNCTION(&tmp, "getimagesize", NULL, 367, &_1); + ZEPHIR_CALL_FUNCTION(&tmp, "getimagesize", NULL, 365, &_1); zephir_check_call_status(); ZEPHIR_OBS_VAR(&width); zephir_array_fetch_long(&width, &tmp, 0, PH_NOISY, "phalcon/Validation/Validator/File/Resolution/Min.zep", 80 TSRMLS_CC); diff --git a/ext/phalcon/validation/validator/uniqueness.zep.c b/ext/phalcon/validation/validator/uniqueness.zep.c index a31bd9153be..46dd0d49a7e 100644 --- a/ext/phalcon/validation/validator/uniqueness.zep.c +++ b/ext/phalcon/validation/validator/uniqueness.zep.c @@ -220,7 +220,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, getColumnNameReal) { PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniqueness) { zend_class_entry *_9; - zend_bool isModel = 0, _7; + zend_bool isModel = 0, isDocument = 0, _7; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zephir_fcall_cache_entry *_4 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; @@ -315,9 +315,13 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniqueness) { } } isModel = zephir_instance_of_ev(&record, phalcon_mvc_modelinterface_ce TSRMLS_CC); + isDocument = zephir_instance_of_ev(&record, phalcon_mvc_collectioninterface_ce TSRMLS_CC); if (isModel) { ZEPHIR_CALL_METHOD(¶ms, this_ptr, "isuniquenessmodel", NULL, 0, &record, field, &values); zephir_check_call_status(); + } else if (isDocument) { + ZEPHIR_CALL_METHOD(¶ms, this_ptr, "isuniquenesscollection", NULL, 0, &record, field, &values); + zephir_check_call_status(); } else { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_validation_exception_ce, "The uniqueness validator works only with Phalcon\\Mvc\\Model or Phalcon\\Mvc\\Collection", "phalcon/Validation/Validator/Uniqueness.zep", 183); return; @@ -331,6 +335,308 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniqueness) { } +/** + * Uniqueness method used for collection + */ +PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniquenessCollection) { + + zend_bool _5$$4, _6$$4, _16$$17, _17$$17; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; + zephir_fcall_cache_entry *_4 = NULL; + zend_long ZEPHIR_LAST_CALL_STATUS; + zval field, values, _9$$8, _10$$11, _13$$12, _14$$15, _20$$21, _21$$24, _24$$25, _25$$28, _27$$29, _29$$30; + zval *record, record_sub, *field_param = NULL, *values_param = NULL, exceptConditions, fieldExcept, notInValues, value, singleField, params, except, singleExcept, _0, *_1, _2, _26, _3$$3, *_7$$8, _8$$8, *_11$$12, _12$$12, _15$$16, *_18$$21, _19$$21, *_22$$25, _23$$25, _28$$29; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&record_sub); + ZVAL_UNDEF(&exceptConditions); + ZVAL_UNDEF(&fieldExcept); + ZVAL_UNDEF(¬InValues); + ZVAL_UNDEF(&value); + ZVAL_UNDEF(&singleField); + ZVAL_UNDEF(¶ms); + ZVAL_UNDEF(&except); + ZVAL_UNDEF(&singleExcept); + ZVAL_UNDEF(&_0); + ZVAL_UNDEF(&_2); + ZVAL_UNDEF(&_26); + ZVAL_UNDEF(&_3$$3); + ZVAL_UNDEF(&_8$$8); + ZVAL_UNDEF(&_12$$12); + ZVAL_UNDEF(&_15$$16); + ZVAL_UNDEF(&_19$$21); + ZVAL_UNDEF(&_23$$25); + ZVAL_UNDEF(&_28$$29); + ZVAL_UNDEF(&field); + ZVAL_UNDEF(&values); + ZVAL_UNDEF(&_9$$8); + ZVAL_UNDEF(&_10$$11); + ZVAL_UNDEF(&_13$$12); + ZVAL_UNDEF(&_14$$15); + ZVAL_UNDEF(&_20$$21); + ZVAL_UNDEF(&_21$$24); + ZVAL_UNDEF(&_24$$25); + ZVAL_UNDEF(&_25$$28); + ZVAL_UNDEF(&_27$$29); + ZVAL_UNDEF(&_29$$30); + + ZEPHIR_MM_GROW(); + zephir_fetch_params(1, 3, 0, &record, &field_param, &values_param); + + zephir_get_arrval(&field, field_param); + zephir_get_arrval(&values, values_param); + + + ZEPHIR_INIT_VAR(&exceptConditions); + array_init(&exceptConditions); + ZEPHIR_INIT_VAR(¶ms); + zephir_create_array(¶ms, 1, 0 TSRMLS_CC); + ZEPHIR_INIT_VAR(&_0); + array_init(&_0); + zephir_array_update_string(¶ms, SL("conditions"), &_0, PH_COPY | PH_SEPARATE); + zephir_is_iterable(&field, 0, "phalcon/Validation/Validator/Uniqueness.zep", 250); + if (Z_TYPE_P(&field) == IS_ARRAY) { + ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&field), _1) + { + ZEPHIR_INIT_NVAR(&singleField); + ZVAL_COPY(&singleField, _1); + ZEPHIR_INIT_NVAR(&fieldExcept); + ZVAL_NULL(&fieldExcept); + ZEPHIR_INIT_NVAR(¬InValues); + array_init(¬InValues); + ZEPHIR_OBS_NVAR(&value); + zephir_array_fetch(&value, &values, &singleField, PH_NOISY, "phalcon/Validation/Validator/Uniqueness.zep", 207 TSRMLS_CC); + ZEPHIR_INIT_NVAR(&_3$$3); + ZVAL_STRING(&_3$$3, "except"); + ZEPHIR_CALL_METHOD(&except, this_ptr, "getoption", &_4, 0, &_3$$3); + zephir_check_call_status(); + zephir_array_update_multi(¶ms, &value TSRMLS_CC, SL("sz"), 3, SL("conditions"), &singleField); + if (zephir_is_true(&except)) { + _5$$4 = Z_TYPE_P(&except) == IS_ARRAY; + if (_5$$4) { + _5$$4 = zephir_fast_count_int(&field TSRMLS_CC) > 1; + } + if (_5$$4) { + if (zephir_array_isset(&except, &singleField)) { + ZEPHIR_OBS_NVAR(&fieldExcept); + zephir_array_fetch(&fieldExcept, &except, &singleField, PH_NOISY, "phalcon/Validation/Validator/Uniqueness.zep", 216 TSRMLS_CC); + } + } + _6$$4 = Z_TYPE_P(&except) == IS_ARRAY; + if (_6$$4) { + _6$$4 = zephir_fast_count_int(&field TSRMLS_CC) == 1; + } + if (Z_TYPE_P(&fieldExcept) != IS_NULL) { + if (Z_TYPE_P(&fieldExcept) == IS_ARRAY) { + zephir_is_iterable(&fieldExcept, 0, "phalcon/Validation/Validator/Uniqueness.zep", 226); + if (Z_TYPE_P(&fieldExcept) == IS_ARRAY) { + ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&fieldExcept), _7$$8) + { + ZEPHIR_INIT_NVAR(&singleExcept); + ZVAL_COPY(&singleExcept, _7$$8); + zephir_array_append(¬InValues, &singleExcept, PH_SEPARATE, "phalcon/Validation/Validator/Uniqueness.zep", 223); + } ZEND_HASH_FOREACH_END(); + } else { + ZEPHIR_CALL_METHOD(NULL, &fieldExcept, "rewind", NULL, 0); + zephir_check_call_status(); + while (1) { + ZEPHIR_CALL_METHOD(&_8$$8, &fieldExcept, "valid", NULL, 0); + zephir_check_call_status(); + if (!zend_is_true(&_8$$8)) { + break; + } + ZEPHIR_CALL_METHOD(&singleExcept, &fieldExcept, "current", NULL, 0); + zephir_check_call_status(); + zephir_array_append(¬InValues, &singleExcept, PH_SEPARATE, "phalcon/Validation/Validator/Uniqueness.zep", 223); + ZEPHIR_CALL_METHOD(NULL, &fieldExcept, "next", NULL, 0); + zephir_check_call_status(); + } + } + ZEPHIR_INIT_NVAR(&singleExcept); + ZEPHIR_INIT_NVAR(&_9$$8); + zephir_create_array(&_9$$8, 1, 0 TSRMLS_CC); + zephir_array_update_string(&_9$$8, SL("$nin"), ¬InValues, PH_COPY | PH_SEPARATE); + zephir_array_update_zval(&exceptConditions, &singleField, &_9$$8, PH_COPY | PH_SEPARATE); + } else { + ZEPHIR_INIT_NVAR(&_10$$11); + zephir_create_array(&_10$$11, 1, 0 TSRMLS_CC); + zephir_array_update_string(&_10$$11, SL("$ne"), &fieldExcept, PH_COPY | PH_SEPARATE); + zephir_array_update_zval(&exceptConditions, &singleField, &_10$$11, PH_COPY | PH_SEPARATE); + } + } else if (_6$$4) { + zephir_is_iterable(&except, 0, "phalcon/Validation/Validator/Uniqueness.zep", 239); + if (Z_TYPE_P(&except) == IS_ARRAY) { + ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&except), _11$$12) + { + ZEPHIR_INIT_NVAR(&singleExcept); + ZVAL_COPY(&singleExcept, _11$$12); + zephir_array_append(¬InValues, &singleExcept, PH_SEPARATE, "phalcon/Validation/Validator/Uniqueness.zep", 236); + } ZEND_HASH_FOREACH_END(); + } else { + ZEPHIR_CALL_METHOD(NULL, &except, "rewind", NULL, 0); + zephir_check_call_status(); + while (1) { + ZEPHIR_CALL_METHOD(&_12$$12, &except, "valid", NULL, 0); + zephir_check_call_status(); + if (!zend_is_true(&_12$$12)) { + break; + } + ZEPHIR_CALL_METHOD(&singleExcept, &except, "current", NULL, 0); + zephir_check_call_status(); + zephir_array_append(¬InValues, &singleExcept, PH_SEPARATE, "phalcon/Validation/Validator/Uniqueness.zep", 236); + ZEPHIR_CALL_METHOD(NULL, &except, "next", NULL, 0); + zephir_check_call_status(); + } + } + ZEPHIR_INIT_NVAR(&singleExcept); + ZEPHIR_INIT_NVAR(&_13$$12); + zephir_create_array(&_13$$12, 1, 0 TSRMLS_CC); + zephir_array_update_string(&_13$$12, SL("$nin"), ¬InValues, PH_COPY | PH_SEPARATE); + zephir_array_update_multi(¶ms, &_13$$12 TSRMLS_CC, SL("sz"), 3, SL("conditions"), &singleField); + } else if (zephir_fast_count_int(&field TSRMLS_CC) == 1) { + ZEPHIR_INIT_NVAR(&_14$$15); + zephir_create_array(&_14$$15, 1, 0 TSRMLS_CC); + zephir_array_update_string(&_14$$15, SL("$ne"), &except, PH_COPY | PH_SEPARATE); + zephir_array_update_multi(¶ms, &_14$$15 TSRMLS_CC, SL("sz"), 3, SL("conditions"), &singleField); + } + } + } ZEND_HASH_FOREACH_END(); + } else { + ZEPHIR_CALL_METHOD(NULL, &field, "rewind", NULL, 0); + zephir_check_call_status(); + while (1) { + ZEPHIR_CALL_METHOD(&_2, &field, "valid", NULL, 0); + zephir_check_call_status(); + if (!zend_is_true(&_2)) { + break; + } + ZEPHIR_CALL_METHOD(&singleField, &field, "current", NULL, 0); + zephir_check_call_status(); + ZEPHIR_INIT_NVAR(&fieldExcept); + ZVAL_NULL(&fieldExcept); + ZEPHIR_INIT_NVAR(¬InValues); + array_init(¬InValues); + ZEPHIR_OBS_NVAR(&value); + zephir_array_fetch(&value, &values, &singleField, PH_NOISY, "phalcon/Validation/Validator/Uniqueness.zep", 207 TSRMLS_CC); + ZEPHIR_INIT_NVAR(&_15$$16); + ZVAL_STRING(&_15$$16, "except"); + ZEPHIR_CALL_METHOD(&except, this_ptr, "getoption", &_4, 0, &_15$$16); + zephir_check_call_status(); + zephir_array_update_multi(¶ms, &value TSRMLS_CC, SL("sz"), 3, SL("conditions"), &singleField); + if (zephir_is_true(&except)) { + _16$$17 = Z_TYPE_P(&except) == IS_ARRAY; + if (_16$$17) { + _16$$17 = zephir_fast_count_int(&field TSRMLS_CC) > 1; + } + if (_16$$17) { + if (zephir_array_isset(&except, &singleField)) { + ZEPHIR_OBS_NVAR(&fieldExcept); + zephir_array_fetch(&fieldExcept, &except, &singleField, PH_NOISY, "phalcon/Validation/Validator/Uniqueness.zep", 216 TSRMLS_CC); + } + } + _17$$17 = Z_TYPE_P(&except) == IS_ARRAY; + if (_17$$17) { + _17$$17 = zephir_fast_count_int(&field TSRMLS_CC) == 1; + } + if (Z_TYPE_P(&fieldExcept) != IS_NULL) { + if (Z_TYPE_P(&fieldExcept) == IS_ARRAY) { + zephir_is_iterable(&fieldExcept, 0, "phalcon/Validation/Validator/Uniqueness.zep", 226); + if (Z_TYPE_P(&fieldExcept) == IS_ARRAY) { + ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&fieldExcept), _18$$21) + { + ZEPHIR_INIT_NVAR(&singleExcept); + ZVAL_COPY(&singleExcept, _18$$21); + zephir_array_append(¬InValues, &singleExcept, PH_SEPARATE, "phalcon/Validation/Validator/Uniqueness.zep", 223); + } ZEND_HASH_FOREACH_END(); + } else { + ZEPHIR_CALL_METHOD(NULL, &fieldExcept, "rewind", NULL, 0); + zephir_check_call_status(); + while (1) { + ZEPHIR_CALL_METHOD(&_19$$21, &fieldExcept, "valid", NULL, 0); + zephir_check_call_status(); + if (!zend_is_true(&_19$$21)) { + break; + } + ZEPHIR_CALL_METHOD(&singleExcept, &fieldExcept, "current", NULL, 0); + zephir_check_call_status(); + zephir_array_append(¬InValues, &singleExcept, PH_SEPARATE, "phalcon/Validation/Validator/Uniqueness.zep", 223); + ZEPHIR_CALL_METHOD(NULL, &fieldExcept, "next", NULL, 0); + zephir_check_call_status(); + } + } + ZEPHIR_INIT_NVAR(&singleExcept); + ZEPHIR_INIT_NVAR(&_20$$21); + zephir_create_array(&_20$$21, 1, 0 TSRMLS_CC); + zephir_array_update_string(&_20$$21, SL("$nin"), ¬InValues, PH_COPY | PH_SEPARATE); + zephir_array_update_zval(&exceptConditions, &singleField, &_20$$21, PH_COPY | PH_SEPARATE); + } else { + ZEPHIR_INIT_NVAR(&_21$$24); + zephir_create_array(&_21$$24, 1, 0 TSRMLS_CC); + zephir_array_update_string(&_21$$24, SL("$ne"), &fieldExcept, PH_COPY | PH_SEPARATE); + zephir_array_update_zval(&exceptConditions, &singleField, &_21$$24, PH_COPY | PH_SEPARATE); + } + } else if (_17$$17) { + zephir_is_iterable(&except, 0, "phalcon/Validation/Validator/Uniqueness.zep", 239); + if (Z_TYPE_P(&except) == IS_ARRAY) { + ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&except), _22$$25) + { + ZEPHIR_INIT_NVAR(&singleExcept); + ZVAL_COPY(&singleExcept, _22$$25); + zephir_array_append(¬InValues, &singleExcept, PH_SEPARATE, "phalcon/Validation/Validator/Uniqueness.zep", 236); + } ZEND_HASH_FOREACH_END(); + } else { + ZEPHIR_CALL_METHOD(NULL, &except, "rewind", NULL, 0); + zephir_check_call_status(); + while (1) { + ZEPHIR_CALL_METHOD(&_23$$25, &except, "valid", NULL, 0); + zephir_check_call_status(); + if (!zend_is_true(&_23$$25)) { + break; + } + ZEPHIR_CALL_METHOD(&singleExcept, &except, "current", NULL, 0); + zephir_check_call_status(); + zephir_array_append(¬InValues, &singleExcept, PH_SEPARATE, "phalcon/Validation/Validator/Uniqueness.zep", 236); + ZEPHIR_CALL_METHOD(NULL, &except, "next", NULL, 0); + zephir_check_call_status(); + } + } + ZEPHIR_INIT_NVAR(&singleExcept); + ZEPHIR_INIT_NVAR(&_24$$25); + zephir_create_array(&_24$$25, 1, 0 TSRMLS_CC); + zephir_array_update_string(&_24$$25, SL("$nin"), ¬InValues, PH_COPY | PH_SEPARATE); + zephir_array_update_multi(¶ms, &_24$$25 TSRMLS_CC, SL("sz"), 3, SL("conditions"), &singleField); + } else if (zephir_fast_count_int(&field TSRMLS_CC) == 1) { + ZEPHIR_INIT_NVAR(&_25$$28); + zephir_create_array(&_25$$28, 1, 0 TSRMLS_CC); + zephir_array_update_string(&_25$$28, SL("$ne"), &except, PH_COPY | PH_SEPARATE); + zephir_array_update_multi(¶ms, &_25$$28 TSRMLS_CC, SL("sz"), 3, SL("conditions"), &singleField); + } + } + ZEPHIR_CALL_METHOD(NULL, &field, "next", NULL, 0); + zephir_check_call_status(); + } + } + ZEPHIR_INIT_NVAR(&singleField); + ZEPHIR_CALL_METHOD(&_26, record, "getdirtystate", NULL, 0); + zephir_check_call_status(); + if (ZEPHIR_IS_LONG(&_26, 0)) { + ZEPHIR_INIT_VAR(&_27$$29); + zephir_create_array(&_27$$29, 1, 0 TSRMLS_CC); + ZEPHIR_CALL_METHOD(&_28$$29, record, "getid", NULL, 0); + zephir_check_call_status(); + zephir_array_update_string(&_27$$29, SL("$ne"), &_28$$29, PH_COPY | PH_SEPARATE); + zephir_array_update_multi(¶ms, &_27$$29 TSRMLS_CC, SL("ss"), 4, SL("conditions"), SL("_id")); + } + if (!(ZEPHIR_IS_EMPTY(&exceptConditions))) { + ZEPHIR_INIT_VAR(&_29$$30); + zephir_create_array(&_29$$30, 1, 0 TSRMLS_CC); + zephir_array_fast_append(&_29$$30, &exceptConditions); + zephir_array_update_multi(¶ms, &_29$$30 TSRMLS_CC, SL("ss"), 4, SL("conditions"), SL("$or")); + } + RETURN_CCTOR(¶ms); + +} + /** * Uniqueness method used for model */ diff --git a/ext/phalcon/validation/validator/uniqueness.zep.h b/ext/phalcon/validation/validator/uniqueness.zep.h index fb8d84bbd0f..65123d3b173 100644 --- a/ext/phalcon/validation/validator/uniqueness.zep.h +++ b/ext/phalcon/validation/validator/uniqueness.zep.h @@ -6,6 +6,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Validation_Validator_Uniqueness); PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, validate); PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, getColumnNameReal); PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniqueness); +PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniquenessCollection); PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniquenessModel); #if PHP_VERSION_ID >= 70200 @@ -39,6 +40,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_validation_validator_uni ZEND_ARG_INFO(0, field) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_validation_validator_uniqueness_isuniquenesscollection, 0, 0, 3) + ZEND_ARG_INFO(0, record) + ZEND_ARG_ARRAY_INFO(0, field, 0) + ZEND_ARG_ARRAY_INFO(0, values, 0) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_validation_validator_uniqueness_isuniquenessmodel, 0, 0, 3) ZEND_ARG_INFO(0, record) ZEND_ARG_ARRAY_INFO(0, field, 0) @@ -49,6 +56,7 @@ ZEPHIR_INIT_FUNCS(phalcon_validation_validator_uniqueness_method_entry) { PHP_ME(Phalcon_Validation_Validator_Uniqueness, validate, arginfo_phalcon_validation_validator_uniqueness_validate, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Validation_Validator_Uniqueness, getColumnNameReal, arginfo_phalcon_validation_validator_uniqueness_getcolumnnamereal, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Validation_Validator_Uniqueness, isUniqueness, arginfo_phalcon_validation_validator_uniqueness_isuniqueness, ZEND_ACC_PROTECTED) + PHP_ME(Phalcon_Validation_Validator_Uniqueness, isUniquenessCollection, arginfo_phalcon_validation_validator_uniqueness_isuniquenesscollection, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Validation_Validator_Uniqueness, isUniquenessModel, arginfo_phalcon_validation_validator_uniqueness_isuniquenessmodel, ZEND_ACC_PROTECTED) PHP_FE_END }; diff --git a/phalcon/Validation/Validator/Uniqueness.zep b/phalcon/Validation/Validator/Uniqueness.zep index 92e8b570234..378a8b235a1 100644 --- a/phalcon/Validation/Validator/Uniqueness.zep +++ b/phalcon/Validation/Validator/Uniqueness.zep @@ -132,8 +132,8 @@ class Uniqueness extends AbstractCombinedFieldsValidator protected function isUniqueness( validation, var field) -> bool { - var values, convert, record, params, className, isModel, singleField; -// var isDocument; + var values, convert, record, params, className, isModel, isDocument, + singleField; if typeof field != "array" { let singleField = field,