PHP_METHOD(Cake_Core_Configure, write) { int ZEPHIR_LAST_CALL_STATUS, debug; zephir_fcall_cache_entry *_4 = NULL; HashTable *_1; HashPosition _0; zval *config = NULL, *value = NULL, *name = NULL, **_2, *_3 = NULL, *_5, *_6, *_7, _8, _9; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 1, &config, &value); ZEPHIR_SEPARATE_PARAM(config); if (!value) { ZEPHIR_CPY_WRT(value, ZEPHIR_GLOBAL(global_null)); } else { ZEPHIR_SEPARATE_PARAM(value); } if (!(Z_TYPE_P(config) == IS_ARRAY)) { ZEPHIR_INIT_NVAR(config); zephir_create_array(config, 1, 0 TSRMLS_CC); zephir_array_update_zval(&config, config, &value, PH_COPY); } zephir_is_iterable(config, &_1, &_0, 0, 0, "cake/Core/Configure.zep", 28); for ( ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS ; zephir_hash_move_forward_ex(_1, &_0) ) { ZEPHIR_GET_HMKEY(name, _1, _0); ZEPHIR_GET_HVALUE(value, _2); _5 = zephir_fetch_static_property_ce(cake_core_configure_ce, SL("_values") TSRMLS_CC); ZEPHIR_CALL_CE_STATIC(&_3, cake_utility_hash_ce, "insert", &_4, 0, _5, name, value); zephir_check_call_status(); zephir_update_static_property_ce(cake_core_configure_ce, SL("_values"), &_3 TSRMLS_CC); } if (zephir_array_isset_string(config, SS("debug"))) { _5 = zephir_fetch_static_property_ce(cake_core_configure_ce, SL("_hasIniSet") TSRMLS_CC); if (Z_TYPE_P(_5) == IS_NULL) { zephir_update_static_property_ce(cake_core_configure_ce, SL("_hasIniSet"), ((zephir_function_exists_ex(SS("ini_set") TSRMLS_CC) == SUCCESS)) ? &(ZEPHIR_GLOBAL(global_true)) : &(ZEPHIR_GLOBAL(global_false)) TSRMLS_CC); } _6 = zephir_fetch_static_property_ce(cake_core_configure_ce, SL("_hasIniSet") TSRMLS_CC); if (zephir_is_true(_6)) { zephir_array_fetch_string(&_7, config, SL("debug"), PH_NOISY | PH_READONLY, "cake/Core/Configure.zep", 36 TSRMLS_CC); if (zephir_is_true(_7)) { debug = 1; } else { debug = 0; } ZEPHIR_SINIT_VAR(_8); ZVAL_STRING(&_8, "display_errors", 0); ZEPHIR_SINIT_VAR(_9); ZVAL_LONG(&_9, debug); ZEPHIR_CALL_FUNCTION(NULL, "ini_set", NULL, 4, &_8, &_9); zephir_check_call_status(); } } RETURN_MM_BOOL(1); }
PHP_METHOD(Cake_Core_Configure, _getEngine) { int ZEPHIR_LAST_CALL_STATUS; zval *config_param = NULL, *_0, *_1, *_2, *_3; zval *config = NULL; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &config_param); zephir_get_strval(config, config_param); _0 = zephir_fetch_static_property_ce(cake_core_configure_ce, SL("_engines") TSRMLS_CC); if (!(zephir_array_isset(_0, config))) { if (!ZEPHIR_IS_STRING_IDENTICAL(config, "default")) { RETURN_MM_BOOL(0); } ZEPHIR_INIT_VAR(_1); object_init_ex(_1, cake_core_configure_engine_phpconfig_ce); ZEPHIR_CALL_METHOD(NULL, _1, "__construct", NULL, 7); zephir_check_call_status(); ZEPHIR_CALL_SELF(NULL, "config", NULL, 0, config, _1); zephir_check_call_status(); } _2 = zephir_fetch_static_property_ce(cake_core_configure_ce, SL("_engines") TSRMLS_CC); zephir_array_fetch(&_3, _2, config, PH_NOISY | PH_READONLY, "cake/Core/Configure.zep", 93 TSRMLS_CC); RETURN_CTOR(_3); }
/** * @param Entity\Book book */ PHP_METHOD(Dgafka_BookStore_Application_InMemory_Repository_Command_BookRepository, remove) { int ZEPHIR_LAST_CALL_STATUS; zval *book, *_0 = NULL, *_1, *_2 = NULL, *_3; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &book); if (!(zephir_instance_of_ev(book, dgafka_bookstore_business_model_entity_book_ce TSRMLS_CC))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Parameter 'book' must be an instance of 'Dgafka\\BookStore\\Business\\Model\\Entity\\Book'", "", 0); return; } ZEPHIR_CALL_METHOD(&_0, book, "getid", NULL); zephir_check_call_status(); zephir_update_static_property_array_multi_ce(dgafka_bookstore_application_inmemory_repository_command_bookrepository_ce, SL("books"), &ZEPHIR_GLOBAL(global_null) TSRMLS_CC, SL("z"), 1, _0); _1 = zephir_fetch_static_property_ce(dgafka_bookstore_application_inmemory_repository_command_bookrepository_ce, SL("books") TSRMLS_CC); ZEPHIR_CALL_METHOD(&_2, book, "getid", NULL); zephir_check_call_status(); zephir_array_unset(&_1, _2, PH_SEPARATE); ZEPHIR_OBS_VAR(_3); zephir_read_static_property_ce(&_3, dgafka_bookstore_application_inmemory_repository_command_bookrepository_ce, SL("books") TSRMLS_CC); zephir_update_static_property_ce(dgafka_bookstore_application_inmemory_repository_query_bookrepository_ce, SL("books"), &_3 TSRMLS_CC); ZEPHIR_MM_RESTORE(); }
/** * Returns the default Di container instance, or if one was not created * then created a new instance and set the default * * @return DiInterface */ PHP_METHOD(Pdm_Di_Container, getDefault) { zval *_0; _0 = zephir_fetch_static_property_ce(pdm_di_container_ce, SL("defaultInstance") TSRMLS_CC); RETURN_CTORW(_0); }
/** * Return the latest DI created */ PHP_METHOD(Phalcon_Di, getDefault) { zval *_0; _0 = zephir_fetch_static_property_ce(phalcon_di_ce, SL("_default") TSRMLS_CC); RETURN_CTORW(_0); }
PHP_METHOD(Test_Concat, getTestProperty) { zval *_0; _0 = zephir_fetch_static_property_ce(test_concat_ce, SL("testProperty") TSRMLS_CC); RETURN_CTORW(_0); }
PHP_METHOD(Test_Properties_StaticProtectedProperties, getSomeNullInitial) { zval *_0; _0 = zephir_fetch_static_property_ce(test_properties_staticprotectedproperties_ce, SL("someNullInitial") TSRMLS_CC); RETURN_CTORW(_0); }
/** * @param string id */ PHP_METHOD(Dgafka_BookStore_Application_InMemory_Repository_Command_BookRepository, findById) { zval *id_param = NULL, *_0, *_1, *_2; zval *id = NULL; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &id_param); zephir_get_strval(id, id_param); _0 = zephir_fetch_static_property_ce(dgafka_bookstore_application_inmemory_repository_command_bookrepository_ce, SL("books") TSRMLS_CC); if (!(zephir_array_key_exists(_0, id TSRMLS_CC))) { RETURN_MM_NULL(); } _1 = zephir_fetch_static_property_ce(dgafka_bookstore_application_inmemory_repository_command_bookrepository_ce, SL("books") TSRMLS_CC); zephir_array_fetch(&_2, _1, id, PH_NOISY | PH_READONLY, "dgafka/bookStore/application/inMemory/repository/command/bookRepository.zep", 44 TSRMLS_CC); RETURN_CTOR(_2); }
/** * Retrieve singleton instance * * @return Yaf_Session */ PHP_METHOD(Yaf_Session, getInstance) { int ZEPHIR_LAST_CALL_STATUS; zval *_0, *_1, *_2; ZEPHIR_MM_GROW(); _0 = zephir_fetch_static_property_ce(yaf_session_ce, SL("_instance") TSRMLS_CC); if (Z_TYPE_P(_0) == IS_NULL) { ZEPHIR_INIT_VAR(_1); object_init_ex(_1, yaf_session_ce); ZEPHIR_CALL_METHOD(NULL, _1, "__construct", NULL); zephir_check_call_status(); zephir_update_static_property_ce(yaf_session_ce, SL("_instance"), &_1 TSRMLS_CC); ZEPHIR_CALL_SELF(NULL, "start", NULL); zephir_check_call_status(); } _2 = zephir_fetch_static_property_ce(yaf_session_ce, SL("_instance") TSRMLS_CC); RETURN_CTOR(_2); }
PHP_METHOD(Cake_Core_Configure, read) { int ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_1 = NULL; zval *_var = NULL, *_0; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 0, 1, &_var); if (!_var) { _var = ZEPHIR_GLOBAL(global_null); } if (Z_TYPE_P(_var) == IS_NULL) { _0 = zephir_fetch_static_property_ce(cake_core_configure_ce, SL("_values") TSRMLS_CC); RETURN_CTOR(_0); } _0 = zephir_fetch_static_property_ce(cake_core_configure_ce, SL("_values") TSRMLS_CC); ZEPHIR_RETURN_CALL_CE_STATIC(cake_utility_hash_ce, "get", &_1, 5, _0, _var); zephir_check_call_status(); RETURN_MM(); }
PHP_METHOD(Test_SPropertyAccess, __construct) { zval *_0, *_1, *_2; ZEPHIR_INIT_ZVAL_NREF(_0); ZVAL_STRING(_0, "abc", 1); zephir_update_static_property_ce(test_spropertyaccess_ce, SL("a"), _0 TSRMLS_CC); _0 = zephir_fetch_static_property_ce(test_spropertyaccess_ce, SL("a") TSRMLS_CC); zephir_array_fetch_long(&_1, _0, 0, PH_NOISY | PH_READONLY TSRMLS_CC); zephir_update_static_property_ce(test_spropertyaccess_ce, SL("b"), _1 TSRMLS_CC); zephir_read_static_property_ce(&_2, test_spropertyaccess_ce, SL("b") TSRMLS_CC); zephir_update_static_property_ce(test_scallexternal_ce, SL("sproperty"), _2 TSRMLS_CC); zephir_read_static_property_ce(&_2, test_scallexternal_ce, SL("sproperty") TSRMLS_CC); zephir_update_static_property_ce(test_spropertyaccess_ce, SL("b"), _2 TSRMLS_CC); }
PHP_METHOD(Cake_Core_Configure, load) { zephir_fcall_cache_entry *_1 = NULL; int ZEPHIR_LAST_CALL_STATUS; zend_bool merge; zval *key, *config = NULL, *merge_param = NULL, *engine = NULL, *values = NULL, *_0 = NULL, *_2; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 2, &key, &config, &merge_param); if (!config) { ZEPHIR_INIT_VAR(config); ZVAL_STRING(config, "default", 1); } if (!merge_param) { merge = 1; } else { merge = zephir_get_boolval(merge_param); } ZEPHIR_CALL_SELF(&engine, "_getengine", NULL, 0, config); zephir_check_call_status(); if (!(zephir_is_true(engine))) { RETURN_MM_BOOL(0); } ZEPHIR_CALL_METHOD(&values, engine, "read", NULL, 0, key); zephir_check_call_status(); if (merge) { _2 = zephir_fetch_static_property_ce(cake_core_configure_ce, SL("_values") TSRMLS_CC); ZEPHIR_CALL_CE_STATIC(&_0, cake_utility_hash_ce, "merge", &_1, 6, _2, values); zephir_check_call_status(); ZEPHIR_CPY_WRT(values, _0); } ZEPHIR_RETURN_CALL_SELF("write", NULL, 0, values); zephir_check_call_status(); RETURN_MM(); }
/** * Handles uncaught exceptions */ PHP_METHOD(Phalcon_Debug, onUncaughtException) { HashTable *_12$$5, *_17$$5, *_24$$5, *_31$$5, *_37$$13; HashPosition _11$$5, _16$$5, _23$$5, _30$$5, _36$$13; zephir_fcall_cache_entry *_15 = NULL, *_21 = NULL, *_27 = NULL; int ZEPHIR_LAST_CALL_STATUS; zval *exception, *_REQUEST, *_SERVER, *obLevel = NULL, *className = NULL, *escapedMessage = NULL, *html = NULL, *showBackTrace = NULL, *dataVars = NULL, *n = NULL, *traceItem = NULL, *keyRequest = NULL, *value = NULL, *keyServer = NULL, *keyFile = NULL, *keyVar = NULL, *dataVar = NULL, *_0, *_2 = NULL, *_3 = NULL, *_4, *_5 = NULL, *_6, *_7 = NULL, *_8 = NULL, *_9, *_42 = NULL, *_43, *_1$$4 = NULL, *_10$$5 = NULL, **_13$$5, **_18$$5, **_25$$5, *_29$$5 = NULL, **_32$$5, *_34$$5 = NULL, *_35$$5, *_14$$7 = NULL, *_19$$9 = NULL, *_20$$10 = NULL, *_22$$10 = NULL, *_26$$11 = NULL, *_28$$11 = NULL, *_33$$12 = NULL, **_38$$13, *_39$$14 = NULL, *_40$$14, *_41$$14 = NULL; ZEPHIR_MM_GROW(); zephir_get_global(&_SERVER, SS("_SERVER") TSRMLS_CC); zephir_get_global(&_REQUEST, SS("_REQUEST") TSRMLS_CC); zephir_fetch_params(1, 1, 0, &exception); ZEPHIR_CALL_FUNCTION(&obLevel, "ob_get_level", NULL, 168); zephir_check_call_status(); if (ZEPHIR_GT_LONG(obLevel, 0)) { ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 128); zephir_check_call_status(); } _0 = zephir_fetch_static_property_ce(phalcon_debug_ce, SL("_isActive") TSRMLS_CC); if (zephir_is_true(_0)) { ZEPHIR_CALL_METHOD(&_1$$4, exception, "getmessage", NULL, 0); zephir_check_call_status(); zend_print_zval(_1$$4, 0); RETURN_MM_NULL(); } zephir_update_static_property_ce(phalcon_debug_ce, SL("_isActive"), &ZEPHIR_GLOBAL(global_true) TSRMLS_CC); ZEPHIR_INIT_VAR(className); zephir_get_class(className, exception, 0 TSRMLS_CC); ZEPHIR_CALL_METHOD(&_2, exception, "getmessage", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&escapedMessage, this_ptr, "_escapestring", NULL, 0, _2); zephir_check_call_status(); ZEPHIR_INIT_VAR(html); ZEPHIR_CONCAT_SVSVS(html, "<html><head><title>", className, ": ", escapedMessage, "</title>"); ZEPHIR_CALL_METHOD(&_3, this_ptr, "getcsssources", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(_4); ZEPHIR_CONCAT_VS(_4, _3, "</head><body>"); zephir_concat_self(&html, _4 TSRMLS_CC); ZEPHIR_CALL_METHOD(&_5, this_ptr, "getversion", NULL, 0); zephir_check_call_status(); zephir_concat_self(&html, _5 TSRMLS_CC); zephir_concat_self_str(&html, SL("<div align=\"center\"><div class=\"error-main\">") TSRMLS_CC); ZEPHIR_INIT_VAR(_6); ZEPHIR_CONCAT_SVSVS(_6, "<h1>", className, ": ", escapedMessage, "</h1>"); zephir_concat_self(&html, _6 TSRMLS_CC); ZEPHIR_CALL_METHOD(&_7, exception, "getfile", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_8, exception, "getline", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(_9); ZEPHIR_CONCAT_SVSVS(_9, "<span class=\"error-file\">", _7, " (", _8, ")</span>"); zephir_concat_self(&html, _9 TSRMLS_CC); zephir_concat_self_str(&html, SL("</div>") TSRMLS_CC); ZEPHIR_OBS_VAR(showBackTrace); zephir_read_property_this(&showBackTrace, this_ptr, SL("_showBackTrace"), PH_NOISY_CC); if (zephir_is_true(showBackTrace)) { ZEPHIR_OBS_VAR(dataVars); zephir_read_property_this(&dataVars, this_ptr, SL("_data"), PH_NOISY_CC); zephir_concat_self_str(&html, SL("<div class=\"error-info\"><div id=\"tabs\"><ul>") TSRMLS_CC); zephir_concat_self_str(&html, SL("<li><a href=\"#error-tabs-1\">Backtrace</a></li>") TSRMLS_CC); zephir_concat_self_str(&html, SL("<li><a href=\"#error-tabs-2\">Request</a></li>") TSRMLS_CC); zephir_concat_self_str(&html, SL("<li><a href=\"#error-tabs-3\">Server</a></li>") TSRMLS_CC); zephir_concat_self_str(&html, SL("<li><a href=\"#error-tabs-4\">Included Files</a></li>") TSRMLS_CC); zephir_concat_self_str(&html, SL("<li><a href=\"#error-tabs-5\">Memory</a></li>") TSRMLS_CC); if (Z_TYPE_P(dataVars) == IS_ARRAY) { zephir_concat_self_str(&html, SL("<li><a href=\"#error-tabs-6\">Variables</a></li>") TSRMLS_CC); } zephir_concat_self_str(&html, SL("</ul>") TSRMLS_CC); zephir_concat_self_str(&html, SL("<div id=\"error-tabs-1\"><table cellspacing=\"0\" align=\"center\" width=\"100%\">") TSRMLS_CC); ZEPHIR_CALL_METHOD(&_10$$5, exception, "gettrace", NULL, 0); zephir_check_call_status(); zephir_is_iterable(_10$$5, &_12$$5, &_11$$5, 0, 0, "phalcon/debug.zep", 659); for ( ; zend_hash_get_current_data_ex(_12$$5, (void**) &_13$$5, &_11$$5) == SUCCESS ; zend_hash_move_forward_ex(_12$$5, &_11$$5) ) { ZEPHIR_GET_HMKEY(n, _12$$5, _11$$5); ZEPHIR_GET_HVALUE(traceItem, _13$$5); ZEPHIR_CALL_METHOD(&_14$$7, this_ptr, "showtraceitem", &_15, 169, n, traceItem); zephir_check_call_status(); zephir_concat_self(&html, _14$$7 TSRMLS_CC); } zephir_concat_self_str(&html, SL("</table></div>") TSRMLS_CC); zephir_concat_self_str(&html, SL("<div id=\"error-tabs-2\"><table cellspacing=\"0\" align=\"center\" class=\"superglobal-detail\">") TSRMLS_CC); zephir_concat_self_str(&html, SL("<tr><th>Key</th><th>Value</th></tr>") TSRMLS_CC); zephir_is_iterable(_REQUEST, &_17$$5, &_16$$5, 0, 0, "phalcon/debug.zep", 673); for ( ; zend_hash_get_current_data_ex(_17$$5, (void**) &_18$$5, &_16$$5) == SUCCESS ; zend_hash_move_forward_ex(_17$$5, &_16$$5) ) { ZEPHIR_GET_HMKEY(keyRequest, _17$$5, _16$$5); ZEPHIR_GET_HVALUE(value, _18$$5); if (Z_TYPE_P(value) != IS_ARRAY) { ZEPHIR_INIT_LNVAR(_19$$9); ZEPHIR_CONCAT_SVSVS(_19$$9, "<tr><td class=\"key\">", keyRequest, "</td><td>", value, "</td></tr>"); zephir_concat_self(&html, _19$$9 TSRMLS_CC); } else { ZEPHIR_CALL_FUNCTION(&_20$$10, "print_r", &_21, 170, value, ZEPHIR_GLOBAL(global_true)); zephir_check_call_status(); ZEPHIR_INIT_LNVAR(_22$$10); ZEPHIR_CONCAT_SVSVS(_22$$10, "<tr><td class=\"key\">", keyRequest, "</td><td>", _20$$10, "</td></tr>"); zephir_concat_self(&html, _22$$10 TSRMLS_CC); } } zephir_concat_self_str(&html, SL("</table></div>") TSRMLS_CC); zephir_concat_self_str(&html, SL("<div id=\"error-tabs-3\"><table cellspacing=\"0\" align=\"center\" class=\"superglobal-detail\">") TSRMLS_CC); zephir_concat_self_str(&html, SL("<tr><th>Key</th><th>Value</th></tr>") TSRMLS_CC); zephir_is_iterable(_SERVER, &_24$$5, &_23$$5, 0, 0, "phalcon/debug.zep", 683); for ( ; zend_hash_get_current_data_ex(_24$$5, (void**) &_25$$5, &_23$$5) == SUCCESS ; zend_hash_move_forward_ex(_24$$5, &_23$$5) ) { ZEPHIR_GET_HMKEY(keyServer, _24$$5, _23$$5); ZEPHIR_GET_HVALUE(value, _25$$5); ZEPHIR_CALL_METHOD(&_26$$11, this_ptr, "_getvardump", &_27, 0, value); zephir_check_call_status(); ZEPHIR_INIT_LNVAR(_28$$11); ZEPHIR_CONCAT_SVSVS(_28$$11, "<tr><td class=\"key\">", keyServer, "</td><td>", _26$$11, "</td></tr>"); zephir_concat_self(&html, _28$$11 TSRMLS_CC); } zephir_concat_self_str(&html, SL("</table></div>") TSRMLS_CC); zephir_concat_self_str(&html, SL("<div id=\"error-tabs-4\"><table cellspacing=\"0\" align=\"center\" class=\"superglobal-detail\">") TSRMLS_CC); zephir_concat_self_str(&html, SL("<tr><th>#</th><th>Path</th></tr>") TSRMLS_CC); ZEPHIR_CALL_FUNCTION(&_29$$5, "get_included_files", NULL, 171); zephir_check_call_status(); zephir_is_iterable(_29$$5, &_31$$5, &_30$$5, 0, 0, "phalcon/debug.zep", 693); for ( ; zend_hash_get_current_data_ex(_31$$5, (void**) &_32$$5, &_30$$5) == SUCCESS ; zend_hash_move_forward_ex(_31$$5, &_30$$5) ) { ZEPHIR_GET_HMKEY(keyFile, _31$$5, _30$$5); ZEPHIR_GET_HVALUE(value, _32$$5); ZEPHIR_INIT_LNVAR(_33$$12); ZEPHIR_CONCAT_SVSVS(_33$$12, "<tr><td>", keyFile, "</th><td>", value, "</td></tr>"); zephir_concat_self(&html, _33$$12 TSRMLS_CC); } zephir_concat_self_str(&html, SL("</table></div>") TSRMLS_CC); zephir_concat_self_str(&html, SL("<div id=\"error-tabs-5\"><table cellspacing=\"0\" align=\"center\" class=\"superglobal-detail\">") TSRMLS_CC); ZEPHIR_CALL_FUNCTION(&_34$$5, "memory_get_usage", NULL, 172, ZEPHIR_GLOBAL(global_true)); zephir_check_call_status(); ZEPHIR_INIT_VAR(_35$$5); ZEPHIR_CONCAT_SVS(_35$$5, "<tr><th colspan=\"2\">Memory</th></tr><tr><td>Usage</td><td>", _34$$5, "</td></tr>"); zephir_concat_self(&html, _35$$5 TSRMLS_CC); zephir_concat_self_str(&html, SL("</table></div>") TSRMLS_CC); if (Z_TYPE_P(dataVars) == IS_ARRAY) { zephir_concat_self_str(&html, SL("<div id=\"error-tabs-6\"><table cellspacing=\"0\" align=\"center\" class=\"superglobal-detail\">") TSRMLS_CC); zephir_concat_self_str(&html, SL("<tr><th>Key</th><th>Value</th></tr>") TSRMLS_CC); zephir_is_iterable(dataVars, &_37$$13, &_36$$13, 0, 0, "phalcon/debug.zep", 711); for ( ; zend_hash_get_current_data_ex(_37$$13, (void**) &_38$$13, &_36$$13) == SUCCESS ; zend_hash_move_forward_ex(_37$$13, &_36$$13) ) { ZEPHIR_GET_HMKEY(keyVar, _37$$13, _36$$13); ZEPHIR_GET_HVALUE(dataVar, _38$$13); zephir_array_fetch_long(&_40$$14, dataVar, 0, PH_NOISY | PH_READONLY, "phalcon/debug.zep", 709 TSRMLS_CC); ZEPHIR_CALL_METHOD(&_39$$14, this_ptr, "_getvardump", &_27, 0, _40$$14); zephir_check_call_status(); ZEPHIR_INIT_LNVAR(_41$$14); ZEPHIR_CONCAT_SVSVS(_41$$14, "<tr><td class=\"key\">", keyVar, "</td><td>", _39$$14, "</td></tr>"); zephir_concat_self(&html, _41$$14 TSRMLS_CC); } zephir_concat_self_str(&html, SL("</table></div>") TSRMLS_CC); } zephir_concat_self_str(&html, SL("</div>") TSRMLS_CC); } ZEPHIR_CALL_METHOD(&_42, this_ptr, "getjssources", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(_43); ZEPHIR_CONCAT_VS(_43, _42, "</div></body></html>"); zephir_concat_self(&html, _43 TSRMLS_CC); zend_print_zval(html, 0); zephir_update_static_property_ce(phalcon_debug_ce, SL("_isActive"), &ZEPHIR_GLOBAL(global_false) TSRMLS_CC); RETURN_MM_BOOL(1); }
PHP_METHOD(Xs_FieldMeta, getCustomTokenizer) { zend_class_entry *_15, *_17; int ZEPHIR_LAST_CALL_STATUS; zval *name = NULL, *arg = NULL, *_7 = NULL, *_9 = NULL, *_11 = NULL; zval *tokenizer = NULL, *m = NULL, *_0, *_1, *_2, *_3, _4, *_5 = NULL, *_6, *_8 = NULL, *_10, *_12 = NULL, *_13 = NULL, *_14 = NULL, *_16 = NULL; ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(m); ZVAL_NULL(m); ZEPHIR_OBS_VAR(tokenizer); _0 = zephir_fetch_static_property_ce(xs_fieldmeta_ce, SL("tokenizers") TSRMLS_CC); _1 = zephir_fetch_nproperty_this(this_ptr, SL("tokenizer"), PH_NOISY_CC); if (zephir_array_isset_fetch(&tokenizer, _0, _1, 0 TSRMLS_CC)) { RETURN_CCTOR(tokenizer); } ZEPHIR_INIT_VAR(_2); _3 = zephir_fetch_nproperty_this(this_ptr, SL("tokenizer"), PH_NOISY_CC); ZEPHIR_SINIT_VAR(_4); ZVAL_STRING(&_4, "/^([^\\(]+)\\((.*)\\)$/", 0); zephir_preg_match(_2, &_4, _3, m, 0, 0 , 0 TSRMLS_CC); if (zephir_is_true(_2)) { ZEPHIR_INIT_VAR(_5); zephir_array_fetch_long(&_6, m, 1, PH_NOISY | PH_READONLY, "xs/fieldmeta.zep", 125 TSRMLS_CC); zephir_ucfirst(_5, _6); zephir_get_strval(_7, _5); ZEPHIR_INIT_VAR(name); ZEPHIR_CONCAT_SSV(name, "Xs", "\\Tokenizer", _7); ZEPHIR_OBS_VAR(_8); zephir_array_fetch_long(&_8, m, 2, PH_NOISY, "xs/fieldmeta.zep", 126 TSRMLS_CC); zephir_get_strval(_9, _8); ZEPHIR_CPY_WRT(arg, _9); } else { ZEPHIR_INIT_NVAR(_5); _10 = zephir_fetch_nproperty_this(this_ptr, SL("tokenizer"), PH_NOISY_CC); zephir_ucfirst(_5, _10); zephir_get_strval(_11, _5); ZEPHIR_INIT_NVAR(name); ZEPHIR_CONCAT_SSV(name, "Xs", "\\Tokenizer", _11); ZEPHIR_INIT_NVAR(arg); ZVAL_EMPTY_STRING(arg); } if (unlikely(!(zephir_class_exists(name, zephir_is_true(ZEPHIR_GLOBAL(global_true)) TSRMLS_CC)))) { ZEPHIR_INIT_NVAR(_5); object_init_ex(_5, xs_exception_ce); _10 = zephir_fetch_nproperty_this(this_ptr, SL("name"), PH_NOISY_CC); ZEPHIR_INIT_VAR(_12); ZEPHIR_CONCAT_SVSVS(_12, "Undefined custom tokenizer ", name, " for field `", _10, "`"); ZEPHIR_CALL_METHOD(NULL, _5, "__construct", NULL, 4, _12); zephir_check_call_status(); zephir_throw_exception_debug(_5, "xs/fieldmeta.zep", 133 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_NVAR(tokenizer); if (zephir_fast_strlen_ev(arg) > 0) { zephir_fetch_safe_class(_14, name); _15 = zend_fetch_class(Z_STRVAL_P(_14), Z_STRLEN_P(_14), ZEND_FETCH_CLASS_AUTO TSRMLS_CC); object_init_ex(tokenizer, _15); if (zephir_has_constructor(tokenizer TSRMLS_CC)) { ZEPHIR_CALL_METHOD(NULL, tokenizer, "__construct", NULL, 0, arg); zephir_check_call_status(); } } else { zephir_fetch_safe_class(_16, name); _17 = zend_fetch_class(Z_STRVAL_P(_16), Z_STRLEN_P(_16), ZEND_FETCH_CLASS_AUTO TSRMLS_CC); object_init_ex(tokenizer, _17); if (zephir_has_constructor(tokenizer TSRMLS_CC)) { ZEPHIR_CALL_METHOD(NULL, tokenizer, "__construct", NULL, 0); zephir_check_call_status(); } } if (unlikely(!((zephir_instance_of_ev(tokenizer, xs_tokenizer_ce TSRMLS_CC))))) { ZEPHIR_INIT_NVAR(_5); object_init_ex(_5, xs_exception_ce); _10 = zephir_fetch_nproperty_this(this_ptr, SL("name"), PH_NOISY_CC); ZEPHIR_INIT_LNVAR(_12); ZEPHIR_CONCAT_VSVS(_12, name, " for field `", _10, "` does not implement Tokenizer interface"); ZEPHIR_CALL_METHOD(NULL, _5, "__construct", NULL, 4, _12); zephir_check_call_status(); zephir_throw_exception_debug(_5, "xs/fieldmeta.zep", 143 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_OBS_NVAR(_8); zephir_read_property_this(&_8, this_ptr, SL("tokenizer"), PH_NOISY_CC); zephir_update_static_property_array_multi_ce(xs_fieldmeta_ce, SL("tokenizers"), &tokenizer TSRMLS_CC, SL("z"), 1, _8); RETURN_CCTOR(tokenizer); }
/** * Writes the log to the stream itself * * @link http://www.firephp.org/Wiki/Reference/Protocol */ PHP_METHOD(Phalcon_Logger_Adapter_Firephp, logInternal) { HashTable *_10; HashPosition _9; zephir_fcall_cache_entry *_4 = NULL; zval *context = NULL; int type, time, ZEPHIR_LAST_CALL_STATUS; zval *message_param = NULL, *type_param = NULL, *time_param = NULL, *context_param = NULL, *chunk = NULL, *format = NULL, *chString = NULL, *content = NULL, *key = NULL, *_0, *_2, *_5 = NULL, *_6, *_7, _8, **_11, *_1$$3, _3$$4 = zval_used_for_init, *_12$$5 = NULL, *_13$$5, *_14$$5; zval *message = NULL; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 4, 0, &message_param, &type_param, &time_param, &context_param); zephir_get_strval(message, message_param); type = zephir_get_intval(type_param); time = zephir_get_intval(time_param); zephir_get_arrval(context, context_param); _0 = zephir_fetch_static_property_ce(phalcon_logger_adapter_firephp_ce, SL("_index") TSRMLS_CC); if (Z_TYPE_P(_0) == IS_NULL) { ZEPHIR_INIT_ZVAL_NREF(_1$$3); ZVAL_LONG(_1$$3, 1); zephir_update_static_property_ce(phalcon_logger_adapter_firephp_ce, SL("_index"), &_1$$3 TSRMLS_CC); } _2 = zephir_fetch_static_property_ce(phalcon_logger_adapter_firephp_ce, SL("_initialized") TSRMLS_CC); if (!ZEPHIR_IS_TRUE_IDENTICAL(_2)) { ZEPHIR_SINIT_VAR(_3$$4); ZVAL_STRING(&_3$$4, "X-Wf-Protocol-1: http://meta.wildfirehq.org/Protocol/JsonStream/0.2", 0); ZEPHIR_CALL_FUNCTION(NULL, "header", &_4, 238, &_3$$4); zephir_check_call_status(); ZEPHIR_SINIT_NVAR(_3$$4); ZVAL_STRING(&_3$$4, "X-Wf-1-Plugin-1: http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3", 0); ZEPHIR_CALL_FUNCTION(NULL, "header", &_4, 238, &_3$$4); zephir_check_call_status(); ZEPHIR_SINIT_NVAR(_3$$4); ZVAL_STRING(&_3$$4, "X-Wf-Structure-1: http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1", 0); ZEPHIR_CALL_FUNCTION(NULL, "header", &_4, 238, &_3$$4); zephir_check_call_status(); zephir_update_static_property_ce(phalcon_logger_adapter_firephp_ce, SL("_initialized"), &ZEPHIR_GLOBAL(global_true) TSRMLS_CC); } ZEPHIR_CALL_METHOD(&_5, this_ptr, "getformatter", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(_6); ZVAL_LONG(_6, type); ZEPHIR_INIT_VAR(_7); ZVAL_LONG(_7, time); ZEPHIR_CALL_METHOD(&format, _5, "format", NULL, 0, message, _6, _7, context); zephir_check_call_status(); ZEPHIR_SINIT_VAR(_8); ZVAL_LONG(&_8, 4500); ZEPHIR_CALL_FUNCTION(&chunk, "str_split", NULL, 71, format, &_8); zephir_check_call_status(); zephir_is_iterable(chunk, &_10, &_9, 0, 0, "phalcon/logger/adapter/firephp.zep", 96); for ( ; zephir_hash_get_current_data_ex(_10, (void**) &_11, &_9) == SUCCESS ; zephir_hash_move_forward_ex(_10, &_9) ) { ZEPHIR_GET_HMKEY(key, _10, _9); ZEPHIR_GET_HVALUE(chString, _11); ZEPHIR_OBS_NVAR(_12$$5); zephir_read_static_property_ce(&_12$$5, phalcon_logger_adapter_firephp_ce, SL("_index") TSRMLS_CC); ZEPHIR_INIT_NVAR(content); ZEPHIR_CONCAT_SVSV(content, "X-Wf-1-1-1-", _12$$5, ": ", chString); if (zephir_array_isset_long(chunk, (zephir_get_numberval(key) + 1))) { zephir_concat_self_str(&content, SL("|\\") TSRMLS_CC); } ZEPHIR_CALL_FUNCTION(NULL, "header", &_4, 238, content); zephir_check_call_status(); _13$$5 = zephir_fetch_static_property_ce(phalcon_logger_adapter_firephp_ce, SL("_index") TSRMLS_CC); ZEPHIR_INIT_ZVAL_NREF(_14$$5); ZVAL_LONG(_14$$5, (zephir_get_numberval(_13$$5) + 1)); zephir_update_static_property_ce(phalcon_logger_adapter_firephp_ce, SL("_index"), &_14$$5 TSRMLS_CC); } ZEPHIR_MM_RESTORE(); }