本文整理汇总了C++中zephir_concat_self函数的典型用法代码示例。如果您正苦于以下问题:C++ zephir_concat_self函数的具体用法?C++ zephir_concat_self怎么用?C++ zephir_concat_self使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zephir_concat_self函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PHP_METHOD
/**
* Returns the element as a string.
*
* @return string
*/
PHP_METHOD(Xpl_HtmlElement, __toString) {
zval *_0 = NULL, *_1 = NULL, *_3 = NULL, *_4 = NULL, *_5 = NULL, *_6 = NULL;
zval *html;
zephir_fcall_cache_entry *_2 = NULL;
int ZEPHIR_LAST_CALL_STATUS;
ZEPHIR_MM_GROW();
ZEPHIR_INIT_VAR(html);
ZVAL_EMPTY_STRING(html);
ZEPHIR_CALL_METHOD(NULL, this_ptr, "prepare", NULL, 0);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_0, this_ptr, "getprependstring", NULL, 0);
zephir_check_call_status();
zephir_concat_self(&html, _0 TSRMLS_CC);
ZEPHIR_CALL_METHOD(&_3, this_ptr, "gettag", NULL, 0);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_4, this_ptr, "getattributes", NULL, 0);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_5, this_ptr, "getcontent", NULL, 0);
zephir_check_call_status();
ZEPHIR_CALL_CE_STATIC(&_1, xpl_html_ce, "make", &_2, 110, _3, _4, _5);
zephir_check_call_status();
zephir_concat_self(&html, _1 TSRMLS_CC);
ZEPHIR_CALL_METHOD(&_6, this_ptr, "getappendstring", NULL, 0);
zephir_check_call_status();
zephir_concat_self(&html, _6 TSRMLS_CC);
RETURN_CTOR(html);
}
示例2: PHP_METHOD
PHP_METHOD(Test_Concat, testConcatSelf1) {
zval _1;
zval url, _0, _2;
ZEPHIR_INIT_THIS();
ZVAL_UNDEF(&url);
ZVAL_UNDEF(&_0);
ZVAL_UNDEF(&_2);
ZVAL_UNDEF(&_1);
ZEPHIR_MM_GROW();
ZEPHIR_INIT_VAR(&url);
ZVAL_STRING(&url, "");
zephir_concat_self_str(&url, SL("test") TSRMLS_CC);
ZEPHIR_INIT_VAR(&_0);
ZEPHIR_CONCAT_SVS(&_0, "append", &url, "other");
zephir_concat_self(&url, &_0 TSRMLS_CC);
ZEPHIR_INIT_VAR(&_1);
ZEPHIR_CONCAT_SS(&_1, "append", "other");
zephir_concat_self(&url, &_1 TSRMLS_CC);
ZEPHIR_INIT_VAR(&_2);
ZEPHIR_CONCAT_SSV(&_2, "append", "other", &url);
zephir_concat_self(&url, &_2 TSRMLS_CC);
RETURN_CCTOR(url);
}
示例3: PHP_METHOD
/**
* Generates SQL to query foreign keys on a table
*
* @param string table
* @param string schema
* @return string
*/
PHP_METHOD(Phalcon_Db_Dialect_Postgresql, describeReferences) {
zval *table, *schema = NULL, *sql, *_0 = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &table, &schema);
if (!schema) {
schema = ZEPHIR_GLOBAL(global_null);
}
ZEPHIR_INIT_VAR(sql);
ZVAL_STRING(sql, "SELECT tc.table_name as TABLE_NAME, kcu.column_name as COLUMN_NAME, tc.constraint_name as CONSTRAINT_NAME, tc.table_catalog as REFERENCED_TABLE_SCHEMA, ccu.table_name AS REFERENCED_TABLE_NAME, ccu.column_name AS REFERENCED_COLUMN_NAME FROM information_schema.table_constraints AS tc JOIN information_schema.key_column_usage AS kcu ON tc.constraint_name = kcu.constraint_name JOIN information_schema.constraint_column_usage AS ccu ON ccu.constraint_name = tc.constraint_name WHERE constraint_type = 'FOREIGN KEY' AND ", 1);
if (zephir_is_true(schema)) {
ZEPHIR_INIT_VAR(_0);
ZEPHIR_CONCAT_SVSVS(_0, "tc.table_schema = '", schema, "' AND tc.table_name='", table, "'");
zephir_concat_self(&sql, _0 TSRMLS_CC);
} else {
ZEPHIR_INIT_LNVAR(_0);
ZEPHIR_CONCAT_SVS(_0, "tc.table_name='", table, "'");
zephir_concat_self(&sql, _0 TSRMLS_CC);
}
RETURN_CCTOR(sql);
}
示例4: PHP_METHOD
PHP_METHOD(Test_Concat, testConcatSelf1) {
zval _1;
zval url, _0, _2;
zval this_zv;
zval *this_ptr = getThis();
if (EXPECTED(this_ptr)) {
ZVAL_OBJ(&this_zv, Z_OBJ_P(this_ptr));
this_ptr = &this_zv;
} else this_ptr = NULL;
ZVAL_UNDEF(&url);
ZVAL_UNDEF(&_0);
ZVAL_UNDEF(&_2);
ZVAL_UNDEF(&_1);
ZEPHIR_MM_GROW();
ZEPHIR_INIT_VAR(&url);
ZVAL_STRING(&url, "");
zephir_concat_self_str(&url, SL("test") TSRMLS_CC);
ZEPHIR_INIT_VAR(&_0);
ZEPHIR_CONCAT_SVS(&_0, "append", &url, "other");
zephir_concat_self(&url, &_0 TSRMLS_CC);
ZEPHIR_INIT_VAR(&_1);
ZEPHIR_CONCAT_SS(&_1, "append", "other");
zephir_concat_self(&url, &_1 TSRMLS_CC);
ZEPHIR_INIT_VAR(&_2);
ZEPHIR_CONCAT_SSV(&_2, "append", "other", &url);
zephir_concat_self(&url, &_2 TSRMLS_CC);
RETURN_CCTOR(url);
}
示例5: 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);
}
示例6: PHP_METHOD
PHP_METHOD(Transbybd_TransApi, __convert) {
HashTable *_1$$3, *_4$$5;
HashPosition _0$$3, _3$$5;
zval *data;
int ZEPHIR_LAST_CALL_STATUS;
zephir_fcall_cache_entry *_7 = NULL;
zval *args, *key = NULL, *val = NULL, *k = NULL, *v = NULL, **_2$$3, *_11$$3, _12$$3, **_5$$5, *_6$$6 = NULL, *_8$$6 = NULL, *_9$$7 = NULL, *_10$$7 = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &args);
ZEPHIR_INIT_VAR(data);
ZVAL_EMPTY_STRING(data);
if (Z_TYPE_P(args) == IS_ARRAY) {
zephir_is_iterable(args, &_1$$3, &_0$$3, 0, 0, "transbybd/transApi.zep", 106);
for (
; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HMKEY(key, _1$$3, _0$$3);
ZEPHIR_GET_HVALUE(val, _2$$3);
if (Z_TYPE_P(val) == IS_ARRAY) {
zephir_is_iterable(val, &_4$$5, &_3$$5, 0, 0, "transbybd/transApi.zep", 102);
for (
; zephir_hash_get_current_data_ex(_4$$5, (void**) &_5$$5, &_3$$5) == SUCCESS
; zephir_hash_move_forward_ex(_4$$5, &_3$$5)
) {
ZEPHIR_GET_HMKEY(k, _4$$5, _3$$5);
ZEPHIR_GET_HVALUE(v, _5$$5);
ZEPHIR_CALL_FUNCTION(&_6$$6, "rawurlencode", &_7, 11, v);
zephir_check_call_status();
ZEPHIR_INIT_LNVAR(_8$$6);
ZEPHIR_CONCAT_VSVSVS(_8$$6, key, "[", k, "]=", _6$$6, "&");
zephir_concat_self(&data, _8$$6 TSRMLS_CC);
}
} else {
ZEPHIR_CALL_FUNCTION(&_9$$7, "rawurlencode", &_7, 11, val);
zephir_check_call_status();
ZEPHIR_INIT_LNVAR(_10$$7);
ZEPHIR_CONCAT_VSVS(_10$$7, key, "=", _9$$7, "&");
zephir_concat_self(&data, _10$$7 TSRMLS_CC);
}
}
ZEPHIR_INIT_VAR(_11$$3);
ZEPHIR_SINIT_VAR(_12$$3);
ZVAL_STRING(&_12$$3, "&", 0);
zephir_fast_trim(_11$$3, data, &_12$$3, ZEPHIR_TRIM_BOTH TSRMLS_CC);
RETURN_CCTOR(_11$$3);
}
RETVAL_ZVAL(args, 1, 0);
RETURN_MM();
}
示例7: PHP_METHOD
/**
* Returns the active version (string)
*
* <code>
* echo Phalcon\Version::get();
* </code>
*/
PHP_METHOD(Phalcon_Version, get) {
zval version, major, medium, minor, special, specialNumber, result, suffix, _1$$3, _2$$4;
zephir_fcall_cache_entry *_0 = NULL;
zend_long ZEPHIR_LAST_CALL_STATUS;
zval *this_ptr = getThis();
ZVAL_UNDEF(&version);
ZVAL_UNDEF(&major);
ZVAL_UNDEF(&medium);
ZVAL_UNDEF(&minor);
ZVAL_UNDEF(&special);
ZVAL_UNDEF(&specialNumber);
ZVAL_UNDEF(&result);
ZVAL_UNDEF(&suffix);
ZVAL_UNDEF(&_1$$3);
ZVAL_UNDEF(&_2$$4);
ZEPHIR_MM_GROW();
ZEPHIR_CALL_STATIC(&version, "_getversion", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_VAR(&major);
zephir_array_fetch_long(&major, &version, 0, PH_NOISY, "phalcon/version.zep", 127 TSRMLS_CC);
ZEPHIR_OBS_VAR(&medium);
zephir_array_fetch_long(&medium, &version, 1, PH_NOISY, "phalcon/version.zep", 128 TSRMLS_CC);
ZEPHIR_OBS_VAR(&minor);
zephir_array_fetch_long(&minor, &version, 2, PH_NOISY, "phalcon/version.zep", 129 TSRMLS_CC);
ZEPHIR_OBS_VAR(&special);
zephir_array_fetch_long(&special, &version, 3, PH_NOISY, "phalcon/version.zep", 130 TSRMLS_CC);
ZEPHIR_OBS_VAR(&specialNumber);
zephir_array_fetch_long(&specialNumber, &version, 4, PH_NOISY, "phalcon/version.zep", 131 TSRMLS_CC);
ZEPHIR_INIT_VAR(&result);
ZEPHIR_CONCAT_VSVSV(&result, &major, ".", &medium, ".", &minor);
ZEPHIR_CALL_STATIC(&suffix, "_getspecial", &_0, 460, &special);
zephir_check_call_status();
if (!ZEPHIR_IS_STRING(&suffix, "")) {
ZEPHIR_INIT_VAR(&_1$$3);
ZEPHIR_CONCAT_SV(&_1$$3, "-", &suffix);
zephir_concat_self(&result, &_1$$3 TSRMLS_CC);
if (!ZEPHIR_IS_LONG(&specialNumber, 0)) {
ZEPHIR_INIT_VAR(&_2$$4);
ZEPHIR_CONCAT_SV(&_2$$4, ".", &specialNumber);
zephir_concat_self(&result, &_2$$4 TSRMLS_CC);
}
}
RETURN_CCTOR(&result);
}
示例8: PHP_METHOD
/**
* Generates SQL to query foreign keys on a table
*/
PHP_METHOD(Phalcon_Db_Dialect_Oracle, describeReferences) {
int ZEPHIR_LAST_CALL_STATUS;
zephir_fcall_cache_entry *_1 = NULL;
zval *table_param = NULL, *schema_param = NULL, *sql, *_0 = NULL, *_2 = NULL, *_3 = NULL;
zval *table = NULL, *schema = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &table_param, &schema_param);
if (unlikely(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
if (likely(Z_TYPE_P(table_param) == IS_STRING)) {
zephir_get_strval(table, table_param);
} else {
ZEPHIR_INIT_VAR(table);
ZVAL_EMPTY_STRING(table);
}
if (!schema_param) {
ZEPHIR_INIT_VAR(schema);
ZVAL_EMPTY_STRING(schema);
} else {
zephir_get_strval(schema, schema_param);
}
ZEPHIR_INIT_VAR(sql);
ZVAL_STRING(sql, "SELECT AC.TABLE_NAME, CC.COLUMN_NAME, AC.CONSTRAINT_NAME, AC.R_OWNER, RCC.TABLE_NAME R_TABLE_NAME, RCC.COLUMN_NAME R_COLUMN_NAME FROM ALL_CONSTRAINTS AC JOIN ALL_CONS_COLUMNS CC ON AC.CONSTRAINT_NAME = CC.CONSTRAINT_NAME JOIN ALL_CONS_COLUMNS RCC ON AC.R_OWNER = RCC.OWNER AND AC.R_CONSTRAINT_NAME = RCC.CONSTRAINT_NAME WHERE AC.CONSTRAINT_TYPE='R' ", 1);
if (!ZEPHIR_IS_STRING(schema, "")) {
ZEPHIR_CALL_CE_STATIC(&_0, phalcon_text_ce, "upper", &_1, 144, schema);
zephir_check_call_status();
ZEPHIR_CALL_CE_STATIC(&_2, phalcon_text_ce, "upper", &_1, 144, table);
zephir_check_call_status();
ZEPHIR_INIT_VAR(_3);
ZEPHIR_CONCAT_SVSVS(_3, "AND AC.OWNER='", _0, "' AND AC.TABLE_NAME = '", _2, "'");
zephir_concat_self(&sql, _3 TSRMLS_CC);
} else {
ZEPHIR_CALL_CE_STATIC(&_0, phalcon_text_ce, "upper", &_1, 144, table);
zephir_check_call_status();
ZEPHIR_INIT_LNVAR(_3);
ZEPHIR_CONCAT_SVS(_3, "AND AC.TABLE_NAME = '", _0, "'");
zephir_concat_self(&sql, _3 TSRMLS_CC);
}
RETURN_CCTOR(sql);
}
示例9: PHP_METHOD
/**
* Returns an HTML string of debugging information about any number of
* variables, each wrapped in a "pre" tag.
*
* <code>
* $foo = "string";
* $bar = ["key" => "value"];
* $baz = new stdClass();
* echo (new \Phalcon\Debug\Dump())->variables($foo, $bar, $baz);
*</code>
*
* @param mixed variable
* @param ...
*/
PHP_METHOD(Phalcon_Debug_Dump, variables) {
HashTable *_2;
HashPosition _1;
zval *key = NULL, *value = NULL, *output = NULL, *_0 = NULL, **_3, *_4$$3 = NULL, *_5$$3 = NULL;
zephir_fcall_cache_entry *_6 = NULL;
int ZEPHIR_LAST_CALL_STATUS;
ZEPHIR_MM_GROW();
ZEPHIR_INIT_VAR(output);
ZVAL_STRING(output, "", 1);
ZEPHIR_CALL_FUNCTION(&_0, "func_get_args", NULL, 174);
zephir_check_call_status();
zephir_is_iterable(_0, &_2, &_1, 0, 0, "phalcon/debug/dump.zep", 297);
for (
; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
; zephir_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HMKEY(key, _2, _1);
ZEPHIR_GET_HVALUE(value, _3);
ZEPHIR_INIT_LNVAR(_5$$3);
ZEPHIR_CONCAT_SV(_5$$3, "var ", key);
ZEPHIR_CALL_METHOD(&_4$$3, this_ptr, "one", &_6, 0, value, _5$$3);
zephir_check_call_status();
zephir_concat_self(&output, _4$$3 TSRMLS_CC);
}
RETURN_CCTOR(output);
}
示例10: PHP_METHOD
/**
* Returns the active version (string)
*
* <code>
* echo Phalcon\Version::get();
* </code>
*/
PHP_METHOD(Phalcon_Version, get) {
zval *version = NULL, *major = NULL, *medium = NULL, *minor = NULL, *special = NULL, *specialNumber = NULL, *result = NULL, *suffix = NULL, *_1$$3;
zephir_fcall_cache_entry *_0 = NULL;
int ZEPHIR_LAST_CALL_STATUS;
ZEPHIR_MM_GROW();
ZEPHIR_CALL_STATIC(&version, "_getversion", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_VAR(major);
zephir_array_fetch_long(&major, version, 0, PH_NOISY, "phalcon/version.zep", 139 TSRMLS_CC);
ZEPHIR_OBS_VAR(medium);
zephir_array_fetch_long(&medium, version, 1, PH_NOISY, "phalcon/version.zep", 140 TSRMLS_CC);
ZEPHIR_OBS_VAR(minor);
zephir_array_fetch_long(&minor, version, 2, PH_NOISY, "phalcon/version.zep", 141 TSRMLS_CC);
ZEPHIR_OBS_VAR(special);
zephir_array_fetch_long(&special, version, 3, PH_NOISY, "phalcon/version.zep", 142 TSRMLS_CC);
ZEPHIR_OBS_VAR(specialNumber);
zephir_array_fetch_long(&specialNumber, version, 4, PH_NOISY, "phalcon/version.zep", 143 TSRMLS_CC);
ZEPHIR_INIT_VAR(result);
ZEPHIR_CONCAT_VSVSVS(result, major, ".", medium, ".", minor, " ");
ZEPHIR_CALL_STATIC(&suffix, "_getspecial", &_0, 472, special);
zephir_check_call_status();
if (!ZEPHIR_IS_STRING(suffix, "")) {
ZEPHIR_INIT_VAR(_1$$3);
ZEPHIR_CONCAT_VSV(_1$$3, suffix, " ", specialNumber);
zephir_concat_self(&result, _1$$3 TSRMLS_CC);
}
zephir_fast_trim(return_value, result, NULL , ZEPHIR_TRIM_BOTH TSRMLS_CC);
RETURN_MM();
}
示例11: PHP_METHOD
PHP_METHOD(Test_BuiltIn_CharMethods, getHexForString) {
int ZEPHIR_LAST_CALL_STATUS;
zephir_nts_static zephir_fcall_cache_entry *_5 = NULL;
long _0;
char ch;
zval *str_param = NULL, *o, *_1 = NULL, _2 = zval_used_for_init, _3 = zval_used_for_init, *_4 = NULL;
zval *str = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &str_param);
zephir_get_strval(str, str_param);
ZEPHIR_INIT_VAR(o);
ZVAL_STRING(o, "", 1);
for (_0 = 0; _0 < Z_STRLEN_P(str); _0++) {
ch = ZEPHIR_STRING_OFFSET(str, _0);
ZEPHIR_SINIT_NVAR(_2);
ZVAL_STRING(&_2, "%X", 0);
ZEPHIR_SINIT_NVAR(_3);
ZVAL_LONG(&_3, ch);
ZEPHIR_CALL_FUNCTION(&_4, "sprintf", &_5, &_2, &_3);
zephir_check_call_status();
zephir_concat_self(&o, _4 TSRMLS_CC);
}
RETURN_CCTOR(o);
}
示例12: PHP_METHOD
PHP_METHOD(Yb_Std, normalCase) {
long _0;
zend_bool found, _1$$3, _2$$3, _3$$3, _4$$3;
char c = 0;
zval *from_param = NULL, *sep_param = NULL;
zval *from = NULL, *sep = NULL, *to;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &from_param, &sep_param);
zephir_get_strval(from, from_param);
if (!sep_param) {
ZEPHIR_INIT_VAR(sep);
ZVAL_STRING(sep, "-", 1);
} else {
zephir_get_strval(sep, sep_param);
}
ZEPHIR_INIT_VAR(to);
ZVAL_EMPTY_STRING(to);
found = 0;
for (_0 = 0; _0 < Z_STRLEN_P(from); _0++) {
c = ZEPHIR_STRING_OFFSET(from, _0);
_1$$3 = c >= '0';
if (_1$$3) {
_1$$3 = c <= '9';
}
_2$$3 = _1$$3;
if (!(_2$$3)) {
_3$$3 = c >= 'a';
if (_3$$3) {
_3$$3 = c <= 'z';
}
_2$$3 = _3$$3;
}
if (_2$$3) {
zephir_concat_self_char(&to, c TSRMLS_CC);
found = 1;
continue;
}
_4$$3 = c >= 'A';
if (_4$$3) {
_4$$3 = c <= 'Z';
}
if (_4$$3) {
if (found) {
zephir_concat_self(&to, sep TSRMLS_CC);
}
c += 32;
zephir_concat_self_char(&to, c TSRMLS_CC);
found = 1;
continue;
}
}
RETURN_CTOR(to);
}
示例13: PHP_METHOD
/**
* Returns the css sources
*/
PHP_METHOD(Phalcon_Debug, getCssSources) {
zval *uri = NULL, *sources = NULL, *_0, *_1;
ZEPHIR_MM_GROW();
uri = zephir_fetch_nproperty_this(this_ptr, SL("_uri"), PH_NOISY_CC);
ZEPHIR_INIT_VAR(sources);
ZEPHIR_CONCAT_SVS(sources, "<link href=\"", uri, "bower_components/jquery-ui/themes/ui-lightness/jquery-ui.min.css\" type=\"text/css\" rel=\"stylesheet\" />");
ZEPHIR_INIT_VAR(_0);
ZEPHIR_CONCAT_SVS(_0, "<link href=\"", uri, "bower_components/jquery-ui/themes/ui-lightness/theme.css\" type=\"text/css\" rel=\"stylesheet\" />");
zephir_concat_self(&sources, _0 TSRMLS_CC);
ZEPHIR_INIT_VAR(_1);
ZEPHIR_CONCAT_SVS(_1, "<link href=\"", uri, "themes/default/style.css\" type=\"text/css\" rel=\"stylesheet\" />");
zephir_concat_self(&sources, _1 TSRMLS_CC);
RETURN_CCTOR(sources);
}
示例14: PHP_METHOD
PHP_METHOD(Test_Concat, testConcatSelf1) {
zval *_1;
zval *url = NULL, *_0, *_2;
ZEPHIR_MM_GROW();
ZEPHIR_INIT_VAR(url);
ZVAL_STRING(url, "", 1);
zephir_concat_self_str(&url, SL("test") TSRMLS_CC);
ZEPHIR_INIT_VAR(_0);
ZEPHIR_CONCAT_SVS(_0, "append", url, "other");
zephir_concat_self(&url, _0 TSRMLS_CC);
ZEPHIR_INIT_VAR(_1);
ZEPHIR_CONCAT_SS(_1, "append", "other");
zephir_concat_self(&url, _1 TSRMLS_CC);
ZEPHIR_INIT_VAR(_2);
ZEPHIR_CONCAT_SSV(_2, "append", "other", url);
zephir_concat_self(&url, _2 TSRMLS_CC);
RETURN_CCTOR(url);
}
示例15: PHP_METHOD
/**
* Checks a plain text password and its hash version to check if the password matches
*/
PHP_METHOD(Phalcon_Security, checkHash) {
unsigned char _5;
long _4;
zephir_nts_static zephir_fcall_cache_entry *_2 = NULL;
zend_bool _0;
char ch;
int maxPassLength, i, sum, cryptedLength, passwordLength, ZEPHIR_LAST_CALL_STATUS;
zval *password_param = NULL, *passwordHash_param = NULL, *maxPassLength_param = NULL, *_1 = NULL;
zval *password = NULL, *passwordHash = NULL, *cryptedHash = NULL, *_3 = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &password_param, &passwordHash_param, &maxPassLength_param);
zephir_get_strval(password, password_param);
zephir_get_strval(passwordHash, passwordHash_param);
if (!maxPassLength_param) {
maxPassLength = 0;
} else {
maxPassLength = zephir_get_intval(maxPassLength_param);
}
if (maxPassLength) {
_0 = maxPassLength > 0;
if (_0) {
_0 = zephir_fast_strlen_ev(password) > maxPassLength;
}
if (_0) {
RETURN_MM_BOOL(0);
}
}
ZEPHIR_CALL_FUNCTION(&_1, "crypt", &_2, password, passwordHash);
zephir_check_call_status();
zephir_get_strval(_3, _1);
ZEPHIR_CPY_WRT(cryptedHash, _3);
cryptedLength = zephir_fast_strlen_ev(cryptedHash);
passwordLength = zephir_fast_strlen_ev(passwordHash);
zephir_concat_self(&cryptedHash, passwordHash TSRMLS_CC);
sum = (cryptedLength - passwordLength);
for (_4 = 0; _4 < Z_STRLEN_P(passwordHash); _4++) {
i = _4;
ch = ZEPHIR_STRING_OFFSET(passwordHash, _4);
_5 = ZEPHIR_STRING_OFFSET(cryptedHash, i);
sum = (sum | ((_5 ^ ch)));
}
RETURN_MM_BOOL(0 == sum);
}