本文整理汇总了C++中PHALCON_RETURN_CHECK_CTOR函数的典型用法代码示例。如果您正苦于以下问题:C++ PHALCON_RETURN_CHECK_CTOR函数的具体用法?C++ PHALCON_RETURN_CHECK_CTOR怎么用?C++ PHALCON_RETURN_CHECK_CTOR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PHALCON_RETURN_CHECK_CTOR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PHP_METHOD
/**
* Returns the translation related to the given key
*
* @param string $index
* @return string
*/
PHP_METHOD(Phalcon_Translate_Adapter_Array, query){
zval *index = NULL;
zval *t0 = NULL, *t1 = NULL;
zval *r0 = NULL;
int eval_int;
PHALCON_MM_GROW();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &index) == FAILURE) {
PHALCON_MM_RESTORE();
RETURN_NULL();
}
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, this_ptr, "_traslate", sizeof("_traslate")-1, PHALCON_NOISY TSRMLS_CC);
eval_int = phalcon_array_isset(t0, index);
if (eval_int) {
PHALCON_ALLOC_ZVAL_MM(t1);
phalcon_read_property(&t1, this_ptr, "_traslate", sizeof("_traslate")-1, PHALCON_NOISY TSRMLS_CC);
PHALCON_ALLOC_ZVAL_MM(r0);
phalcon_array_fetch(&r0, t1, index, PHALCON_NOISY TSRMLS_CC);
PHALCON_RETURN_CHECK_CTOR(r0);
} else {
PHALCON_RETURN_CHECK_CTOR(index);
}
PHALCON_MM_RESTORE();
}
示例2: PHP_METHOD
/**
* Gets a param by its name or numeric index
*
* @param mixed $param
* @return mixed
*/
PHP_METHOD(Phalcon_Dispatcher, getParam){
zval *param = NULL, *params = NULL;
zval *t0 = NULL;
zval *r0 = NULL;
int eval_int;
PHALCON_MM_GROW();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", ¶m) == FAILURE) {
PHALCON_MM_RESTORE();
RETURN_NULL();
}
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, this_ptr, "_params", sizeof("_params")-1, PHALCON_NOISY TSRMLS_CC);
PHALCON_CPY_WRT(params, t0);
eval_int = phalcon_array_isset(params, param);
if (eval_int) {
PHALCON_ALLOC_ZVAL_MM(r0);
phalcon_array_fetch(&r0, params, param, PHALCON_NOISY TSRMLS_CC);
PHALCON_RETURN_CHECK_CTOR(r0);
}
PHALCON_MM_RESTORE();
RETURN_NULL();
}
示例3: PHP_METHOD
PHP_METHOD(Phalcon_Internal_TestTemp, e13b){
zval *a = NULL;
zval *i0 = NULL, *i1 = NULL;
zval *t0 = NULL, *t1 = NULL, *t2 = NULL, *t3 = NULL;
PHALCON_MM_GROW();
PHALCON_ALLOC_ZVAL_MM(i0);
object_init(i0);
PHALCON_CPY_WRT(a, i0);
phalcon_update_property_long(a, "uno", strlen("uno"), 1 TSRMLS_CC);
phalcon_update_property_long(a, "dos", strlen("dos"), 2 TSRMLS_CC);
PHALCON_ALLOC_ZVAL_MM(i1);
object_init(i1);
phalcon_update_property_zval(a, "subA", strlen("subA"), i1 TSRMLS_CC);
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, a, "subA", sizeof("subA")-1, PHALCON_NOISY TSRMLS_CC);
phalcon_update_property_long(t0, "uno", strlen("uno"), 1 TSRMLS_CC);
PHALCON_ALLOC_ZVAL_MM(t1);
phalcon_read_property(&t1, a, "subA", sizeof("subA")-1, PHALCON_NOISY TSRMLS_CC);
phalcon_update_property_long(t1, "dos", strlen("dos"), 2 TSRMLS_CC);
PHALCON_ALLOC_ZVAL_MM(t2);
phalcon_read_property(&t2, a, "subA", sizeof("subA")-1, PHALCON_NOISY TSRMLS_CC);
PHALCON_ALLOC_ZVAL_MM(t3);
phalcon_read_property(&t3, t2, "dos", sizeof("dos")-1, PHALCON_NOISY TSRMLS_CC);
PHALCON_RETURN_CHECK_CTOR(t3);
}
示例4: PHP_METHOD
/**
* Generates the SQL for a MySQL LIMIT clause
*
* @param string $sqlQuery
* @param int $number
* @return string
*/
PHP_METHOD(Phalcon_Db_Dialect_Mysql, limit){
zval *sql_query = NULL, *number = NULL, *limit = NULL;
zval *r0 = NULL, *r1 = NULL, *r2 = NULL;
PHALCON_MM_GROW();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &sql_query, &number) == FAILURE) {
PHALCON_MM_RESTORE();
RETURN_NULL();
}
PHALCON_ALLOC_ZVAL_MM(r0);
PHALCON_CALL_FUNC_PARAMS_1(r0, "is_numeric", number, 0x02B);
if (zend_is_true(r0)) {
PHALCON_ALLOC_ZVAL_MM(r1);
PHALCON_CALL_FUNC_PARAMS_1(r1, "intval", number, 0x020);
PHALCON_CPY_WRT(limit, r1);
PHALCON_ALLOC_ZVAL_MM(r2);
PHALCON_CONCAT_VSV(r2, sql_query, " LIMIT ", limit);
PHALCON_RETURN_CTOR(r2);
} else {
PHALCON_RETURN_CHECK_CTOR(sql_query);
}
PHALCON_MM_RESTORE();
}
示例5: PHP_METHOD
/**
* Reads meta-data from $_SESSION
*
* @return array
*/
PHP_METHOD(Phalcon_Model_MetaData_Session, read){
zval *session = NULL, *key = NULL;
zval *g0 = NULL;
zval *r0 = NULL, *r1 = NULL;
zval *t0 = NULL;
zval *a0 = NULL;
int eval_int;
PHALCON_MM_GROW();
phalcon_get_global(&g0, "_SESSION", sizeof("_SESSION") TSRMLS_CC);
PHALCON_CPY_WRT(session, g0);
PHALCON_ALLOC_ZVAL_MM(r0);
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, this_ptr, "_suffix", sizeof("_suffix")-1, PHALCON_NOISY TSRMLS_CC);
PHALCON_CONCAT_SV(r0, "$PMM$", t0);
PHALCON_CPY_WRT(key, r0);
eval_int = phalcon_array_isset(session, key);
if (eval_int) {
PHALCON_ALLOC_ZVAL_MM(r1);
phalcon_array_fetch(&r1, session, key, PHALCON_NOISY TSRMLS_CC);
PHALCON_RETURN_CHECK_CTOR(r1);
}
PHALCON_INIT_VAR(a0);
array_init(a0);
PHALCON_RETURN_CTOR(a0);
}
示例6: PHP_METHOD
PHP_METHOD(Phalcon_View_Engine_Mustache, __get){
zval *property = NULL;
zval *t0 = NULL, *t1 = NULL;
zval *r0 = NULL;
int eval_int;
PHALCON_MM_GROW();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &property) == FAILURE) {
PHALCON_MM_RESTORE();
RETURN_NULL();
}
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, this_ptr, "_params", sizeof("_params")-1, PHALCON_NOISY TSRMLS_CC);
eval_int = phalcon_array_isset(t0, property);
if (eval_int) {
PHALCON_ALLOC_ZVAL_MM(t1);
phalcon_read_property(&t1, this_ptr, "_params", sizeof("_params")-1, PHALCON_NOISY TSRMLS_CC);
PHALCON_ALLOC_ZVAL_MM(r0);
phalcon_array_fetch(&r0, t1, property, PHALCON_NOISY TSRMLS_CC);
PHALCON_RETURN_CHECK_CTOR(r0);
}
PHALCON_MM_RESTORE();
RETURN_NULL();
}
示例7: PHP_METHOD
/**
* Gets most possibly client IPv4 Address
*
* @return string
*/
PHP_METHOD(Phalcon_Request, getClientAddress){
zval *address = NULL;
zval *g0 = NULL;
zval *r0 = NULL, *r1 = NULL;
int eval_int;
PHALCON_MM_GROW();
PHALCON_INIT_VAR(address);
ZVAL_STRING(address, "", 1);
phalcon_get_global(&g0, "_SERVER", sizeof("_SERVER") TSRMLS_CC);
eval_int = phalcon_array_isset_string(g0, "HTTP_X_FORWARDED_FOR", strlen("HTTP_X_FORWARDED_FOR")+1);
if (eval_int) {
PHALCON_ALLOC_ZVAL_MM(r0);
phalcon_array_fetch_string(&r0, g0, "HTTP_X_FORWARDED_FOR", strlen("HTTP_X_FORWARDED_FOR"), PHALCON_NOISY TSRMLS_CC);
PHALCON_CPY_WRT(address, r0);
} else {
eval_int = phalcon_array_isset_string(g0, "REMOTE_ADDR", strlen("REMOTE_ADDR")+1);
if (eval_int) {
PHALCON_ALLOC_ZVAL_MM(r1);
phalcon_array_fetch_string(&r1, g0, "REMOTE_ADDR", strlen("REMOTE_ADDR"), PHALCON_NOISY TSRMLS_CC);
PHALCON_CPY_WRT(address, r1);
}
}
PHALCON_RETURN_CHECK_CTOR(address);
}
示例8: PHP_METHOD
/**
* Gets the views part manager
*
* @return Phalcon_View
*/
PHP_METHOD(Phalcon_Controller_Front, getViewComponent){
zval *t0 = NULL, *t1 = NULL, *t2 = NULL, *t3 = NULL;
zval *i0 = NULL;
PHALCON_MM_GROW();
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, this_ptr, "_view", sizeof("_view")-1, PHALCON_NOISY TSRMLS_CC);
if (!zend_is_true(t0)) {
PHALCON_ALLOC_ZVAL_MM(i0);
object_init_ex(i0, phalcon_view_ce);
PHALCON_CALL_METHOD_NORETURN(i0, "__construct", PHALCON_CHECK);
phalcon_update_property_zval(this_ptr, "_view", strlen("_view"), i0 TSRMLS_CC);
PHALCON_ALLOC_ZVAL_MM(t1);
phalcon_read_property(&t1, this_ptr, "_view", sizeof("_view")-1, PHALCON_NOISY TSRMLS_CC);
PHALCON_ALLOC_ZVAL_MM(t2);
phalcon_read_property(&t2, this_ptr, "_viewsDir", sizeof("_viewsDir")-1, PHALCON_NOISY TSRMLS_CC);
PHALCON_CALL_METHOD_PARAMS_1_NORETURN(t1, "setviewsdir", t2, PHALCON_NO_CHECK);
}
PHALCON_ALLOC_ZVAL_MM(t3);
phalcon_read_property(&t3, this_ptr, "_view", sizeof("_view")-1, PHALCON_NOISY TSRMLS_CC);
PHALCON_RETURN_CHECK_CTOR(t3);
}
示例9: PHP_METHOD
/**
* Check whether a option has been defined in the validator options
*
* @paramstring $option
* @returnboolean
*/
PHP_METHOD(Phalcon_Model_Validator, isSetOption){
zval *v0 = NULL;
zval *r0 = NULL, *r1 = NULL;
zval *t0 = NULL, *t1 = NULL, *t2 = NULL;
int eval_int;
PHALCON_MM_GROW();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &v0) == FAILURE) {
PHALCON_MM_RESTORE();
RETURN_NULL();
}
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, this_ptr, "_options", sizeof("_options")-1, PHALCON_NOISY_FETCH TSRMLS_CC);
eval_int = phalcon_array_isset(t0, v0);
PHALCON_INIT_VAR(r1);
ZVAL_BOOL(r1, eval_int);
if (zend_is_true(r1)) {
PHALCON_INIT_VAR(t1);
ZVAL_BOOL(t1, 1);
r0 = t1;
} else {
PHALCON_INIT_VAR(t2);
ZVAL_BOOL(t2, 0);
r0 = t2;
}
PHALCON_RETURN_CHECK_CTOR(r0);
}
示例10: PHP_METHOD
/**
* Returns validations messages from last save try
*
* @return array
*/
PHP_METHOD(Phalcon_Transaction, getMessages){
zval *t0 = NULL;
PHALCON_MM_GROW();
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, this_ptr, "_messages", sizeof("_messages")-1, PHALCON_NOISY_FETCH TSRMLS_CC);
PHALCON_RETURN_CHECK_CTOR(t0);
}
示例11: PHP_METHOD
PHP_METHOD(Phalcon_Internal_TestParent, mp7){
zval *t0 = NULL;
PHALCON_MM_GROW();
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, this_ptr, "_pp0", sizeof("_pp0")-1, PHALCON_NOISY_FETCH TSRMLS_CC);
PHALCON_RETURN_CHECK_CTOR(t0);
}
示例12: PHP_METHOD
/**
* Check whether field absolute to position in table
*
* @return string
*/
PHP_METHOD(Phalcon_Db_Column, getAfterPosition){
zval *t0 = NULL;
PHALCON_MM_GROW();
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, this_ptr, "_after", sizeof("_after")-1, PHALCON_NOISY_FETCH TSRMLS_CC);
PHALCON_RETURN_CHECK_CTOR(t0);
}
示例13: PHP_METHOD
/**
* Returns the log type
*
* @return integer
*/
PHP_METHOD(Phalcon_Logger_Item, getType){
zval *t0 = NULL;
PHALCON_MM_GROW();
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, this_ptr, "_type", sizeof("_type")-1, PHALCON_NOISY_FETCH TSRMLS_CC);
PHALCON_RETURN_CHECK_CTOR(t0);
}
示例14: PHP_METHOD
/**
* Returns the role name
*
* @return string
*/
PHP_METHOD(Phalcon_Acl_Role, getName){
zval *t0 = NULL;
PHALCON_MM_GROW();
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, this_ptr, "_name", sizeof("_name")-1, PHALCON_NOISY_FETCH TSRMLS_CC);
PHALCON_RETURN_CHECK_CTOR(t0);
}
示例15: PHP_METHOD
/**
* Gets pointer number of active row in the resultset
*
*/
PHP_METHOD(Phalcon_Model_Resultset, key){
zval *t0 = NULL;
PHALCON_MM_GROW();
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, this_ptr, "_pointer", sizeof("_pointer")-1, PHALCON_NOISY TSRMLS_CC);
PHALCON_RETURN_CHECK_CTOR(t0);
}