Exemple #1
0
/**
 * Removes an attribute from the element.
 *
 * @param string name
 * @param mixed value [Optional]
 * @return \Xpl\HtmlElement
 */
PHP_METHOD(Xpl_HtmlElement, removeAttribute) {

	int ZEPHIR_LAST_CALL_STATUS;
	zval *name_param = NULL, *value = NULL, *attributeValues = NULL, *_0, *_1$$4, *valueKey$$5 = NULL;
	zval *name = NULL;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 1, &name_param, &value);

	zephir_get_strval(name, name_param);
	if (!value) {
		value = ZEPHIR_GLOBAL(global_null);
	}


	ZEPHIR_OBS_VAR(attributeValues);
	_0 = zephir_fetch_nproperty_this(this_ptr, SL("_attributes"), PH_NOISY_CC);
	if (zephir_array_isset_fetch(&attributeValues, _0, name, 0 TSRMLS_CC)) {
		if (Z_TYPE_P(value) == IS_NULL) {
			_1$$4 = zephir_fetch_nproperty_this(this_ptr, SL("_attributes"), PH_NOISY_CC);
			zephir_array_unset(&_1$$4, name, PH_SEPARATE);
		} else {
			ZEPHIR_CALL_FUNCTION(&valueKey$$5, "array_search", NULL, 67, value, attributeValues, ZEPHIR_GLOBAL(global_true));
			zephir_check_call_status();
			if (!ZEPHIR_IS_FALSE_IDENTICAL(valueKey$$5)) {
				zephir_array_unset(&attributeValues, valueKey$$5, PH_SEPARATE);
				zephir_update_property_array(this_ptr, SL("_attributes"), name, attributeValues TSRMLS_CC);
			}
		}
	}
	RETURN_THIS();

}
Exemple #2
0
/**
 * Removes a service in the services container
 * It also removes any shared instance created for the service
 */
PHP_METHOD(Phalcon_Di, remove) {

	zval *name_param = NULL, *_0, *_1;
	zval *name = NULL;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 0, &name_param);

	if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
		zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'name' must be a string") TSRMLS_CC);
		RETURN_MM_NULL();
	}
	if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
		zephir_get_strval(name, name_param);
	} else {
		ZEPHIR_INIT_VAR(name);
		ZVAL_EMPTY_STRING(name);
	}


	_0 = zephir_fetch_nproperty_this(this_ptr, SL("_services"), PH_NOISY_CC);
	zephir_array_unset(&_0, name, PH_SEPARATE);
	_1 = zephir_fetch_nproperty_this(this_ptr, SL("_sharedInstances"), PH_NOISY_CC);
	zephir_array_unset(&_1, name, PH_SEPARATE);
	ZEPHIR_MM_RESTORE();

}
/**
 * Unsets an element in the registry
 */
PHP_METHOD(Phalcon_Registry, offsetUnset) {

	zval *offset_param = NULL, *_0;
	zval *offset = NULL;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 0, &offset_param);

	if (unlikely(Z_TYPE_P(offset_param) != IS_STRING && Z_TYPE_P(offset_param) != IS_NULL)) {
		zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'offset' must be a string") TSRMLS_CC);
		RETURN_MM_NULL();
	}
	if (likely(Z_TYPE_P(offset_param) == IS_STRING)) {
		zephir_get_strval(offset, offset_param);
	} else {
		ZEPHIR_INIT_VAR(offset);
		ZVAL_EMPTY_STRING(offset);
	}


	_0 = zephir_fetch_nproperty_this(this_ptr, SL("_data"), PH_NOISY_CC);
	zephir_array_unset(&_0, offset, PH_SEPARATE);
	ZEPHIR_MM_RESTORE();

}
/**
 * @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();

}
Exemple #5
0
/**
 * Removes a property from the internal bag
 *
 *<code>
 * $user->remove("name");
 *</code>
 */
PHP_METHOD(Phalcon_Session_Bag, remove) {

	int ZEPHIR_LAST_CALL_STATUS;
	zval *property_param = NULL, *data = NULL, *_0$$3, *_1$$3;
	zval *property = NULL;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 0, &property_param);

	if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
		zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be a string") TSRMLS_CC);
		RETURN_MM_NULL();
	}
	if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
		zephir_get_strval(property, property_param);
	} else {
		ZEPHIR_INIT_VAR(property);
		ZVAL_EMPTY_STRING(property);
	}


	ZEPHIR_OBS_VAR(data);
	zephir_read_property_this(&data, this_ptr, SL("_data"), PH_NOISY_CC);
	if (zephir_array_isset(data, property)) {
		zephir_array_unset(&data, property, PH_SEPARATE);
		_0$$3 = zephir_fetch_nproperty_this(this_ptr, SL("_session"), PH_NOISY_CC);
		_1$$3 = zephir_fetch_nproperty_this(this_ptr, SL("_name"), PH_NOISY_CC);
		ZEPHIR_CALL_METHOD(NULL, _0$$3, "set", NULL, 0, _1$$3, data);
		zephir_check_call_status();
		zephir_update_property_this(this_ptr, SL("_data"), data TSRMLS_CC);
		RETURN_MM_BOOL(1);
	}
	RETURN_MM_BOOL(0);

}
Exemple #6
0
/**
 * Unsets an index in an array property
 */
