1 /* 2 +----------------------------------------------------------------------+ 3 | Copyright (c) The PHP Group | 4 +----------------------------------------------------------------------+ 5 | This source file is subject to version 3.01 of the PHP license, | 6 | that is bundled with this package in the file LICENSE, and is | 7 | available through the world-wide-web at the following url: | 8 | https://www.php.net/license/3_01.txt | 9 | If you did not receive a copy of the PHP license and are unable to | 10 | obtain it through the world-wide-web, please send a note to | 11 | license@php.net so we can mail you a copy immediately. | 12 +----------------------------------------------------------------------+ 13 | Authors: Marcus Boerger <helly@php.net> | 14 +----------------------------------------------------------------------+ 15 */ 16 17 #ifndef PHP_FUNCTIONS_H 18 #define PHP_FUNCTIONS_H 19 20 #include "php.h" 21 22 typedef zend_object* (*create_object_func_t)(zend_class_entry *class_type); 23 24 /* sub: whether to allow subclasses/interfaces 25 allow = 0: allow all classes and interfaces 26 allow > 0: allow all that match and mask ce_flags 27 allow < 0: disallow all that match and mask ce_flags 28 */ 29 void spl_add_class_name(zval * list, zend_class_entry * pce, int allow, int ce_flags); 30 void spl_add_interfaces(zval * list, zend_class_entry * pce, int allow, int ce_flags); 31 void spl_add_traits(zval * list, zend_class_entry * pce, int allow, int ce_flags); 32 void spl_add_classes(zend_class_entry *pce, zval *list, bool sub, int allow, int ce_flags); 33 34 /* caller must efree(return) */ 35 zend_string *spl_gen_private_prop_name(zend_class_entry *ce, char *prop_name, size_t prop_len); 36 37 #endif /* PHP_FUNCTIONS_H */ 38