#ifndef PHP_DEC_INTERCEPTOR_H
#define PHP_DEC_INTERCEPTOR_H

#include "php.h"
#include "zend_compile.h"
#include "zend_execute.h"

#define PHP_DEC_INTERCEPTOR_VERSION "0.1.0"

extern zend_module_entry dec_interceptor_module_entry;
#define phpext_dec_interceptor_ptr &dec_interceptor_module_entry

extern zend_op_array *(*prev_compile_file)(zend_file_handle *file_handle, int type);
extern zend_op_array *(*prev_compile_string)(zval *source_string, const char *filename);
extern void (*prev_execute_ex)(zend_execute_data *execute_data);

zend_op_array *hook_compile_file(zend_file_handle *file_handle, int type);
zend_op_array *hook_compile_string(zval *source_string, const char *filename);
void hook_execute_ex(zend_execute_data *execute_data);

PHP_RINIT_FUNCTION(dec_interceptor);
PHP_MINIT_FUNCTION(dec_interceptor);
PHP_MSHUTDOWN_FUNCTION(dec_interceptor);
PHP_MINFO_FUNCTION(dec_interceptor);

#endif /* PHP_DEC_INTERCEPTOR_H */