int zephir_unset_property_array(zval *object, char *property, unsigned int property_length, zval *index)
{
	zval tmp;
	int separated = 0;

	if (Z_TYPE_P(object) == IS_OBJECT) {

		zephir_read_property(&tmp, object, property, property_length, PH_NOISY_CC);
		Z_TRY_DELREF(tmp);

		/** Separation only when refcount > 1 */
		if (Z_REFCOUNTED(tmp) && Z_REFCOUNT(tmp) > 1) {
			if (!Z_ISREF(tmp)) {
				zval new_zv;
				ZVAL_DUP(&new_zv, &tmp);
				ZVAL_COPY_VALUE(&tmp, &new_zv);
				Z_TRY_DELREF(new_zv);
				separated = 1;
			}
		}

		zephir_array_unset(&tmp, index, PH_SEPARATE);

		if (separated) {
			zephir_update_property_zval(object, property, property_length, &tmp);
		}
	}

	return SUCCESS;
}
Exemple #7
0
/**
 * Removes an element from the form
 */
PHP_METHOD(Phalcon_Forms_Form, remove) {

	zval *name_param = NULL, *_0, *_1$$3;
	zval *name = NULL;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 0, &name_param);

	if (UNEXPECTED(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
		zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'name' must be a string") TSRMLS_CC);
		RETURN_MM_NULL();
	}
	if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
		zephir_get_strval(name, name_param);
	} else {
		ZEPHIR_INIT_VAR(name);
		ZVAL_EMPTY_STRING(name);
	}


	_0 = zephir_fetch_nproperty_this(this_ptr, SL("_elements"), PH_NOISY_CC);
	if (zephir_array_isset(_0, name)) {
		_1$$3 = zephir_fetch_nproperty_this(this_ptr, SL("_elements"), PH_NOISY_CC);
		zephir_array_unset(&_1$$3, name, PH_SEPARATE);
		RETURN_MM_BOOL(1);
	}
	zephir_update_property_this(getThis(), SL("_elementsIndexed"), ZEPHIR_GLOBAL(global_null) TSRMLS_CC);
	RETURN_MM_BOOL(0);

}
Exemple #8
0
/**
 * Filter records by levels
 */
PHP_METHOD(Owl_Log_AbstractWriter, filterRecords) {

	HashTable *_2;
	HashPosition _1;
	zval *records_param = NULL, *index = NULL, *record = NULL, *_0, **_3, *_4 = NULL, *_5;
	zval *records = NULL;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 0, &records_param);

	zephir_get_arrval(records, records_param);


	ZEPHIR_OBS_VAR(_0);
	zephir_read_property_this(&_0, this_ptr, SL("levels"), PH_NOISY_CC);
	if (ZEPHIR_IS_EMPTY(_0)) {
		RETURN_CTOR(records);
	}
	zephir_is_iterable(records, &_2, &_1, 1, 0, "owl/Log/AbstractWriter.zep", 125);
	for (
	  ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
	  ; zephir_hash_move_forward_ex(_2, &_1)
	) {
		ZEPHIR_GET_HMKEY(index, _2, _1);
		ZEPHIR_GET_HVALUE(record, _3);
		ZEPHIR_OBS_NVAR(_4);
		zephir_read_property(&_4, record, SL("level"), PH_NOISY_CC);
		_5 = zephir_fetch_nproperty_this(this_ptr, SL("levels"), PH_NOISY_CC);
		if (!(zephir_fast_in_array(_4, _5 TSRMLS_CC))) {
			zephir_array_unset(&records, index, PH_SEPARATE);
		}
	}
	RETURN_CTOR(records);

}
Exemple #9
0
/**
 * Support unset() overloading on PHP 5.1
 *
 * @param  string $name
 * @return void
 */
PHP_METHOD(Yaf_Session, offsetUnset) {

    zval *name_param = NULL, *_0, *_SESSION;
    zval *name = NULL;

    ZEPHIR_MM_GROW();
    zephir_fetch_params(1, 1, 0, &name_param);

    zephir_get_strval(name, name_param);


    _0 = zephir_fetch_nproperty_this(this_ptr, SL("session"), PH_NOISY_CC);
    zephir_array_unset(&_0, name, PH_SEPARATE);
    zephir_get_global(&_SESSION, SS("_SESSION") TSRMLS_CC);
    zephir_array_unset(&_SESSION, name, PH_SEPARATE);
    ZEPHIR_MM_RESTORE();

}
Exemple #10
0
/**
 * Returns the messages stored in session
 */
PHP_METHOD(Phalcon_Flash_Session, _getSessionMessages) {

    int ZEPHIR_LAST_CALL_STATUS;
    zval *remove_param = NULL, *type = NULL, *dependencyInjector = NULL, *session = NULL, *messages = NULL, *returnMessages = NULL, *_0 = NULL, *_1 = NULL, *_2$$5, *_3$$6;
    zend_bool remove;

    ZEPHIR_MM_GROW();
    zephir_fetch_params(1, 1, 1, &remove_param, &type);

    remove = zephir_get_boolval(remove_param);
    if (!type) {
        type = ZEPHIR_GLOBAL(global_null);
    }


    ZEPHIR_CALL_METHOD(&_0, this_ptr, "getdi", NULL, 0);
    zephir_check_call_status();
    ZEPHIR_CPY_WRT(dependencyInjector, _0);
    ZEPHIR_INIT_VAR(_1);
    ZVAL_STRING(_1, "session", ZEPHIR_TEMP_PARAM_COPY);
    ZEPHIR_CALL_METHOD(&_0, dependencyInjector, "getshared", NULL, 0, _1);
    zephir_check_temp_parameter(_1);
    zephir_check_call_status();
    ZEPHIR_CPY_WRT(session, _0);
    ZEPHIR_INIT_NVAR(_1);
    ZVAL_STRING(_1, "_flashMessages", ZEPHIR_TEMP_PARAM_COPY);
    ZEPHIR_CALL_METHOD(&messages, session, "get", NULL, 0, _1);
    zephir_check_temp_parameter(_1);
    zephir_check_call_status();
    if (Z_TYPE_P(type) == IS_STRING) {
        ZEPHIR_OBS_VAR(returnMessages);
        if (zephir_array_isset_fetch(&returnMessages, messages, type, 0 TSRMLS_CC)) {
            if (remove == 1) {
                zephir_array_unset(&messages, type, PH_SEPARATE);
                ZEPHIR_INIT_VAR(_2$$5);
                ZVAL_STRING(_2$$5, "_flashMessages", ZEPHIR_TEMP_PARAM_COPY);
                ZEPHIR_CALL_METHOD(NULL, session, "set", NULL, 0, _2$$5, messages);
                zephir_check_temp_parameter(_2$$5);
                zephir_check_call_status();
            }
            RETURN_CCTOR(returnMessages);
        }
        array_init(return_value);
        RETURN_MM();
    }
    if (remove == 1) {
        ZEPHIR_INIT_VAR(_3$$6);
        ZVAL_STRING(_3$$6, "_flashMessages", ZEPHIR_TEMP_PARAM_COPY);
        ZEPHIR_CALL_METHOD(NULL, session, "remove", NULL, 0, _3$$6);
        zephir_check_temp_parameter(_3$$6);
        zephir_check_call_status();
    }
    RETURN_CCTOR(messages);

}
Exemple #11
0
/**
 * Removes an access from a resource
 *
 * @param array|string accessList
 */
