
#ifdef HAVE_CONFIG_H
#include "../../ext_config.h"
#endif

#include <php.h>
#include "../../php_ext.h"
#include "../../ext.h"

#include <Zend/zend_operators.h>
#include <Zend/zend_exceptions.h>
#include <Zend/zend_interfaces.h>

#include "kernel/main.h"
#include "kernel/fcall.h"
#include "kernel/object.h"
#include "kernel/memory.h"


/**
 * This file is part of the Phalcon Framework.
 *
 * (c) Phalcon Team <team@phalcon.io>
 *
 * For the full copyright and license information, please view the LICENSE.txt
 * file that was distributed with this source code.
 *
 * Implementation of this file has been influenced by AuraPHP
 * @link    https://github.com/auraphp/Aura.Html
 * @license https://github.com/auraphp/Aura.Html/blob/2.x/LICENSE
 */
/**
 * Class EscaperFactory
 */
ZEPHIR_INIT_CLASS(Phalcon_Html_EscaperFactory)
{
	ZEPHIR_REGISTER_CLASS(Phalcon\\Html, EscaperFactory, phalcon, html_escaperfactory, phalcon_html_escaperfactory_method_entry, 0);

	return SUCCESS;
}

/**
 * Create a new instance of the object
 *
 * @return Escaper
 */
PHP_METHOD(Phalcon_Html_EscaperFactory, newInstance)
{
	zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL;
	zend_long ZEPHIR_LAST_CALL_STATUS;
	ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0);
	zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__);

	object_init_ex(return_value, phalcon_html_escaper_ce);
	ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 0);
	zephir_check_call_status();
	RETURN_MM();
}

