本文整理汇总了C++中zephir_array_isset_string函数的典型用法代码示例。如果您正苦于以下问题:C++ zephir_array_isset_string函数的具体用法?C++ zephir_array_isset_string怎么用?C++ zephir_array_isset_string使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zephir_array_isset_string函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PHP_METHOD
/**
* Phalcon\Mvc\Model\MetaData\Memcache constructor
*
* @param array options
*/
PHP_METHOD(Phalcon_Mvc_Model_MetaData_Memcache, __construct) {
zval *_6;
int ZEPHIR_LAST_CALL_STATUS;
zval *options = NULL, *ttl = NULL, *_4, *_5, *_7, *_0$$4, *_1$$5, *_2$$6, *_3$$7;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 0, 1, &options);
if (!options) {
ZEPHIR_CPY_WRT(options, ZEPHIR_GLOBAL(global_null));
} else {
ZEPHIR_SEPARATE_PARAM(options);
}
if (Z_TYPE_P(options) != IS_ARRAY) {
ZEPHIR_INIT_NVAR(options);
array_init(options);
}
if (!(zephir_array_isset_string(options, SS("host")))) {
ZEPHIR_INIT_VAR(_0$$4);
ZVAL_STRING(_0$$4, "127.0.0.1", 1);
zephir_array_update_string(&options, SL("host"), &_0$$4, PH_COPY | PH_SEPARATE);
}
if (!(zephir_array_isset_string(options, SS("port")))) {
ZEPHIR_INIT_VAR(_1$$5);
ZVAL_LONG(_1$$5, 11211);
zephir_array_update_string(&options, SL("port"), &_1$$5, PH_COPY | PH_SEPARATE);
}
if (!(zephir_array_isset_string(options, SS("persistent")))) {
ZEPHIR_INIT_VAR(_2$$6);
ZVAL_LONG(_2$$6, 0);
zephir_array_update_string(&options, SL("persistent"), &_2$$6, PH_COPY | PH_SEPARATE);
}
if (!(zephir_array_isset_string(options, SS("statsKey")))) {
ZEPHIR_INIT_VAR(_3$$7);
ZVAL_STRING(_3$$7, "_PHCM_MM", 1);
zephir_array_update_string(&options, SL("statsKey"), &_3$$7, PH_COPY | PH_SEPARATE);
}
if (zephir_array_isset_string_fetch(&ttl, options, SS("lifetime"), 1 TSRMLS_CC)) {
zephir_update_property_this(this_ptr, SL("_ttl"), ttl TSRMLS_CC);
}
ZEPHIR_INIT_VAR(_4);
object_init_ex(_4, phalcon_cache_backend_memcache_ce);
ZEPHIR_INIT_VAR(_5);
object_init_ex(_5, phalcon_cache_frontend_data_ce);
ZEPHIR_INIT_VAR(_6);
zephir_create_array(_6, 1, 0 TSRMLS_CC);
ZEPHIR_OBS_VAR(_7);
zephir_read_property_this(&_7, this_ptr, SL("_ttl"), PH_NOISY_CC);
zephir_array_update_string(&_6, SL("lifetime"), &_7, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, _5, "__construct", NULL, 332, _6);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, _4, "__construct", NULL, 335, _5, options);
zephir_check_call_status();
zephir_update_property_this(this_ptr, SL("_memcache"), _4 TSRMLS_CC);
ZEPHIR_MM_RESTORE();
}
示例2: PHP_METHOD
/**
* Phalcon\Queue\Beanstalk
*
* @param array options
*/
PHP_METHOD(Phalcon_Queue_Beanstalk, __construct) {
zval *options = NULL, *parameters = NULL, *_0$$5, *_1$$6;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 0, 1, &options);
if (!options) {
options = ZEPHIR_GLOBAL(global_null);
}
if (Z_TYPE_P(options) != IS_ARRAY) {
ZEPHIR_INIT_VAR(parameters);
array_init(parameters);
} else {
ZEPHIR_CPY_WRT(parameters, options);
}
if (!(zephir_array_isset_string(parameters, SS("host")))) {
ZEPHIR_INIT_VAR(_0$$5);
ZVAL_STRING(_0$$5, "127.0.0.1", 1);
zephir_array_update_string(¶meters, SL("host"), &_0$$5, PH_COPY | PH_SEPARATE);
}
if (!(zephir_array_isset_string(parameters, SS("port")))) {
ZEPHIR_INIT_VAR(_1$$6);
ZVAL_LONG(_1$$6, 11300);
zephir_array_update_string(¶meters, SL("port"), &_1$$6, PH_COPY | PH_SEPARATE);
}
zephir_update_property_this(this_ptr, SL("_parameters"), parameters TSRMLS_CC);
ZEPHIR_MM_RESTORE();
}
示例3: PHP_METHOD
/**
* Check if the current page use SSL connection on not
*
* @return bool uses SSL
*/
PHP_METHOD(Phady_Util_Tools, usingSecureMode) {
zval *_SERVER, *_0, *_2 = NULL, *_3;
zend_bool secureMode, _1;
ZEPHIR_MM_GROW();
zephir_get_global(&_SERVER, SS("_SERVER") TSRMLS_CC);
if (zephir_array_isset_string(_SERVER, SS("HTTPS"))) {
zephir_array_fetch_string(&_0, _SERVER, SL("HTTPS"), PH_NOISY | PH_READONLY, "phady/util/tools.zep", 113 TSRMLS_CC);
_1 = ZEPHIR_IS_LONG(_0, 1);
if (!(_1)) {
ZEPHIR_INIT_VAR(_2);
zephir_array_fetch_string(&_3, _SERVER, SL("HTTPS"), PH_NOISY | PH_READONLY, "phady/util/tools.zep", 113 TSRMLS_CC);
zephir_fast_strtolower(_2, _3);
_1 = ZEPHIR_IS_STRING(_2, "on");
}
secureMode = _1;
} else if (zephir_array_isset_string(_SERVER, SS("SSL"))) {
zephir_array_fetch_string(&_0, _SERVER, SL("SSL"), PH_NOISY | PH_READONLY, "phady/util/tools.zep", 117 TSRMLS_CC);
_1 = ZEPHIR_IS_LONG(_0, 1);
if (!(_1)) {
ZEPHIR_INIT_NVAR(_2);
zephir_array_fetch_string(&_3, _SERVER, SL("SSL"), PH_NOISY | PH_READONLY, "phady/util/tools.zep", 117 TSRMLS_CC);
zephir_fast_strtolower(_2, _3);
_1 = ZEPHIR_IS_STRING(_2, "on");
}
secureMode = _1;
} else {
secureMode = 0;
}
RETURN_MM_BOOL(secureMode);
}
示例4: PHP_METHOD
/**
* Phalcon\Queue\Beanstalk
*/
PHP_METHOD(Phalcon_Queue_Beanstalk, __construct) {
zval *parameters_param = NULL, *_0$$3, *_1$$4;
zval *parameters = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 0, 1, ¶meters_param);
if (!parameters_param) {
ZEPHIR_INIT_VAR(parameters);
array_init(parameters);
} else {
zephir_get_arrval(parameters, parameters_param);
}
if (!(zephir_array_isset_string(parameters, SS("host")))) {
ZEPHIR_INIT_VAR(_0$$3);
ZVAL_STRING(_0$$3, "127.0.0.1", 1);
zephir_array_update_string(¶meters, SL("host"), &_0$$3, PH_COPY | PH_SEPARATE);
}
if (!(zephir_array_isset_string(parameters, SS("port")))) {
ZEPHIR_INIT_VAR(_1$$4);
ZVAL_LONG(_1$$4, 11300);
zephir_array_update_string(¶meters, SL("port"), &_1$$4, PH_COPY | PH_SEPARATE);
}
if (!(zephir_array_isset_string(parameters, SS("persistent")))) {
zephir_array_update_string(¶meters, SL("persistent"), &ZEPHIR_GLOBAL(global_false), PH_COPY | PH_SEPARATE);
}
zephir_update_property_this(this_ptr, SL("_parameters"), parameters TSRMLS_CC);
ZEPHIR_MM_RESTORE();
}
示例5: PHP_METHOD
/**
* Phalcon\Cache\Backend\Mongo constructor
*
* @param Phalcon\Cache\FrontendInterface frontend
* @param array options
*/
PHP_METHOD(Phalcon_Cache_Backend_Mongo, __construct) {
int ZEPHIR_LAST_CALL_STATUS;
zephir_nts_static zephir_fcall_cache_entry *_0 = NULL;
zval *frontend, *options = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &frontend, &options);
if (!options) {
options = ZEPHIR_GLOBAL(global_null);
}
if (!(zephir_array_isset_string(options, SS("mongo")))) {
if (!(zephir_array_isset_string(options, SS("server")))) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_cache_exception_ce, "The parameter 'server' is required", "phalcon/cache/backend/mongo.zep", 70);
return;
}
}
if (!(zephir_array_isset_string(options, SS("db")))) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_cache_exception_ce, "The parameter 'db' is required", "phalcon/cache/backend/mongo.zep", 75);
return;
}
if (!(zephir_array_isset_string(options, SS("collection")))) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_cache_exception_ce, "The parameter 'collection' is required", "phalcon/cache/backend/mongo.zep", 79);
return;
}
ZEPHIR_CALL_PARENT(NULL, phalcon_cache_backend_mongo_ce, this_ptr, "__construct", &_0, frontend, options);
zephir_check_call_status();
ZEPHIR_MM_RESTORE();
}
示例6: PHP_METHOD
/**
* Phalcon\Cache\Backend\Redis constructor
*
* @param Phalcon\Cache\FrontendInterface frontend
* @param array options
*/
PHP_METHOD(Phalcon_Cache_Backend_Redis, __construct) {
int ZEPHIR_LAST_CALL_STATUS;
zephir_fcall_cache_entry *_3 = NULL;
zend_bool _1;
zval *frontend, *options = NULL, *_0 = NULL, *_2;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &frontend, &options);
if (!options) {
ZEPHIR_CPY_WRT(options, ZEPHIR_GLOBAL(global_null));
} else {
ZEPHIR_SEPARATE_PARAM(options);
}
if (Z_TYPE_P(options) != IS_ARRAY) {
ZEPHIR_INIT_NVAR(options);
array_init(options);
}
if (!(zephir_array_isset_string(options, SS("host")))) {
ZEPHIR_INIT_VAR(_0);
ZVAL_STRING(_0, "127.0.0.1", 1);
zephir_array_update_string(&options, SL("host"), &_0, PH_COPY | PH_SEPARATE);
}
if (!(zephir_array_isset_string(options, SS("port")))) {
ZEPHIR_INIT_NVAR(_0);
ZVAL_LONG(_0, 6379);
zephir_array_update_string(&options, SL("port"), &_0, PH_COPY | PH_SEPARATE);
}
if (!(zephir_array_isset_string(options, SS("index")))) {
ZEPHIR_INIT_NVAR(_0);
ZVAL_LONG(_0, 0);
zephir_array_update_string(&options, SL("index"), &_0, PH_COPY | PH_SEPARATE);
}
if (!(zephir_array_isset_string(options, SS("persistent")))) {
zephir_array_update_string(&options, SL("persistent"), &ZEPHIR_GLOBAL(global_false), PH_COPY | PH_SEPARATE);
}
_1 = !(zephir_array_isset_string(options, SS("statsKey")));
if (!(_1)) {
zephir_array_fetch_string(&_2, options, SL("statsKey"), PH_NOISY | PH_READONLY, "phalcon/cache/backend/redis.zep", 90 TSRMLS_CC);
_1 = ZEPHIR_IS_EMPTY(_2);
}
if (_1) {
ZEPHIR_INIT_NVAR(_0);
ZVAL_STRING(_0, "_PHCR", 1);
zephir_array_update_string(&options, SL("statsKey"), &_0, PH_COPY | PH_SEPARATE);
}
ZEPHIR_CALL_PARENT(NULL, phalcon_cache_backend_redis_ce, this_ptr, "__construct", &_3, 103, frontend, options);
zephir_check_call_status();
ZEPHIR_MM_RESTORE();
}
示例7: PHP_METHOD
/**
* Phalcon\Mvc\Model\MetaData\Libmemcached constructor
*
* @param array options
*/
PHP_METHOD(Phalcon_Mvc_Model_MetaData_Libmemcached, __construct) {
int ZEPHIR_LAST_CALL_STATUS;
zval *_2;
zval *options = NULL, *ttl, *_0 = NULL, *_1, *_3, *_4;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 0, 1, &options);
if (!options) {
ZEPHIR_CPY_WRT(options, ZEPHIR_GLOBAL(global_null));
} else {
ZEPHIR_SEPARATE_PARAM(options);
}
if (Z_TYPE_P(options) != IS_ARRAY) {
ZEPHIR_INIT_NVAR(options);
array_init(options);
}
if (!(zephir_array_isset_string(options, SS("servers")))) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "No servers given in options", "phalcon/mvc/model/metadata/libmemcached.zep", 71);
return;
}
if (zephir_array_isset_string_fetch(&ttl, options, SS("lifetime"), 1 TSRMLS_CC)) {
zephir_update_property_this(this_ptr, SL("_ttl"), ttl TSRMLS_CC);
}
if (!(zephir_array_isset_string(options, SS("statsKey")))) {
ZEPHIR_INIT_VAR(_0);
ZVAL_STRING(_0, "_PHCM_MM", 1);
zephir_array_update_string(&options, SL("statsKey"), &_0, PH_COPY | PH_SEPARATE);
}
ZEPHIR_INIT_NVAR(_0);
object_init_ex(_0, phalcon_cache_backend_libmemcached_ce);
ZEPHIR_INIT_VAR(_1);
object_init_ex(_1, phalcon_cache_frontend_data_ce);
ZEPHIR_INIT_VAR(_2);
zephir_create_array(_2, 1, 0 TSRMLS_CC);
ZEPHIR_OBS_VAR(_3);
zephir_read_property_this(&_3, this_ptr, SL("_ttl"), PH_NOISY_CC);
zephir_array_update_string(&_2, SL("lifetime"), &_3, PH_COPY | PH_SEPARATE);
ZEPHIR_CALL_METHOD(NULL, _1, "__construct", NULL, 311, _2);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, _0, "__construct", NULL, 312, _1, options);
zephir_check_call_status();
zephir_update_property_this(this_ptr, SL("_memcache"), _0 TSRMLS_CC);
ZEPHIR_INIT_VAR(_4);
array_init(_4);
zephir_update_property_this(this_ptr, SL("_metaData"), _4 TSRMLS_CC);
ZEPHIR_MM_RESTORE();
}
示例8: PHP_METHOD
/**
* Phalcon\Cache\Backend\Memcache constructor
*
* @param array options
*/
PHP_METHOD(Phalcon_Cache_Backend_Libmemcached, __construct) {
zval _0$$4;
zend_long ZEPHIR_LAST_CALL_STATUS;
zephir_fcall_cache_entry *_2 = NULL;
zval *frontend, frontend_sub, *options = NULL, options_sub, __$null, servers, _1$$5;
zval *this_ptr = getThis();
ZVAL_UNDEF(&frontend_sub);
ZVAL_UNDEF(&options_sub);
ZVAL_NULL(&__$null);
ZVAL_UNDEF(&servers);
ZVAL_UNDEF(&_1$$5);
ZVAL_UNDEF(&_0$$4);
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &frontend, &options);
if (!options) {
options = &options_sub;
ZEPHIR_CPY_WRT(options, &__$null);
} else {
ZEPHIR_SEPARATE_PARAM(options);
}
if (Z_TYPE_P(options) != IS_ARRAY) {
ZEPHIR_INIT_NVAR(options);
array_init(options);
}
if (!(zephir_array_isset_string(options, SL("servers")))) {
ZEPHIR_INIT_VAR(&servers);
zephir_create_array(&servers, 1, 0 TSRMLS_CC);
ZEPHIR_INIT_VAR(&_0$$4);
zephir_create_array(&_0$$4, 3, 0 TSRMLS_CC);
add_assoc_stringl_ex(&_0$$4, SL("host"), SL("127.0.0.1"));
add_assoc_long_ex(&_0$$4, SL("port"), 11211);
add_assoc_long_ex(&_0$$4, SL("weight"), 1);
zephir_array_update_long(&servers, 0, &_0$$4, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY);
zephir_array_update_string(options, SL("servers"), &servers, PH_COPY | PH_SEPARATE);
}
if (!(zephir_array_isset_string(options, SL("statsKey")))) {
ZEPHIR_INIT_VAR(&_1$$5);
ZVAL_STRING(&_1$$5, "");
zephir_array_update_string(options, SL("statsKey"), &_1$$5, PH_COPY | PH_SEPARATE);
}
ZEPHIR_CALL_PARENT(NULL, phalcon_cache_backend_libmemcached_ce, getThis(), "__construct", &_2, 0, frontend, options);
zephir_check_call_status();
ZEPHIR_MM_RESTORE();
}
示例9: PHP_METHOD
/**
* Phalcon\Translate\Adapter\Csv constructor
*/
PHP_METHOD(Phalcon_Translate_Adapter_Csv, __construct) {
int ZEPHIR_LAST_CALL_STATUS;
zephir_fcall_cache_entry *_0 = NULL;
zval *options_param = NULL, *_1, *_2, *_3, *_4;
zval *options = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &options_param);
options = options_param;
ZEPHIR_CALL_PARENT(NULL, phalcon_translate_adapter_csv_ce, this_ptr, "__construct", &_0, 426, options);
zephir_check_call_status();
if (!(zephir_array_isset_string(options, SS("content")))) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_translate_exception_ce, "Parameter 'content' is required", "phalcon/translate/adapter/csv.zep", 43);
return;
}
zephir_array_fetch_string(&_1, options, SL("content"), PH_NOISY | PH_READONLY, "phalcon/translate/adapter/csv.zep", 46 TSRMLS_CC);
ZEPHIR_INIT_VAR(_2);
ZVAL_LONG(_2, 0);
ZEPHIR_INIT_VAR(_3);
ZVAL_STRING(_3, ";", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_INIT_VAR(_4);
ZVAL_STRING(_4, "\"", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_CALL_METHOD(NULL, this_ptr, "_load", NULL, 427, _1, _2, _3, _4);
zephir_check_temp_parameter(_3);
zephir_check_temp_parameter(_4);
zephir_check_call_status();
ZEPHIR_MM_RESTORE();
}
示例10: PHP_METHOD
/**
* Create a Phalcon\Cache based on the internal cache options
*/
PHP_METHOD(Phalcon_Mvc_View_Simple, _createCache) {
int ZEPHIR_LAST_CALL_STATUS;
zval *dependencyInjector, *cacheService = NULL, *cacheOptions, *viewCache = NULL, *_0 = NULL;
ZEPHIR_MM_GROW();
ZEPHIR_OBS_VAR(dependencyInjector);
zephir_read_property_this(&dependencyInjector, this_ptr, SL("_dependencyInjector"), PH_NOISY_CC);
if (Z_TYPE_P(dependencyInjector) != IS_OBJECT) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_exception_ce, "A dependency injector container is required to obtain the view cache services", "phalcon/mvc/view/simple.zep", 478);
return;
}
ZEPHIR_INIT_VAR(cacheService);
ZVAL_STRING(cacheService, "viewCache", 1);
ZEPHIR_OBS_VAR(cacheOptions);
zephir_read_property_this(&cacheOptions, this_ptr, SL("_cacheOptions"), PH_NOISY_CC);
if (Z_TYPE_P(cacheOptions) == IS_ARRAY) {
if (zephir_array_isset_string(cacheOptions, SS("service"))) {
ZEPHIR_OBS_NVAR(cacheService);
zephir_array_isset_string_fetch(&cacheService, cacheOptions, SS("service"), 0 TSRMLS_CC);
}
}
ZEPHIR_CALL_METHOD(&_0, dependencyInjector, "getshared", NULL, 0, cacheService);
zephir_check_call_status();
ZEPHIR_CPY_WRT(viewCache, _0);
if (Z_TYPE_P(viewCache) != IS_OBJECT) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_exception_ce, "The injected caching service is invalid", "phalcon/mvc/view/simple.zep", 495);
return;
}
RETURN_CCTOR(viewCache);
}
示例11: PHP_METHOD
/**
* Phalcon\Cache\Backend\Xcache constructor
*
* @param \Phalcon\Cache\FrontendInterface frontend
* @param array options
*/
PHP_METHOD(Phalcon_Cache_Backend_Xcache, __construct) {
int ZEPHIR_LAST_CALL_STATUS;
zephir_fcall_cache_entry *_1 = NULL;
zval *frontend, *options = NULL, *_0;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &frontend, &options);
if (!options) {
ZEPHIR_CPY_WRT(options, ZEPHIR_GLOBAL(global_null));
} else {
ZEPHIR_SEPARATE_PARAM(options);
}
if (Z_TYPE_P(options) != IS_ARRAY) {
ZEPHIR_INIT_NVAR(options);
array_init(options);
}
if (!(zephir_array_isset_string(options, SS("statsKey")))) {
ZEPHIR_INIT_VAR(_0);
ZVAL_STRING(_0, "_PHCX", 1);
zephir_array_update_string(&options, SL("statsKey"), &_0, PH_COPY | PH_SEPARATE);
}
ZEPHIR_CALL_PARENT(NULL, phalcon_cache_backend_xcache_ce, this_ptr, "__construct", &_1, 106, frontend, options);
zephir_check_call_status();
ZEPHIR_MM_RESTORE();
}
示例12: PHP_METHOD
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);
}
示例13: PHP_METHOD
/**
* Check whether the relation act as a foreign key
*/
PHP_METHOD(Phalcon_Mvc_Model_Relation, isForeignKey) {
zval *_0;
_0 = zephir_fetch_nproperty_this(this_ptr, SL("_options"), PH_NOISY_CC);
RETURN_BOOL(zephir_array_isset_string(_0, SS("foreignKey")));
}
示例14: PHP_METHOD
/**
* Generate the HTML to label the element
*
* @param array attributes
*/
PHP_METHOD(Phalcon_Forms_Element, label) {
zend_bool _2;
zephir_fcall_cache_entry *_0 = NULL;
zend_long ZEPHIR_LAST_CALL_STATUS;
zval *attributes = NULL, *internalAttributes = NULL, *label = NULL, *name = NULL, *code = NULL, *_1, *_3$$7, *_4$$8;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 0, 1, &attributes);
if (!attributes) {
ZEPHIR_CPY_WRT(attributes, ZEPHIR_GLOBAL(global_null));
} else {
ZEPHIR_SEPARATE_PARAM(attributes);
}
ZEPHIR_CALL_METHOD(&internalAttributes, this_ptr, "getattributes", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_VAR(name);
if (!(zephir_array_isset_string_fetch(&name, internalAttributes, SS("id"), 0 TSRMLS_CC))) {
ZEPHIR_OBS_NVAR(name);
zephir_read_property_this(&name, this_ptr, SL("_name"), PH_NOISY_CC);
}
if (Z_TYPE_P(attributes) == IS_ARRAY) {
if (!(zephir_array_isset_string(attributes, SS("for")))) {
zephir_array_update_string(&attributes, SL("for"), &name, PH_COPY | PH_SEPARATE);
}
} else {
ZEPHIR_INIT_NVAR(attributes);
zephir_create_array(attributes, 1, 0 TSRMLS_CC);
zephir_array_update_string(&attributes, SL("for"), &name, PH_COPY | PH_SEPARATE);
}
ZEPHIR_INIT_VAR(_1);
ZVAL_STRING(_1, "<label", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_CALL_CE_STATIC(&code, phalcon_tag_ce, "renderattributes", &_0, 4, _1, attributes);
zephir_check_temp_parameter(_1);
zephir_check_call_status();
ZEPHIR_OBS_VAR(label);
zephir_read_property_this(&label, this_ptr, SL("_label"), PH_NOISY_CC);
_2 = zephir_is_true(label);
if (!(_2)) {
_2 = zephir_is_numeric(label);
}
if (_2) {
ZEPHIR_INIT_VAR(_3$$7);
ZEPHIR_CONCAT_SVS(_3$$7, ">", label, "</label>");
zephir_concat_self(&code, _3$$7 TSRMLS_CC);
} else {
ZEPHIR_INIT_VAR(_4$$8);
ZEPHIR_CONCAT_SVS(_4$$8, ">", name, "</label>");
zephir_concat_self(&code, _4$$8 TSRMLS_CC);
}
RETURN_CCTOR(code);
}
示例15: PHP_METHOD
/**
* Phalcon\Cache\Backend\Memcache constructor
*
* @param Phalcon\Cache\FrontendInterface frontend
* @param array options
*/
PHP_METHOD(Phalcon_Cache_Backend_Memcache, __construct) {
int ZEPHIR_LAST_CALL_STATUS;
zephir_fcall_cache_entry *_3 = NULL;
zval *frontend, *options = NULL, *_0$$4, *_1$$5, *_2$$7;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &frontend, &options);
if (!options) {
ZEPHIR_CPY_WRT(options, ZEPHIR_GLOBAL(global_null));
} else {
ZEPHIR_SEPARATE_PARAM(options);
}
if (Z_TYPE_P(options) != IS_ARRAY) {
ZEPHIR_INIT_NVAR(options);
array_init(options);
}
if (!(zephir_array_isset_string(options, SS("host")))) {
ZEPHIR_INIT_VAR(_0$$4);
ZVAL_STRING(_0$$4, "127.0.0.1", 1);
zephir_array_update_string(&options, SL("host"), &_0$$4, PH_COPY | PH_SEPARATE);
}
if (!(zephir_array_isset_string(options, SS("port")))) {
ZEPHIR_INIT_VAR(_1$$5);
ZVAL_LONG(_1$$5, 11211);
zephir_array_update_string(&options, SL("port"), &_1$$5, PH_COPY | PH_SEPARATE);
}
if (!(zephir_array_isset_string(options, SS("persistent")))) {
zephir_array_update_string(&options, SL("persistent"), &ZEPHIR_GLOBAL(global_false), PH_COPY | PH_SEPARATE);
}
if (!(zephir_array_isset_string(options, SS("statsKey")))) {
ZEPHIR_INIT_VAR(_2$$7);
ZVAL_STRING(_2$$7, "", 1);
zephir_array_update_string(&options, SL("statsKey"), &_2$$7, PH_COPY | PH_SEPARATE);
}
ZEPHIR_CALL_PARENT(NULL, phalcon_cache_backend_memcache_ce, this_ptr, "__construct", &_3, 113, frontend, options);
zephir_check_call_status();
ZEPHIR_MM_RESTORE();
}