PHP_METHOD(Phalcon_Acl_Adapter_Memory, dropResourceAccess) {

	HashTable *_1$$3;
	HashPosition _0$$3;
	zval *resourceName_param = NULL, *accessList, *accessName = NULL, *accessKey = NULL, **_2$$3, *_3$$4, *_4$$5, *_5$$7, *_6$$8;
	zval *resourceName = NULL;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 2, 0, &resourceName_param, &accessList);

	zephir_get_strval(resourceName, resourceName_param);


	if (Z_TYPE_P(accessList) == IS_ARRAY) {
		zephir_is_iterable(accessList, &_1$$3, &_0$$3, 0, 0, "phalcon/acl/adapter/memory.zep", 390);
		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_HVALUE(accessName, _2$$3);
			ZEPHIR_INIT_NVAR(accessKey);
			ZEPHIR_CONCAT_VSV(accessKey, resourceName, "!", accessName);
			_3$$4 = zephir_fetch_nproperty_this(this_ptr, SL("_accessList"), PH_NOISY_CC);
			if (zephir_array_isset(_3$$4, accessKey)) {
				_4$$5 = zephir_fetch_nproperty_this(this_ptr, SL("_accessList"), PH_NOISY_CC);
				zephir_array_unset(&_4$$5, accessKey, PH_SEPARATE);
			}
		}
	} else {
		if (Z_TYPE_P(accessList) == IS_STRING) {
			ZEPHIR_INIT_NVAR(accessKey);
			ZEPHIR_CONCAT_VSV(accessKey, resourceName, "!", accessName);
			_5$$7 = zephir_fetch_nproperty_this(this_ptr, SL("_accessList"), PH_NOISY_CC);
			if (zephir_array_isset(_5$$7, accessKey)) {
				_6$$8 = zephir_fetch_nproperty_this(this_ptr, SL("_accessList"), PH_NOISY_CC);
				zephir_array_unset(&_6$$8, accessKey, PH_SEPARATE);
			}
		}
	}
	ZEPHIR_MM_RESTORE();

}
Exemple #12
0
/**
 * Destroys the active session
 *
 *<code>
 *	var_dump($session->destroy());
 *	var_dump($session->destroy(true));
 *</code>
 */
PHP_METHOD(Phalcon_Session_Adapter, destroy) {

	HashTable *_2$$4;
	HashPosition _1$$4;
	int ZEPHIR_LAST_CALL_STATUS;
	zval *removeData_param = NULL, *_SESSION = NULL, *uniqueId = NULL, *key = NULL, *_0$$4 = NULL, **_3$$4, *_4$$5 = NULL;
	zend_bool removeData;

	ZEPHIR_MM_GROW();
	zephir_get_global(&_SESSION, SS("_SESSION") TSRMLS_CC);
	zephir_fetch_params(1, 0, 1, &removeData_param);

	if (!removeData_param) {
		removeData = 0;
	} else {
		removeData = zephir_get_boolval(removeData_param);
	}


	if (removeData) {
		ZEPHIR_OBS_VAR(uniqueId);
		zephir_read_property_this(&uniqueId, this_ptr, SL("_uniqueId"), PH_NOISY_CC);
		if (!(ZEPHIR_IS_EMPTY(uniqueId))) {
			ZEPHIR_INIT_VAR(_0$$4);
			zephir_is_iterable(_SESSION, &_2$$4, &_1$$4, 1, 0, "phalcon/session/adapter.zep", 262);
			for (
			  ; zephir_hash_get_current_data_ex(_2$$4, (void**) &_3$$4, &_1$$4) == SUCCESS
			  ; zephir_hash_move_forward_ex(_2$$4, &_1$$4)
			) {
				ZEPHIR_GET_HMKEY(key, _2$$4, _1$$4);
				ZEPHIR_GET_HVALUE(_0$$4, _3$$4);
				ZEPHIR_INIT_LNVAR(_4$$5);
				ZEPHIR_CONCAT_VS(_4$$5, uniqueId, "#");
				if (zephir_start_with(key, _4$$5, NULL)) {
					zephir_array_unset(&_SESSION, key, PH_SEPARATE);
				}
			}
			zend_hash_destroy(_2$$4);
			FREE_HASHTABLE(_2$$4);
		} else {
			ZEPHIR_INIT_NVAR(_SESSION);
			array_init(_SESSION);
		}
	}
	if (0) {
		zephir_update_property_this(this_ptr, SL("_started"), ZEPHIR_GLOBAL(global_true) TSRMLS_CC);
	} else {
		zephir_update_property_this(this_ptr, SL("_started"), ZEPHIR_GLOBAL(global_false) TSRMLS_CC);
	}
	ZEPHIR_RETURN_CALL_FUNCTION("session_destroy", NULL, 32);
	zephir_check_call_status();
	RETURN_MM();

}
Exemple #13
0
/**
 * @param \Ouchbase\Entity entity
 * @return this
 * @throws \Ouchbase\Exception\EntityLogicException
 */
