PHP_METHOD(Test_Instanceoff, testInstanceOf8) { zend_long ZEPHIR_LAST_CALL_STATUS; zval *test_param = NULL, a; zval test; zval *this_ptr = getThis(); ZVAL_UNDEF(&test); ZVAL_UNDEF(&a); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &test_param); zephir_get_strval(&test, test_param); ZEPHIR_INIT_VAR(&a); object_init_ex(&a, test_instanceoff_ce); if (zephir_has_constructor(&a TSRMLS_CC)) { ZEPHIR_CALL_METHOD(NULL, &a, "__construct", NULL, 0); zephir_check_call_status(); } RETURN_MM_BOOL(zephir_is_instance_of(&a, Z_STRVAL_P(&test), Z_STRLEN_P(&test) TSRMLS_CC)); }
/** * @param \Ouchbase\UnitOfWork unitOfWork * @param \Ouchbase\IdentityMap identityMap * @param \Couchbase couchbase */ PHP_METHOD(Ouchbase_Repository, __construct) { zval *unitOfWork, *identityMap, *couchbase, *_0; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 3, 0, &unitOfWork, &identityMap, &couchbase); if (!(zephir_instance_of_ev(unitOfWork, ouchbase_unitofwork_ce TSRMLS_CC))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Parameter 'unitOfWork' must be an instance of 'Ouchbase\\UnitOfWork'", "", 0); return; } if (!(zephir_instance_of_ev(identityMap, ouchbase_identitymap_ce TSRMLS_CC))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Parameter 'identityMap' must be an instance of 'Ouchbase\\IdentityMap'", "", 0); return; } if (!(zephir_is_instance_of(couchbase, SL("Couchbase") TSRMLS_CC))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Parameter 'couchbase' must be an instance of 'Couchbase'", "", 0); return; } zephir_update_property_this(this_ptr, SL("uow"), unitOfWork TSRMLS_CC); zephir_update_property_this(this_ptr, SL("im"), identityMap TSRMLS_CC); zephir_update_property_this(this_ptr, SL("cb"), couchbase TSRMLS_CC); ZEPHIR_INIT_VAR(_0); array_init(_0); zephir_update_property_this(this_ptr, SL("_propertyReflections"), _0 TSRMLS_CC); ZEPHIR_MM_RESTORE(); }
PHP_METHOD(phalcon_26__closure, __invoke) { zend_bool _1; zval *element, element_sub, _0, _2; zval *this_ptr = getThis(); ZVAL_UNDEF(&element_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &element); ZEPHIR_OBS_VAR(&_0); zephir_array_fetch_long(&_0, element, 0, PH_NOISY, "phalcon/validation.zep", 53 TSRMLS_CC); _1 = Z_TYPE_P(&_0) != IS_ARRAY; if (!(_1)) { ZEPHIR_OBS_VAR(&_2); zephir_array_fetch_long(&_2, element, 1, PH_NOISY, "phalcon/validation.zep", 53 TSRMLS_CC); _1 = !(zephir_is_instance_of(&_2, SL("phalcon\\CombinedFieldsValidator") TSRMLS_CC)); } RETURN_MM_BOOL(_1); }
/** * Sets the expiration time for this cache item. * * @param \DateTimeInterface expiration * The point in time after which the item MUST be considered expired. * If null is passed explicitly, a default value MAY be used. If none is set, * the value should be stored permanently or for as long as the * implementation allows. * * @return \Xpl\Cache\Item The called object. */ PHP_METHOD(Xpl_Cache_Item, expiresAt) { int ZEPHIR_LAST_CALL_STATUS; zval *expiration, *_0$$3, *_1$$3, *_2$$3, *_3$$5 = NULL, *_4$$5, *_5$$5, *_6$$6, *_7$$6 = NULL, _8$$6, *_9$$6 = NULL; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &expiration); if (Z_TYPE_P(expiration) == IS_NULL) { ZEPHIR_INIT_VAR(_0$$3); zephir_time(_0$$3); _1$$3 = zephir_fetch_nproperty_this(this_ptr, SL("defaultTtl"), PH_NOISY_CC); ZEPHIR_INIT_VAR(_2$$3); zephir_add_function(_2$$3, _0$$3, _1$$3); zephir_update_property_this(this_ptr, SL("expires"), _2$$3 TSRMLS_CC); } else { if (zephir_is_instance_of(expiration, SL("DateTimeInterface") TSRMLS_CC)) { ZEPHIR_INIT_VAR(_4$$5); ZVAL_STRING(_4$$5, "U", ZEPHIR_TEMP_PARAM_COPY); ZEPHIR_CALL_METHOD(&_3$$5, expiration, "format", NULL, 0, _4$$5); zephir_check_temp_parameter(_4$$5); zephir_check_call_status(); ZEPHIR_INIT_ZVAL_NREF(_5$$5); ZVAL_LONG(_5$$5, zephir_get_intval(_3$$5)); zephir_update_property_this(this_ptr, SL("expires"), _5$$5 TSRMLS_CC); } else { ZEPHIR_INIT_VAR(_6$$6); object_init_ex(_6$$6, xpl_cache_invalidargumentexception_ce); ZEPHIR_INIT_VAR(_7$$6); if (Z_TYPE_P(expiration) == IS_OBJECT) { ZEPHIR_INIT_NVAR(_7$$6); zephir_get_class(_7$$6, expiration, 0 TSRMLS_CC); } else { ZEPHIR_INIT_NVAR(_7$$6); zephir_gettype(_7$$6, expiration TSRMLS_CC); } ZEPHIR_SINIT_VAR(_8$$6); ZVAL_STRING(&_8$$6, "Expiration date must be null or instance of DateTimeInterface, given: \"%s\".", 0); ZEPHIR_CALL_FUNCTION(&_9$$6, "sprintf", NULL, 41, &_8$$6, _7$$6); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, _6$$6, "__construct", NULL, 42, _9$$6); zephir_check_call_status(); zephir_throw_exception_debug(_6$$6, "xpl/cache/item.zep", 147 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } } RETURN_THIS(); }
PHP_METHOD(Test_Test, setParam) { zval *param; zephir_fetch_params(0, 1, 0, ¶m); if (!(zephir_is_instance_of(param, SL("Param") TSRMLS_CC))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(spl_ce_InvalidArgumentException, "Parameter 'param' must be an instance of 'Param'", "", 0); return; } }
PHP_METHOD(ADOdb_Connection, setCache) { zval *cache; zephir_fetch_params(0, 1, 0, &cache); if (!(zephir_is_instance_of(cache, SL("ADOdb\\ADOdb\\Cache") TSRMLS_CC))) { ZEPHIR_THROW_EXCEPTION_STRW(spl_ce_InvalidArgumentException, "Parameter 'cache' must be an instance of 'ADOdb\\ADOdb\\Cache'"); return; } zephir_update_property_this(this_ptr, SL("cache"), cache TSRMLS_CC); }
/** * Run a command that will talk to the connection * * @param Command command * @return boolean */ PHP_METHOD(ADOdb_Connection, execCommand) { zval *command; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &command); if (!(zephir_is_instance_of(command, SL("ADOdb\\Command") TSRMLS_CC))) { ZEPHIR_THROW_EXCEPTION_STR(spl_ce_InvalidArgumentException, "Parameter 'command' must be an instance of 'ADOdb\\Command'"); return; } zephir_call_method_p1(return_value, command, "execute", this_ptr); RETURN_MM(); }
PHP_METHOD(Test_Instanceoff, testInstanceOf9) { zval test; zval *a, a_sub, *test_param = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&a_sub); ZVAL_UNDEF(&test); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 2, 0, &a, &test_param); zephir_get_strval(&test, test_param); RETURN_MM_BOOL(zephir_is_instance_of(a, Z_STRVAL_P(&test), Z_STRLEN_P(&test) TSRMLS_CC)); }
PHP_METHOD(Dgafka_BookStore_Business_Service_Dto_Command_Book_ChangeInformationsCommand, __construct) { zval *name = NULL, *description = NULL; zval *guid, *name_param = NULL, *description_param = NULL; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 3, 0, &guid, &name_param, &description_param); zephir_get_strval(name, name_param); zephir_get_strval(description, description_param); if (!(zephir_is_instance_of(guid, SL("Dgafka\\BookStore\\Business\\Service\\Dto\\Command\\Book\\ValueObject\\Guid") TSRMLS_CC))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Parameter 'guid' must be an instance of 'Dgafka\\BookStore\\Business\\Service\\Dto\\Command\\Book\\ValueObject\\Guid'", "", 0); return; } zephir_update_property_this(this_ptr, SL("guid"), guid TSRMLS_CC); zephir_update_property_this(this_ptr, SL("name"), name TSRMLS_CC); zephir_update_property_this(this_ptr, SL("description"), description TSRMLS_CC); ZEPHIR_MM_RESTORE(); }
PHP_METHOD(ADOdb_Cache, serializeStatement) { zval *statement, *_0, *_1, _2; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &statement); if (!(zephir_is_instance_of(statement, SL("ADOdb\\Statement") TSRMLS_CC))) { ZEPHIR_THROW_EXCEPTION_STR(spl_ce_InvalidArgumentException, "Parameter 'statement' must be an instance of 'ADOdb\\Statement'"); return; } ZEPHIR_INIT_VAR(_0); zephir_call_method(_0, statement, "dump"); ZEPHIR_INIT_VAR(_1); zephir_call_func_p1(_1, "serialize", _0); ZEPHIR_SINIT_VAR(_2); ZVAL_LONG(&_2, 3); zephir_call_func_p2(return_value, "gzcompress", _1, &_2); RETURN_MM(); }
PHP_METHOD(PhalconPlus_Db_Mysql, getConnection) { zephir_nts_static zephir_fcall_cache_entry *_4 = NULL, *_7 = NULL; zephir_fcall_cache_entry *_1 = NULL; int ZEPHIR_LAST_CALL_STATUS, _5; zval *connection = NULL, *tryTimes = NULL, *e = NULL, *_0, *_2 = NULL, *_3 = NULL, _6 = zval_used_for_init; ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(connection); ZVAL_NULL(connection); ZEPHIR_INIT_VAR(tryTimes); ZVAL_LONG(tryTimes, 5); while (1) { if (!(!(Z_TYPE_P(connection) == IS_OBJECT))) { break; } /* try_start_1: */ ZEPHIR_INIT_NVAR(connection); object_init_ex(connection, zephir_get_internal_ce(SS("phalcon\\db\\adapter\\pdo\\mysql") TSRMLS_CC)); _0 = zephir_fetch_nproperty_this(this_ptr, SL("descriptor"), PH_NOISY_CC); ZEPHIR_CALL_METHOD(NULL, connection, "__construct", &_1, _0); zephir_check_call_status_or_jump(try_end_1); try_end_1: if (EG(exception)) { ZEPHIR_CPY_WRT(e, EG(exception)); if (zephir_is_instance_of(e, SL("PhalconPlus\\Db\\Exception") TSRMLS_CC)) { zend_clear_exception(TSRMLS_C); ZEPHIR_INIT_NVAR(_2); _0 = zephir_fetch_nproperty_this(this_ptr, SL("descriptor"), PH_NOISY_CC); zephir_json_encode(_2, &(_2), _0, 0 TSRMLS_CC); ZEPHIR_INIT_LNVAR(_3); ZEPHIR_CONCAT_SV(_3, "PHP Fatal error: PhalconPlus::Db::MySQL::connect() failed to connect to MySQL. Detail: ", _2); ZEPHIR_CALL_FUNCTION(NULL, "error_log", &_4, _3); zephir_check_call_status(); _5 = (zephir_get_numberval(tryTimes) - 1); ZEPHIR_INIT_NVAR(tryTimes); ZVAL_LONG(tryTimes, _5); if (ZEPHIR_GT_LONG(tryTimes, 0)) { ZEPHIR_SINIT_NVAR(_6); ZVAL_LONG(&_6, 100000); ZEPHIR_CALL_FUNCTION(NULL, "usleep", &_7, &_6); zephir_check_call_status(); ZEPHIR_SINIT_NVAR(_6); ZVAL_STRING(&_6, "PHP Notice: PhalconPlus::Db::MySQL::connnect() retry to connect to MySQL for the time ... ", 0); ZEPHIR_CALL_FUNCTION(NULL, "error_log", &_4, &_6); zephir_check_call_status(); } else { ZEPHIR_SINIT_NVAR(_6); ZVAL_STRING(&_6, "PHP Fatal error: PhalconPlus::Db::MySQL::connect() finally failed to connect to MySQL", 0); ZEPHIR_CALL_FUNCTION(NULL, "error_log", &_4, &_6); zephir_check_call_status(); zephir_throw_exception_debug(e, "phalconplus/Db/Mysql.zep", 52 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } } } } RETURN_CCTOR(connection); }
PHP_METHOD(Test_Exceptions, testMultiException) { zend_bool _1$$4, _3$$7, _5$$10, _7$$13; zend_long ZEPHIR_LAST_CALL_STATUS; zval *returnValue, returnValue_sub, *exception, exception_sub, e, f, iexc, exc, _0, _2$$4, _4$$7, _6$$10, _8$$13; zval *this_ptr = getThis(); ZVAL_UNDEF(&returnValue_sub); ZVAL_UNDEF(&exception_sub); ZVAL_UNDEF(&e); ZVAL_UNDEF(&f); ZVAL_UNDEF(&iexc); ZVAL_UNDEF(&exc); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_4$$7); ZVAL_UNDEF(&_6$$10); ZVAL_UNDEF(&_8$$13); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 2, 0, &returnValue, &exception); ZEPHIR_OBS_VAR(&iexc); zephir_read_property(&iexc, this_ptr, SL("internalExceptionCallable"), PH_NOISY_CC); ZEPHIR_OBS_VAR(&exc); zephir_read_property(&exc, this_ptr, SL("exceptionCallable"), PH_NOISY_CC); /* try_start_1: */ zephir_throw_exception_debug(exception, "test/exceptions.zep", 95 TSRMLS_CC); goto try_end_1; try_end_1: if (EG(exception)) { ZEPHIR_INIT_VAR(&_0); ZVAL_OBJ(&_0, EG(exception)); Z_ADDREF_P(&_0); if (zephir_instance_of_ev(&_0, test_exception_ce TSRMLS_CC)) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&e, &_0); _1$$4 = zephir_is_callable(&iexc TSRMLS_CC); if (_1$$4) { ZEPHIR_CALL_ZVAL_FUNCTION(&_2$$4, &iexc, NULL, 0); zephir_check_call_status(); _1$$4 = ZEPHIR_IS_FALSE_IDENTICAL(&_2$$4); } if (_1$$4) { } else { zephir_throw_exception_debug(&e, "test/exceptions.zep", 101 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } } else { if (zephir_instance_of_ev(&_0, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&e, &_0); _3$$7 = zephir_is_callable(&exc TSRMLS_CC); if (_3$$7) { ZEPHIR_CALL_ZVAL_FUNCTION(&_4$$7, &exc, NULL, 0); zephir_check_call_status(); _3$$7 = ZEPHIR_IS_FALSE_IDENTICAL(&_4$$7); } if (_3$$7) { } else { zephir_throw_exception_debug(&e, "test/exceptions.zep", 108 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } } else { if (zephir_is_instance_of(&_0, SL("RuntimeError") TSRMLS_CC)) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&f, &_0); _5$$10 = zephir_is_callable(&exc TSRMLS_CC); if (_5$$10) { ZEPHIR_CALL_ZVAL_FUNCTION(&_6$$10, &exc, NULL, 0); zephir_check_call_status(); _5$$10 = ZEPHIR_IS_FALSE_IDENTICAL(&_6$$10); } if (_5$$10) { } else { zephir_throw_exception_debug(&f, "test/exceptions.zep", 115 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } } else { if (zephir_is_instance_of(&_0, SL("LogicError") TSRMLS_CC)) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&f, &_0); _7$$13 = zephir_is_callable(&exc TSRMLS_CC); if (_7$$13) { ZEPHIR_CALL_ZVAL_FUNCTION(&_8$$13, &exc, NULL, 0); zephir_check_call_status(); _7$$13 = ZEPHIR_IS_FALSE_IDENTICAL(&_8$$13); } if (_7$$13) { } else { zephir_throw_exception_debug(&f, "test/exceptions.zep", 115 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } } } } } } RETVAL_ZVAL(returnValue, 1, 0); RETURN_MM(); }
/** * @todo cas argument is inconsistent here * * @param \Ouchbase\Entity entity * @param string|null cas * @throws \Ouchbase\Exception\EntityLogicException * @throws \Ouchbase\Exception\EntityModifiedException * @return this */ PHP_METHOD(Ouchbase_Repository, update) { zend_class_entry *_8; zval *_5 = NULL; int ZEPHIR_LAST_CALL_STATUS; zval *entity = NULL, *cas = NULL, *_0 = NULL, *data = NULL, *originalData = NULL, *_1, *_2 = NULL, *_3 = NULL, *_4, *_6 = NULL, *e = NULL, *_7 = NULL, *ex; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 1, &entity, &cas); ZEPHIR_SEPARATE_PARAM(entity); if (!cas) { cas = ZEPHIR_GLOBAL(global_null); } if (!(zephir_instance_of_ev(entity, ouchbase_entity_ce TSRMLS_CC))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Parameter 'entity' must be an instance of 'Ouchbase\\Entity'", "", 0); return; } if (zephir_instance_of_ev(entity, ouchbase_entityproxy_ce TSRMLS_CC)) { ZEPHIR_CALL_METHOD(&_0, entity, "isproxied", NULL); zephir_check_call_status(); if (!(zephir_is_true(_0))) { RETURN_THIS(); } ZEPHIR_CALL_METHOD(&entity, entity, "_getobject", NULL); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(&data, this_ptr, "toarray", NULL, entity); zephir_check_call_status(); _1 = zephir_fetch_nproperty_this(this_ptr, SL("im"), PH_NOISY_CC); ZEPHIR_CALL_METHOD(&originalData, _1, "getoriginaldata", NULL, entity); zephir_check_call_status(); if (!(zephir_is_true(originalData))) { ZEPHIR_INIT_VAR(_2); object_init_ex(_2, ouchbase_exception_entitylogicexception_ce); ZEPHIR_INIT_VAR(_3); ZVAL_STRING(_3, "was not registered in the identity map", 0); ZEPHIR_CALL_METHOD(NULL, _2, "__construct", NULL, entity, _3); zephir_check_temp_parameter(_3); zephir_check_call_status(); zephir_throw_exception_debug(_2, "ouchbase/Repository.zep", 215 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } if (ZEPHIR_IS_EQUAL(data, originalData)) { RETURN_THIS(); } _4 = zephir_fetch_nproperty_this(this_ptr, SL("im"), PH_NOISY_CC); ZEPHIR_CALL_METHOD(NULL, _4, "updateoriginaldata", NULL, entity, data); zephir_check_call_status(); if (!(zephir_is_true(cas))) { ZEPHIR_INIT_VAR(_5); array_init_size(_5, 3); ZEPHIR_CALL_METHOD(&_6, entity, "getid", NULL); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getkey", NULL, _6); zephir_check_call_status(); zephir_array_fast_append(_5, _0); ZEPHIR_INIT_NVAR(_3); zephir_json_encode(_3, &(_3), data, 0 TSRMLS_CC); zephir_array_fast_append(_5, _3); ZEPHIR_INIT_NVAR(_3); ZVAL_STRING(_3, "replace", 0); ZEPHIR_CALL_METHOD(NULL, this_ptr, "executewithouttimeouts", NULL, _3, _5); zephir_check_temp_parameter(_3); zephir_check_call_status(); RETURN_THIS(); } /* try_start_1: */ ZEPHIR_INIT_NVAR(_5); array_init_size(_5, 6); ZEPHIR_CALL_METHOD(&_7, entity, "getid", NULL); zephir_check_call_status_or_jump(try_end_1); ZEPHIR_CALL_METHOD(&_6, this_ptr, "getkey", NULL, _7); zephir_check_call_status_or_jump(try_end_1); zephir_array_fast_append(_5, _6); ZEPHIR_INIT_NVAR(_3); zephir_json_encode(_3, &(_3), data, 0 TSRMLS_CC); zephir_array_fast_append(_5, _3); ZEPHIR_INIT_NVAR(_3); ZVAL_LONG(_3, 0); zephir_array_fast_append(_5, _3); zephir_array_fast_append(_5, cas); ZEPHIR_INIT_NVAR(_3); ZVAL_STRING(_3, "replace", 0); ZEPHIR_CALL_METHOD(&_0, this_ptr, "executewithouttimeouts", NULL, _3, _5); zephir_check_temp_parameter(_3); zephir_check_call_status_or_jump(try_end_1); if (!(zephir_is_true(_0))) { ZEPHIR_INIT_LNVAR(_2); _8 = zend_fetch_class(SL("CouchbaseKeyMutatedException"), ZEND_FETCH_CLASS_AUTO TSRMLS_CC); object_init_ex(_2, _8); ZEPHIR_CALL_METHOD(NULL, _2, "__construct", NULL); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(_2, "ouchbase/Repository.zep", 233 TSRMLS_CC); goto try_end_1; } RETURN_THIS(); try_end_1: ZEPHIR_CPY_WRT(e, EG(exception)); if (zephir_is_instance_of(e, SL("CouchbaseKeyMutatedException") TSRMLS_CC)) { zend_clear_exception(TSRMLS_C); ZEPHIR_INIT_VAR(ex); object_init_ex(ex, ouchbase_exception_entitymodifiedexception_ce); ZEPHIR_INIT_NVAR(_3); ZVAL_STRING(_3, "was modified", 0); ZEPHIR_CALL_METHOD(NULL, ex, "__construct", NULL, entity, _3); zephir_check_temp_parameter(_3); zephir_check_call_status(); ZEPHIR_INIT_NVAR(_3); ZVAL_STRING(_3, "update", 0); ZEPHIR_CALL_METHOD(NULL, ex, "setaction", NULL, _3); zephir_check_temp_parameter(_3); zephir_check_call_status(); zephir_throw_exception_debug(ex, "ouchbase/Repository.zep", 242 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } RETURN_THIS(); }
PHP_METHOD(Auryn_AbstractCachingReflector, getParamTypeHint) { int ZEPHIR_LAST_CALL_STATUS; zval *function, *param, *lowParam, *lowClass, *lowMethod, *lowFunc, *paramCacheKey = NULL, *classCacheKey, *typeHint = NULL, *reflectionClass = NULL, *_0, *_1 = NULL, *_2, *_3, *_4; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 2, 0, &function, ¶m); if (!(zephir_is_instance_of(function, SL("ReflectionFunctionAbstract") TSRMLS_CC))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Parameter 'function' must be an instance of 'ReflectionFunctionAbstract'", "", 0); return; } if (!(zephir_is_instance_of(param, SL("ReflectionParameter") TSRMLS_CC))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Parameter 'param' must be an instance of 'ReflectionParameter'", "", 0); return; } ZEPHIR_INIT_VAR(lowParam); ZEPHIR_OBS_VAR(_0); zephir_read_property(&_0, param, SL("name"), PH_NOISY_CC); zephir_fast_strtolower(lowParam, _0); if (zephir_is_instance_of(function, SL("ReflectionMethod") TSRMLS_CC)) { ZEPHIR_INIT_VAR(lowClass); ZEPHIR_OBS_VAR(_1); zephir_read_property(&_1, function, SL("class"), PH_NOISY_CC); zephir_fast_strtolower(lowClass, _1); ZEPHIR_INIT_VAR(lowMethod); ZEPHIR_OBS_VAR(_2); zephir_read_property(&_2, function, SL("name"), PH_NOISY_CC); zephir_fast_strtolower(lowMethod, _2); ZEPHIR_INIT_VAR(paramCacheKey); ZEPHIR_CONCAT_SVSVSVSV(paramCacheKey, "auryn.refls.classes.", lowClass, ".", lowMethod, ".", param, "-", lowParam); } else { ZEPHIR_INIT_VAR(lowFunc); ZEPHIR_OBS_NVAR(_1); zephir_read_property(&_1, function, SL("name"), PH_NOISY_CC); zephir_fast_strtolower(lowFunc, _1); ZEPHIR_INIT_NVAR(paramCacheKey); if (!ZEPHIR_IS_STRING(lowFunc, "{closure}")) { ZEPHIR_CONCAT_SSVSVSV(paramCacheKey, "auryn.refls.funcs.", ".", lowFunc, ".", param, "-", lowParam); } else { ZVAL_NULL(paramCacheKey); } } if (Z_TYPE_P(paramCacheKey) == IS_NULL) { ZEPHIR_INIT_VAR(typeHint); ZVAL_BOOL(typeHint, 0); } else { _3 = zephir_fetch_nproperty_this(this_ptr, SL("cache"), PH_NOISY_CC); ZEPHIR_CALL_METHOD(&typeHint, _3, "fetch", NULL, paramCacheKey); zephir_check_call_status(); } if (!ZEPHIR_IS_FALSE(typeHint)) { RETURN_CCTOR(typeHint); } ZEPHIR_CALL_METHOD(&reflectionClass, param, "getclass", NULL); zephir_check_call_status(); if (zephir_is_true(reflectionClass)) { ZEPHIR_CALL_METHOD(&typeHint, reflectionClass, "getname", NULL); zephir_check_call_status(); ZEPHIR_INIT_VAR(_4); zephir_fast_strtolower(_4, typeHint); ZEPHIR_INIT_VAR(classCacheKey); ZEPHIR_CONCAT_SV(classCacheKey, "auryn.refls.classes.", _4); _3 = zephir_fetch_nproperty_this(this_ptr, SL("cache"), PH_NOISY_CC); ZEPHIR_CALL_METHOD(NULL, _3, "store", NULL, classCacheKey, reflectionClass); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(typeHint); ZVAL_NULL(typeHint); } _3 = zephir_fetch_nproperty_this(this_ptr, SL("cache"), PH_NOISY_CC); ZEPHIR_CALL_METHOD(NULL, _3, "store", NULL, paramCacheKey, typeHint); zephir_check_call_status(); RETURN_CCTOR(typeHint); }