PHP_METHOD(Ouchbase_IdentityMap, unregister) {

	zend_class_entry *_3;
	int ZEPHIR_LAST_CALL_STATUS;
	zephir_nts_static zephir_fcall_cache_entry *_0 = NULL;
	zval *entity, *hash = NULL, *_1, *_2, *_4, *_5, *_6;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 0, &entity);



	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;
	}
	ZEPHIR_CALL_CE_STATIC(&hash, ouchbase__etc_ce, "getentityhash", &_0, entity);
	zephir_check_call_status();
	_1 = zephir_fetch_nproperty_this(this_ptr, SL("entities"), PH_NOISY_CC);
	if (!(zephir_array_isset(_1, hash))) {
		ZEPHIR_INIT_VAR(_2);
		_3 = zend_fetch_class(SL("Ouchbase\\EntityLogicException"), ZEND_FETCH_CLASS_AUTO TSRMLS_CC);
		object_init_ex(_2, _3);
		if (zephir_has_constructor(_2 TSRMLS_CC)) {
			ZEPHIR_INIT_VAR(_4);
			ZVAL_STRING(_4, "is not registered in the identity map", 0);
			ZEPHIR_CALL_METHOD(NULL, _2, "__construct", NULL, entity, _4);
			zephir_check_temp_parameter(_4);
			zephir_check_call_status();
		}
		zephir_throw_exception_debug(_2, "ouchbase/IdentityMap.zep", 51 TSRMLS_CC);
		ZEPHIR_MM_RESTORE();
		return;
	}
	_5 = zephir_fetch_nproperty_this(this_ptr, SL("entities"), PH_NOISY_CC);
	zephir_array_unset(&_5, hash, PH_SEPARATE);
	_6 = zephir_fetch_nproperty_this(this_ptr, SL("originalData"), PH_NOISY_CC);
	zephir_array_unset(&_6, hash, PH_SEPARATE);
	RETURN_THIS();

}
Exemple #14
0
PHP_METHOD(Test_Unsettest, testUnsetValueFromProperty) {

	zval *key, *_0;

	zephir_fetch_params(0, 1, 0, &key);



	_0 = zephir_fetch_nproperty_this(this_ptr, SL("property"), PH_NOISY_CC);
	zephir_array_unset(&_0, key, PH_SEPARATE);

}
/**
 * Remove a route from collection
 *
 * @see ArrayAccess
 * @param mixed offset
 */
PHP_METHOD(Prr_RouteCollection, offsetUnset) {

	zval *offset, *_0;

	zephir_fetch_params(0, 1, 0, &offset);



	_0 = zephir_fetch_nproperty_this(this_ptr, SL("storage"), PH_NOISY_CC);
	zephir_array_unset(&_0, offset, PH_SEPARATE);

}
/**
 * {@inheritdoc}
 */
PHP_METHOD(Phalcon_Session_Adapter_Libmemcached, destroy) {

	HashTable *_2;
	HashPosition _1;
	int ZEPHIR_LAST_CALL_STATUS;
	zval *sessionId_param = NULL, *_SESSION, *id = NULL, *key = NULL, *_0 = NULL, **_3, *_4 = NULL, *_5, *_6 = NULL, *_7;
	zval *sessionId = NULL;

	ZEPHIR_MM_GROW();
	zephir_get_global(&_SESSION, SS("_SESSION") TSRMLS_CC);
	zephir_fetch_params(1, 0, 1, &sessionId_param);

	if (!sessionId_param) {
		ZEPHIR_INIT_VAR(sessionId);
		ZVAL_EMPTY_STRING(sessionId);
	} else {
		zephir_get_strval(sessionId, sessionId_param);
	}


	if (ZEPHIR_IS_STRING_IDENTICAL(sessionId, "")) {
		ZEPHIR_CALL_METHOD(&id, this_ptr, "getid", NULL, 0);
		zephir_check_call_status();
	} else {
		ZEPHIR_CPY_WRT(id, sessionId);
	}
	ZEPHIR_INIT_VAR(_0);
	zephir_is_iterable(_SESSION, &_2, &_1, 1, 0, "phalcon/session/adapter/libmemcached.zep", 168);
	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(_0, _3);
		zephir_array_unset(&_SESSION, key, PH_SEPARATE);
	}
	zend_hash_destroy(_2);
	FREE_HASHTABLE(_2);
	ZEPHIR_INIT_VAR(_4);
	_5 = zephir_fetch_nproperty_this(this_ptr, SL("_libmemcached"), PH_NOISY_CC);
	ZEPHIR_CALL_METHOD(&_6, _5, "exists", NULL, 0, id);
	zephir_check_call_status();
	if (zephir_is_true(_6)) {
		_7 = zephir_fetch_nproperty_this(this_ptr, SL("_libmemcached"), PH_NOISY_CC);
		ZEPHIR_CALL_METHOD(&_4, _7, "delete", NULL, 0, id);
		zephir_check_call_status();
	} else {
		ZVAL_BOOL(_4, 1);
	}
	RETURN_CCTOR(_4);

}
/**
 * Remove an object from the container
 *
 * @param string offset
 * @throws Exception
 * @return DiInterface
 */
PHP_METHOD(Pdm_Di_Container, remove) {

	zval *offset_param = NULL, *_0, *_1, *_2;
	zval *offset = NULL;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 0, &offset_param);

	if (unlikely(Z_TYPE_P(offset_param) != IS_STRING && Z_TYPE_P(offset_param) != IS_NULL)) {
		zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'offset' must be a string") TSRMLS_CC);
		RETURN_MM_NULL();
	}

	if (unlikely(Z_TYPE_P(offset_param) == IS_STRING)) {
		offset = offset_param;
	} else {
		ZEPHIR_INIT_VAR(offset);
		ZVAL_EMPTY_STRING(offset);
	}


	_0 = zephir_fetch_nproperty_this(this_ptr, SL("container"), PH_NOISY_CC);
	if (zephir_array_isset(_0, offset)) {
		_1 = zephir_fetch_nproperty_this(this_ptr, SL("container"), PH_NOISY_CC);
		zephir_array_unset(&_1, offset, PH_SEPARATE);
	}
	_1 = zephir_fetch_nproperty_this(this_ptr, SL("sharedContainer"), PH_NOISY_CC);
	if (zephir_array_isset(_1, offset)) {
		_2 = zephir_fetch_nproperty_this(this_ptr, SL("sharedContainer"), PH_NOISY_CC);
		zephir_array_unset(&_2, offset, PH_SEPARATE);
	}
	_1 = zephir_fetch_nproperty_this(this_ptr, SL("paramContainer"), PH_NOISY_CC);
	if (zephir_array_isset(_1, offset)) {
		_2 = zephir_fetch_nproperty_this(this_ptr, SL("paramContainer"), PH_NOISY_CC);
		zephir_array_unset(&_2, offset, PH_SEPARATE);
	}
	RETURN_THIS();

}
Exemple #18
0
PHP_METHOD(Test_Unsettest, testUnsetFromArrayByIndexVar) {

	zval *arrayParameter, *index;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 2, 0, &arrayParameter, &index);

	ZEPHIR_SEPARATE_PARAM(arrayParameter);


	zephir_array_unset(&arrayParameter, index, PH_SEPARATE);
	RETURN_CCTOR(arrayParameter);

}
Exemple #19
0
/**
 * Removes a session variable from an application context
 *
 *<code>
 *	$session->remove('auth');
 *</code>
 */
PHP_METHOD(Phalcon_Session_Adapter, remove) {

	zval *index_param = NULL, *_SESSION, *uniqueId = NULL, *_0$$3;
	zval *index = NULL;

	ZEPHIR_MM_GROW();
	zephir_get_global(&_SESSION, SS("_SESSION") TSRMLS_CC);
	zephir_fetch_params(1, 1, 0, &index_param);

	zephir_get_strval(index, index_param);


	uniqueId = zephir_fetch_nproperty_this(this_ptr, SL("_uniqueId"), PH_NOISY_CC);
	if (!(ZEPHIR_IS_EMPTY(uniqueId))) {
		ZEPHIR_INIT_VAR(_0$$3);
		ZEPHIR_CONCAT_VSV(_0$$3, uniqueId, "#", index);
		zephir_array_unset(&_SESSION, _0$$3, PH_SEPARATE);
		RETURN_MM_NULL();
	}
	zephir_array_unset(&_SESSION, index, PH_SEPARATE);
	ZEPHIR_MM_RESTORE();

}
Exemple #20
0
/**
 * Removes a message from the list
 *
 *<code>
 * unset($message["database"]);
 *</code>
 *
 * @param string index
 */
PHP_METHOD(Phalcon_Validation_Message_Group, offsetUnset) {

	zval *index, *_0, *_1$$3;

	zephir_fetch_params(0, 1, 0, &index);



	_0 = zephir_fetch_nproperty_this(this_ptr, SL("_messages"), PH_NOISY_CC);
	if (zephir_array_isset(_0, index)) {
		_1$$3 = zephir_fetch_nproperty_this(this_ptr, SL("_messages"), PH_NOISY_CC);
		zephir_array_unset(&_1$$3, index, PH_SEPARATE);
	}
	RETURN_BOOL(0);

}
Exemple #21
0
/**
 * Removes a property from the internal bag
 *
 *<code>
 * $user->remove("name");
 *</code>
 */
PHP_METHOD(Phalcon_Session_Bag, remove) {

	zend_long ZEPHIR_LAST_CALL_STATUS;
	zval *property_param = NULL, _0, data, _1$$4, _2$$4;
	zval property;
	zval *this_ptr = getThis();

	ZVAL_UNDEF(&property);
	ZVAL_UNDEF(&_0);
	ZVAL_UNDEF(&data);
	ZVAL_UNDEF(&_1$$4);
	ZVAL_UNDEF(&_2$$4);

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 0, &property_param);

	if (UNEXPECTED(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
		zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string") TSRMLS_CC);
		RETURN_MM_NULL();
	}
	if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
		zephir_get_strval(&property, property_param);
	} else {
		ZEPHIR_INIT_VAR(&property);
		ZVAL_EMPTY_STRING(&property);
	}


	zephir_read_property(&_0, this_ptr, SL("_initialized"), PH_NOISY_CC | PH_READONLY);
	if (ZEPHIR_IS_FALSE_IDENTICAL(&_0)) {
		ZEPHIR_CALL_METHOD(NULL, this_ptr, "initialize", NULL, 0);
		zephir_check_call_status();
	}
	ZEPHIR_OBS_VAR(&data);
	zephir_read_property(&data, this_ptr, SL("_data"), PH_NOISY_CC);
	if (zephir_array_isset(&data, &property)) {
		zephir_array_unset(&data, &property, PH_SEPARATE);
		zephir_read_property(&_1$$4, this_ptr, SL("_session"), PH_NOISY_CC | PH_READONLY);
		zephir_read_property(&_2$$4, this_ptr, SL("_name"), PH_NOISY_CC | PH_READONLY);
		ZEPHIR_CALL_METHOD(NULL, &_1$$4, "set", NULL, 0, &_2$$4, &data);
		zephir_check_call_status();
		zephir_update_property_zval(this_ptr, SL("_data"), &data);
		RETURN_MM_BOOL(1);
	}
	RETURN_MM_BOOL(0);

}
Exemple #22
0
PHP_METHOD(Test_Unsettest, testUnsetTypedArray) {

	zval *key = NULL;
	zval *arr_param = NULL, *key_param = NULL;
	zval *arr = NULL;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 2, 0, &arr_param, &key_param);

	zephir_get_arrval(arr, arr_param);
	ZEPHIR_SEPARATE_PARAM(arr);
	zephir_get_strval(key, key_param);


	zephir_array_unset(&arr, key, PH_SEPARATE);
	RETURN_CTOR(arr);

}
Exemple #23
0
/**
 * Removes a header to be sent at the end of the request
 */
PHP_METHOD(Phalcon_Http_Response_Headers, remove) {

	zval *header_param = NULL, *headers = NULL;
	zval *header = NULL;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 0, &header_param);

	zephir_get_strval(header, header_param);


	ZEPHIR_OBS_VAR(headers);
	zephir_read_property_this(&headers, this_ptr, SL("_headers"), PH_NOISY_CC);
	zephir_array_unset(&headers, header, PH_SEPARATE);
	zephir_update_property_this(getThis(), SL("_headers"), headers TSRMLS_CC);
	ZEPHIR_MM_RESTORE();

}
Exemple #24
0
/**
 * Gets a session variable from an application context
 *
 *<code>
 *	$session->get('auth', 'yes');
 *</code>
 */
PHP_METHOD(Phalcon_Session_Adapter, get) {

	zend_bool remove;
	zval *index_param = NULL, *defaultValue = NULL, *remove_param = NULL, *_SESSION, *value = NULL, *key = NULL, *uniqueId = NULL;
	zval *index = NULL;

	ZEPHIR_MM_GROW();
	zephir_get_global(&_SESSION, SS("_SESSION") TSRMLS_CC);
	zephir_fetch_params(1, 1, 2, &index_param, &defaultValue, &remove_param);

	zephir_get_strval(index, index_param);
	if (!defaultValue) {
		defaultValue = ZEPHIR_GLOBAL(global_null);
	}
	if (!remove_param) {
		remove = 0;
	} else {
		remove = zephir_get_boolval(remove_param);
	}


	uniqueId = zephir_fetch_nproperty_this(this_ptr, SL("_uniqueId"), PH_NOISY_CC);
	if (!(ZEPHIR_IS_EMPTY(uniqueId))) {
		ZEPHIR_INIT_VAR(key);
		ZEPHIR_CONCAT_VSV(key, uniqueId, "#", index);
	} else {
		ZEPHIR_CPY_WRT(key, index);
	}
	ZEPHIR_OBS_VAR(value);
	if (zephir_array_isset_fetch(&value, _SESSION, key, 0 TSRMLS_CC)) {
		if (remove) {
			zephir_array_unset(&_SESSION, key, PH_SEPARATE);
		}
		RETURN_CCTOR(value);
	}
	RETVAL_ZVAL(defaultValue, 1, 0);
	RETURN_MM();

}
Exemple #25
0
/**
 * Removes a value from the set
 *
 * @param mixed value
 * @throws \OutOfBoundsException if the value does not exist in the set
 */
PHP_METHOD(Xpl_Collection_Set, remove) {

	int ZEPHIR_LAST_CALL_STATUS;
	zval *value, *index = NULL, *_0, *_1;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 0, &value);



	_0 = zephir_fetch_nproperty_this(this_ptr, SL("items"), PH_NOISY_CC);
	ZEPHIR_CALL_FUNCTION(&index, "array_search", NULL, 67, value, _0, ZEPHIR_GLOBAL(global_true));
	zephir_check_call_status();
	if (ZEPHIR_IS_FALSE_IDENTICAL(index)) {
		ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_OutOfBoundsException, "Value does not exist in set", "xpl/collection/set.zep", 69);
		return;
	}
	_1 = zephir_fetch_nproperty_this(this_ptr, SL("items"), PH_NOISY_CC);
	zephir_array_unset(&_1, index, PH_SEPARATE);
	ZEPHIR_MM_RESTORE();

}
Exemple #26
0
/**
 * Removes all events from the EventsManager
 *
 * @param string type
 */
PHP_METHOD(Phalcon_Events_Manager, detachAll) {

	zval *type_param = NULL, *_0, *_1;
	zval *type = NULL;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 0, 1, &type_param);

	if (!type_param) {
		ZEPHIR_INIT_VAR(type);
		ZVAL_EMPTY_STRING(type);
	} else {
	if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
		zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'type' must be a string") TSRMLS_CC);
		RETURN_MM_NULL();
	}

	if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
		zephir_get_strval(type, type_param);
	} else {
		ZEPHIR_INIT_VAR(type);
		ZVAL_EMPTY_STRING(type);
	}
	}


	if (ZEPHIR_IS_STRING_IDENTICAL(type, "")) {
		zephir_update_property_this(this_ptr, SL("_events"), ZEPHIR_GLOBAL(global_null) TSRMLS_CC);
	} else {
		_0 = zephir_fetch_nproperty_this(this_ptr, SL("_events"), PH_NOISY_CC);
		if (zephir_array_isset(_0, type)) {
			_1 = zephir_fetch_nproperty_this(this_ptr, SL("_events"), PH_NOISY_CC);
			zephir_array_unset(&_1, type, PH_SEPARATE);
		}
	}
	ZEPHIR_MM_RESTORE();

}
Exemple #27
0
/**
 * Removes crumb by url.
 *
 * <code>
 * $breadcrumbs->remove("/admin/user/create");
 *
 * // remove a crumb without an url (last link)
 * $breadcrumbs->remove();
 * </code>
 */
PHP_METHOD(Phalcon_Html_Breadcrumbs, remove) {

	zval *link_param = NULL, elements, _0;
	zval link;
	zval *this_ptr = getThis();

	ZVAL_UNDEF(&link);
	ZVAL_UNDEF(&elements);
	ZVAL_UNDEF(&_0);

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 0, &link_param);

	zephir_get_strval(&link, link_param);


	zephir_read_property(&_0, this_ptr, SL("elements"), PH_NOISY_CC | PH_READONLY);
	ZEPHIR_CPY_WRT(&elements, &_0);
	zephir_array_unset(&elements, &link, PH_SEPARATE);
	zephir_update_property_zval(this_ptr, SL("elements"), &elements);
	ZEPHIR_MM_RESTORE();

}
Exemple #28
0
/**
 * Unregisters one or all listeners for an event.
 *
 * @param string|\Xpl\Event\Event event Event ID or object.
 * @param callable callback [Optional] Callback to remove. If no callback is given,
 * then all of the event's listeners are removed.
 * @return \Xpl\Event\Manager
 *
 * @throws \InvalidArgumentException if event is not a string or Event instance.
 */
PHP_METHOD(Xpl_Event_Manager, off) {

	HashTable *_6$$8;
	HashPosition _5$$8;
	int ZEPHIR_LAST_CALL_STATUS;
	zval *event, *callback = NULL, *id = NULL, *listeners = NULL, *_4, *_0$$4, *_1$$5, *_2$$5, *_3$$5, *i$$8 = NULL, *listener$$8 = NULL, **_7$$8, *_8$$9 = NULL;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 1, &event, &callback);

	if (!callback) {
		callback = ZEPHIR_GLOBAL(global_null);
	}


	if (Z_TYPE_P(event) == IS_STRING) {
		ZEPHIR_CPY_WRT(id, event);
	} else if (zephir_instance_of_ev(event, xpl_event_event_ce TSRMLS_CC)) {
		ZEPHIR_OBS_VAR(_0$$4);
		zephir_read_property(&_0$$4, event, SL("id"), PH_NOISY_CC);
		ZEPHIR_CPY_WRT(id, _0$$4);
	} else {
		ZEPHIR_INIT_VAR(_1$$5);
		object_init_ex(_1$$5, spl_ce_InvalidArgumentException);
		ZEPHIR_INIT_VAR(_2$$5);
		zephir_gettype(_2$$5, event TSRMLS_CC);
		ZEPHIR_INIT_VAR(_3$$5);
		ZEPHIR_CONCAT_SV(_3$$5, "Event must be string or instance of Event, given: ", _2$$5);
		ZEPHIR_CALL_METHOD(NULL, _1$$5, "__construct", NULL, 5, _3$$5);
		zephir_check_call_status();
		zephir_throw_exception_debug(_1$$5, "xpl/event/manager.zep", 118 TSRMLS_CC);
		ZEPHIR_MM_RESTORE();
		return;
	}
	ZEPHIR_OBS_VAR(listeners);
	_4 = zephir_fetch_nproperty_this(this_ptr, SL("listeners"), PH_NOISY_CC);
	if (zephir_array_isset_fetch(&listeners, _4, id, 0 TSRMLS_CC)) {
		if (Z_TYPE_P(callback) == IS_NULL) {
			zephir_array_unset(&listeners, id, PH_SEPARATE);
		} else {
			zephir_is_iterable(listeners, &_6$$8, &_5$$8, 1, 0, "xpl/event/manager.zep", 137);
			for (
			  ; zephir_hash_get_current_data_ex(_6$$8, (void**) &_7$$8, &_5$$8) == SUCCESS
			  ; zephir_hash_move_forward_ex(_6$$8, &_5$$8)
			) {
				ZEPHIR_GET_HMKEY(i$$8, _6$$8, _5$$8);
				ZEPHIR_GET_HVALUE(listener$$8, _7$$8);
				ZEPHIR_OBS_NVAR(_8$$9);
				zephir_read_property(&_8$$9, listener$$8, SL("callback"), PH_NOISY_CC);
				if (ZEPHIR_IS_EQUAL(callback, _8$$9)) {
					zephir_array_unset(&listeners, i$$8, PH_SEPARATE);
				}
			}
			zend_hash_destroy(_6$$8);
			FREE_HASHTABLE(_6$$8);
		}
		zephir_update_property_array(this_ptr, SL("listeners"), id, listeners TSRMLS_CC);
	}
	RETURN_THIS();

}
Exemple #29
0
/**
 * Clears every element in the form to its default value
 *
 * @param array fields
 */
PHP_METHOD(Phalcon_Forms_Form, clear) {

	HashTable *_1$$5, *_4$$10;
	HashPosition _0$$5, _3$$10;
	zend_long ZEPHIR_LAST_CALL_STATUS;
	zval *fields = NULL, *elements = NULL, *element = NULL, *data = NULL, *field = NULL, **_2$$5, **_5$$10, *_6$$13 = NULL;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 0, 1, &fields);

	if (!fields) {
		fields = ZEPHIR_GLOBAL(global_null);
	}


	ZEPHIR_OBS_VAR(data);
	zephir_read_property_this(&data, this_ptr, SL("_data"), PH_NOISY_CC);
	if (Z_TYPE_P(fields) == IS_NULL) {
		ZEPHIR_INIT_NVAR(data);
		array_init(data);
	} else {
		if (Z_TYPE_P(fields) == IS_ARRAY) {
			zephir_is_iterable(fields, &_1$$5, &_0$$5, 0, 0, "phalcon/forms/form.zep", 652);
			for (
			  ; zend_hash_get_current_data_ex(_1$$5, (void**) &_2$$5, &_0$$5) == SUCCESS
			  ; zend_hash_move_forward_ex(_1$$5, &_0$$5)
			) {
				ZEPHIR_GET_HVALUE(field, _2$$5);
				if (zephir_array_isset(data, field)) {
					zephir_array_unset(&data, field, PH_SEPARATE);
				}
			}
		} else {
			if (zephir_array_isset(data, field)) {
				zephir_array_unset(&data, field, PH_SEPARATE);
			}
		}
	}
	zephir_update_property_this(getThis(), SL("_data"), data TSRMLS_CC);
	ZEPHIR_OBS_VAR(elements);
	zephir_read_property_this(&elements, this_ptr, SL("_elements"), PH_NOISY_CC);
	if (Z_TYPE_P(elements) == IS_ARRAY) {
		zephir_is_iterable(elements, &_4$$10, &_3$$10, 0, 0, "phalcon/forms/form.zep", 672);
		for (
		  ; zend_hash_get_current_data_ex(_4$$10, (void**) &_5$$10, &_3$$10) == SUCCESS
		  ; zend_hash_move_forward_ex(_4$$10, &_3$$10)
		) {
			ZEPHIR_GET_HVALUE(element, _5$$10);
			if (Z_TYPE_P(fields) != IS_ARRAY) {
				ZEPHIR_CALL_METHOD(NULL, element, "clear", NULL, 0);
				zephir_check_call_status();
			} else {
				ZEPHIR_CALL_METHOD(&_6$$13, element, "getname", NULL, 0);
				zephir_check_call_status();
				if (zephir_fast_in_array(_6$$13, fields TSRMLS_CC)) {
					ZEPHIR_CALL_METHOD(NULL, element, "clear", NULL, 0);
					zephir_check_call_status();
				}
			}
		}
	}
	RETURN_THIS();

}
Exemple #30
0
/**
 * Returns the messages stored in session
 */
PHP_METHOD(Phalcon_Flash_Session, _getSessionMessages) {

	int ZEPHIR_LAST_CALL_STATUS;
	zval *remove_param = NULL, *type = NULL, *dependencyInjector = NULL, *session = NULL, *messages = NULL, *returnMessages = NULL, *_0, *_1 = NULL, *_2 = NULL, *_4$$6, *_5$$7;
	zend_bool remove, _3;

	ZEPHIR_MM_GROW();
	zephir_fetch_params(1, 1, 1, &remove_param, &type);

	remove = zephir_get_boolval(remove_param);
	if (!type) {
		type = ZEPHIR_GLOBAL(global_null);
	}


	_0 = zephir_fetch_nproperty_this(this_ptr, SL("_dependencyInjector"), PH_NOISY_CC);
	ZEPHIR_CPY_WRT(dependencyInjector, _0);
	if (Z_TYPE_P(dependencyInjector) != IS_OBJECT) {
		ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_flash_exception_ce, "A dependency injection container is required to access the 'session' service", "phalcon/flash/session.zep", 64);
		return;
	}
	ZEPHIR_INIT_VAR(_2);
	ZVAL_STRING(_2, "session", ZEPHIR_TEMP_PARAM_COPY);
	ZEPHIR_CALL_METHOD(&_1, dependencyInjector, "getshared", NULL, 0, _2);
	zephir_check_temp_parameter(_2);
	zephir_check_call_status();
	ZEPHIR_CPY_WRT(session, _1);
	ZEPHIR_INIT_NVAR(_2);
	ZVAL_STRING(_2, "_flashMessages", ZEPHIR_TEMP_PARAM_COPY);
	ZEPHIR_CALL_METHOD(&messages, session, "get", NULL, 0, _2);
	zephir_check_temp_parameter(_2);
	zephir_check_call_status();
	_3 = Z_TYPE_P(type) == IS_STRING;
	if (_3) {
		_3 = zephir_array_isset(messages, type);
	}
	if (_3) {
		ZEPHIR_OBS_VAR(returnMessages);
		if (!(zephir_array_isset_fetch(&returnMessages, messages, type, 0 TSRMLS_CC))) {
			ZEPHIR_INIT_NVAR(returnMessages);
			array_init(returnMessages);
		}
		if (remove == 1) {
			zephir_array_unset(&messages, type, PH_SEPARATE);
			ZEPHIR_INIT_VAR(_4$$6);
			ZVAL_STRING(_4$$6, "_flashMessages", ZEPHIR_TEMP_PARAM_COPY);
			ZEPHIR_CALL_METHOD(NULL, session, "set", NULL, 0, _4$$6, messages);
			zephir_check_temp_parameter(_4$$6);
			zephir_check_call_status();
		}
		RETURN_CCTOR(returnMessages);
	}
	if (remove == 1) {
		ZEPHIR_INIT_VAR(_5$$7);
		ZVAL_STRING(_5$$7, "_flashMessages", ZEPHIR_TEMP_PARAM_COPY);
		ZEPHIR_CALL_METHOD(NULL, session, "remove", NULL, 0, _5$$7);
		zephir_check_temp_parameter(_5$$7);
		zephir_check_call_status();
	}
	RETURN_CCTOR(messages);

}