php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
enchant.c
Go to the documentation of this file.
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 | Author: Pierre-Alain Joye <paj@pearfr.org> |
14 | Ilia Alshanetsky <ilia@prohost.org> |
15 +----------------------------------------------------------------------+
16*/
17
18#ifdef HAVE_CONFIG_H
19#include <config.h>
20#endif
21
22#include "php.h"
23#include "php_ini.h"
24#include "ext/standard/info.h"
27#include <enchant.h>
28#include "php_enchant.h"
29
30#define PHP_ENCHANT_MYSPELL 1
31#define PHP_ENCHANT_ISPELL 2
32#ifdef HAVE_ENCHANT_GET_VERSION
33#define PHP_ENCHANT_GET_VERSION enchant_get_version()
34#endif
35
36#include "enchant_arginfo.h"
37
43
49
51static zend_object_handlers enchant_broker_handlers;
52
53static inline enchant_broker *enchant_broker_from_obj(zend_object *obj) {
54 return (enchant_broker *)((char *)(obj) - XtOffsetOf(enchant_broker, std));
55}
56
57#define Z_ENCHANT_BROKER_P(zv) enchant_broker_from_obj(Z_OBJ_P(zv))
58
59static zend_object *enchant_broker_create_object(zend_class_entry *class_type) {
60 enchant_broker *intern = zend_object_alloc(sizeof(enchant_broker), class_type);
61
62 zend_object_std_init(&intern->std, class_type);
63 object_properties_init(&intern->std, class_type);
64
65 return &intern->std;
66}
67
69static zend_object_handlers enchant_dict_handlers;
70
71static inline enchant_dict *enchant_dict_from_obj(zend_object *obj) {
72 return (enchant_dict *)((char *)(obj) - XtOffsetOf(enchant_dict, std));
73}
74
75#define Z_ENCHANT_DICT_P(zv) enchant_dict_from_obj(Z_OBJ_P(zv))
76
77static zend_object *enchant_dict_create_object(zend_class_entry *class_type) {
78 enchant_dict *intern = zend_object_alloc(sizeof(enchant_dict), class_type);
79
80 zend_object_std_init(&intern->std, class_type);
81 object_properties_init(&intern->std, class_type);
82
83 return &intern->std;
84}
85
86/* {{{ enchant_module_entry */
89 "enchant",
90 ext_functions,
91 PHP_MINIT(enchant),
92 PHP_MSHUTDOWN(enchant),
93 NULL, /* Replace with NULL if there's nothing to do at request start */
94 NULL, /* Replace with NULL if there's nothing to do at request end */
95 PHP_MINFO(enchant),
98};
99/* }}} */
100
101#ifdef COMPILE_DL_ENCHANT
102ZEND_GET_MODULE(enchant)
103#endif
104
105static void
106enumerate_providers_fn (const char * const name,
107 const char * const desc,
108 const char * const file,
109 void * ud) /* {{{ */
110{
111 zval *zdesc = (zval *) ud;
112 zval tmp_array;
113
114 array_init(&tmp_array);
115
116 add_assoc_string(&tmp_array, "name", (char *)name);
117 add_assoc_string(&tmp_array, "desc", (char *)desc);
118 add_assoc_string(&tmp_array, "file", (char *)file);
119 add_next_index_zval(zdesc, &tmp_array);
120}
121/* }}} */
122
123static void
124describe_dict_fn (const char * const lang,
125 const char * const name,
126 const char * const desc,
127 const char * const file,
128 void * ud) /* {{{ */
129{
130 zval *zdesc = (zval *) ud;
131 array_init(zdesc);
132 add_assoc_string(zdesc, "lang", (char *)lang);
133 add_assoc_string(zdesc, "name", (char *)name);
134 add_assoc_string(zdesc, "desc", (char *)desc);
135 add_assoc_string(zdesc, "file", (char *)file);
136}
137/* }}} */
138
139static void php_enchant_list_dicts_fn( const char * const lang_tag,
140 const char * const provider_name, const char * const provider_desc,
141 const char * const provider_file, void * ud) /* {{{ */
142{
143 zval *zdesc = (zval *) ud;
144 zval tmp_array;
145
146 array_init(&tmp_array);
147 add_assoc_string(&tmp_array, "lang_tag", (char *)lang_tag);
148 add_assoc_string(&tmp_array, "provider_name", (char *)provider_name);
149 add_assoc_string(&tmp_array, "provider_desc", (char *)provider_desc);
150 add_assoc_string(&tmp_array, "provider_file", (char *)provider_file);
151 add_next_index_zval(zdesc, &tmp_array);
152
153}
154/* }}} */
155
156static void php_enchant_broker_free(zend_object *object) /* {{{ */
157{
158 enchant_broker *broker = enchant_broker_from_obj(object);
159
160 if (broker->pbroker) { /* may have been freed by enchant_broker_free */
162 broker->pbroker = NULL;
163 }
164 zend_object_std_dtor(object);
165}
166/* }}} */
167
168static void php_enchant_dict_free(zend_object *object) /* {{{ */
169
170{
171 enchant_dict *dict = enchant_dict_from_obj(object);
172
173 if (dict->pdict) { /* may have been freed by enchant_broker_free_dict */
174 enchant_broker *broker = Z_ENCHANT_BROKER_P(&dict->zbroker);
175
176 if (broker && broker->pbroker) {
177 enchant_broker_free_dict(broker->pbroker, dict->pdict);
178 broker->nb_dict--;
179 zval_ptr_dtor(&dict->zbroker);
180 }
181 dict->pdict = NULL;
182 }
183 zend_object_std_dtor(object);
184}
185/* }}} */
186
187/* {{{ PHP_MINIT_FUNCTION */
189{
190 enchant_broker_ce = register_class_EnchantBroker();
191 enchant_broker_ce->create_object = enchant_broker_create_object;
192 enchant_broker_ce->default_object_handlers = &enchant_broker_handlers;
193
194 memcpy(&enchant_broker_handlers, &std_object_handlers, sizeof(zend_object_handlers));
195 enchant_broker_handlers.offset = XtOffsetOf(enchant_broker, std);
196 enchant_broker_handlers.free_obj = php_enchant_broker_free;
197 enchant_broker_handlers.clone_obj = NULL;
198 enchant_broker_handlers.compare = zend_objects_not_comparable;
199
200 enchant_dict_ce = register_class_EnchantDictionary();
201 enchant_dict_ce->create_object = enchant_dict_create_object;
202 enchant_dict_ce->default_object_handlers = &enchant_dict_handlers;
203
204 memcpy(&enchant_dict_handlers, &std_object_handlers, sizeof(zend_object_handlers));
205 enchant_dict_handlers.offset = XtOffsetOf(enchant_dict, std);
206 enchant_dict_handlers.free_obj = php_enchant_dict_free;
207 enchant_dict_handlers.clone_obj = NULL;
208 enchant_dict_handlers.compare = zend_objects_not_comparable;
209
210 register_enchant_symbols(module_number);
211
212 return SUCCESS;
213}
214/* }}} */
215
216/* {{{ PHP_MSHUTDOWN_FUNCTION */
218{
219 return SUCCESS;
220}
221/* }}} */
222
223static void __enumerate_providers_fn (const char * const name,
224 const char * const desc,
225 const char * const file,
226 void * ud) /* {{{ */
227{
229}
230/* }}} */
231
232/* {{{ PHP_MINFO_FUNCTION */
234{
235 EnchantBroker *pbroker;
236
237 pbroker = enchant_broker_init();
239 php_info_print_table_row(2, "enchant support", "enabled");
240#ifdef HAVE_ENCHANT_GET_VERSION
241 php_info_print_table_row(2, "Libenchant Version", enchant_get_version());
242#elif defined(HAVE_ENCHANT_BROKER_SET_PARAM)
243 php_info_print_table_row(2, "Libenchant Version", "1.5.x");
244#endif
246
248 enchant_broker_describe(pbroker, __enumerate_providers_fn, NULL);
250 enchant_broker_free(pbroker);
251}
252/* }}} */
253
254#define PHP_ENCHANT_GET_BROKER \
255 pbroker = Z_ENCHANT_BROKER_P(broker); \
256 if (!pbroker->pbroker) { \
257 zend_value_error("Invalid or uninitialized EnchantBroker object"); \
258 RETURN_THROWS(); \
259 }
260
261#define PHP_ENCHANT_GET_DICT \
262 pdict = Z_ENCHANT_DICT_P(dict); \
263 if (!pdict->pdict) { \
264 zend_value_error("Invalid or uninitialized EnchantDictionary object"); \
265 RETURN_THROWS(); \
266 }
267
268/* {{{ create a new broker object capable of requesting */
270{
271 enchant_broker *broker;
272 EnchantBroker *pbroker;
273
276 }
277
278 pbroker = enchant_broker_init();
279 if (pbroker) {
282 broker->pbroker = pbroker;
283 broker->nb_dict = 0;
284 } else {
286 }
287}
288/* }}} */
289
290/* {{{ Destroys the broker object and its dictionaries */
292{
293 zval *broker;
294 enchant_broker *pbroker;
295
298 }
300
301 if (pbroker->nb_dict > 0) {
302 zend_throw_error(NULL, "Cannot free EnchantBroker object with open EnchantDictionary objects");
304 }
305 if (pbroker->pbroker) {
307 pbroker->pbroker = NULL;
308 }
310}
311/* }}} */
312
313/* {{{ Returns the last error of the broker */
315{
316 zval *broker;
317 enchant_broker *pbroker;
318 const char *msg;
319
322 }
323
325
327 if (msg) {
328 RETURN_STRING((char *)msg);
329 }
331}
332/* }}} */
333
334/* {{{ Set the directory path for a given backend, works with ispell and myspell */
336{
337 zval *broker;
338 zend_long dict_type;
339 char *value;
340 size_t value_len;
341
342 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Olp", &broker, enchant_broker_ce, &dict_type, &value, &value_len) == FAILURE) {
344 }
345
346#ifdef HAVE_ENCHANT_BROKER_SET_PARAM
347 enchant_broker *pbroker;
348 if (!value_len) {
350 }
351
353
354 switch (dict_type) {
357 enchant_broker_set_param(pbroker->pbroker, "enchant.myspell.dictionary.path", (const char *)value);
359 break;
360
363 enchant_broker_set_param(pbroker->pbroker, "enchant.ispell.dictionary.path", (const char *)value);
365 break;
366
367 default:
369 }
370#endif
371}
372/* }}} */
373
374
375/* {{{ Get the directory path for a given backend, works with ispell and myspell */
377{
378 zval *broker;
379 zend_long dict_type;
380
381 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol", &broker, enchant_broker_ce, &dict_type) == FAILURE) {
383 }
384
385#ifdef HAVE_ENCHANT_BROKER_SET_PARAM
386 enchant_broker *pbroker;
387 char *value;
389
390 switch (dict_type) {
393 value = enchant_broker_get_param(pbroker->pbroker, "enchant.myspell.dictionary.path");
394 break;
395
398 value = enchant_broker_get_param(pbroker->pbroker, "enchant.ispell.dictionary.path");
399 break;
400
401 default:
403 }
404
405 if (value == NULL) {
406 php_error_docref(NULL, E_WARNING, "dict_path not set");
408 }
409
411#endif
412}
413/* }}} */
414
415/* {{{ Lists the dictionaries available for the given broker */
417{
418 zval *broker;
419 enchant_broker *pbroker;
420
423 }
424
426
428 enchant_broker_list_dicts(pbroker->pbroker, php_enchant_list_dicts_fn, (void *)return_value);
429}
430/* }}} */
431
432/* {{{ create a new dictionary using tag, the non-empty language tag you wish to request
433 a dictionary for ("en_US", "de_DE", ...) */
435{
436 zval *broker;
437 enchant_broker *pbroker;
438 enchant_dict *dict;
439 EnchantDict *pdict;
440 char *tag;
441 size_t taglen;
442
443 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &broker, enchant_broker_ce, &tag, &taglen) == FAILURE) {
445 }
446
448
449 if (taglen == 0) {
452 }
453
454 pdict = enchant_broker_request_dict(pbroker->pbroker, (const char *)tag);
455 if (pdict) {
456 pbroker->nb_dict++;
457
460 dict->pdict = pdict;
461 ZVAL_COPY(&dict->zbroker, broker);
462 } else {
464 }
465}
466/* }}} */
467
468/* {{{ creates a dictionary using a PWL file. A PWL file is personal word file one word per line. It must exist before the call.*/
470{
471 zval *broker;
472 enchant_broker *pbroker;
473 enchant_dict *dict;
474 EnchantDict *pdict;
475 const char *pwl;
476 size_t pwllen;
477
478 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &broker, enchant_broker_ce, &pwl, &pwllen) == FAILURE) {
480 }
481
482 if (php_check_open_basedir(pwl)) {
484 }
485
487
488 pdict = enchant_broker_request_pwl_dict(pbroker->pbroker, pwl);
489 if (pdict) {
490 pbroker->nb_dict++;
491
494 dict->pdict = pdict;
495 ZVAL_COPY(&dict->zbroker, broker);
496 } else {
498 }
499}
500/* }}} */
501
502/* {{{ Free the dictionary resource */
504{
505 zval *dict;
506 enchant_dict *pdict;
507
510 }
511
513
514 if (pdict->pdict) {
515 enchant_broker *broker = Z_ENCHANT_BROKER_P(&pdict->zbroker);
516
517 if (broker && broker->pbroker) {
518 enchant_broker_free_dict(broker->pbroker, pdict->pdict);
519 broker->nb_dict--;
520 zval_ptr_dtor(&pdict->zbroker);
521 }
522 pdict->pdict = NULL;
523 }
524
526}
527/* }}} */
528
529/* {{{ Whether a dictionary exists or not. Using non-empty tag */
531{
532 zval *broker;
533 char *tag;
534 size_t taglen;
535 enchant_broker * pbroker;
536
537 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &broker, enchant_broker_ce, &tag, &taglen) == FAILURE) {
539 }
540
542
544}
545/* }}} */
546
547/* {{{ Declares a preference of dictionaries to use for the language
548 described/referred to by 'tag'. The ordering is a comma delimited
549 list of provider names. As a special exception, the "*" tag can
550 be used as a language tag to declare a default ordering for any
551 language that does not explicitly declare an ordering. */
552
554{
555 zval *broker;
556 char *pordering;
557 size_t porderinglen;
558 char *ptag;
559 size_t ptaglen;
560 enchant_broker * pbroker;
561
562 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Opp", &broker, enchant_broker_ce, &ptag, &ptaglen, &pordering, &porderinglen) == FAILURE) {
564 }
565
567
568 enchant_broker_set_ordering(pbroker->pbroker, ptag, pordering);
570}
571/* }}} */
572
573/* {{{ Enumerates the Enchant providers and tells you some rudimentary information about them. The same info is provided through phpinfo() */
575{
576 EnchantBrokerDescribeFn describetozval = enumerate_providers_fn;
577 zval *broker;
578 enchant_broker * pbroker;
579
582 }
583
585
587 enchant_broker_describe(pbroker->pbroker, describetozval, (void *)return_value);
588}
589/* }}} */
590
591/* {{{ If the word is correctly spelled return true, otherwise return false, if suggestions variable
592 is provided, fill it with spelling alternatives. */
594{
595 zval *dict, *sugg = NULL;
596 char *word;
597 size_t wordlen;
598 enchant_dict *pdict;
599
600 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op|z", &dict, enchant_dict_ce, &word, &wordlen, &sugg) == FAILURE) {
602 }
603
604 if (sugg) {
605 sugg = zend_try_array_init(sugg);
606 if (!sugg) {
608 }
609 }
610
612
613 if (enchant_dict_check(pdict->pdict, word, wordlen) > 0) {
614 size_t n_sugg;
615 char **suggs;
616
617 if (!sugg && ZEND_NUM_ARGS() == 2) {
619 }
620
621 suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, &n_sugg);
622 if (suggs && n_sugg) {
623 size_t i;
624 for (i = 0; i < n_sugg; i++) {
625 add_next_index_string(sugg, suggs[i]);
626 }
627 enchant_dict_free_string_list(pdict->pdict, suggs);
628 }
629
631 }
632
634}
635/* }}} */
636
637/* {{{ If the word is correctly spelled return true, otherwise return false */
639{
640 zval *dict;
641 char *word;
642 size_t wordlen;
643 enchant_dict *pdict;
644
645 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) {
647 }
648
650
651 RETURN_BOOL(!enchant_dict_check(pdict->pdict, word, wordlen));
652}
653/* }}} */
654
655/* {{{ Will return a list of values if any of those pre-conditions are not met.*/
657{
658 zval *dict;
659 char *word;
660 size_t wordlen;
661 char **suggs;
662 enchant_dict *pdict;
663 size_t n_sugg;
664
665 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) {
667 }
668
671
672 suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, &n_sugg);
673 if (suggs && n_sugg) {
674 size_t i;
675
676 for (i = 0; i < n_sugg; i++) {
678 }
679
680 enchant_dict_free_string_list(pdict->pdict, suggs);
681 }
682}
683/* }}} */
684
685/* {{{ add 'word' to personal word list */
687{
688 zval *dict;
689 char *word;
690 size_t wordlen;
691 enchant_dict *pdict;
692
693 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) {
695 }
696
698
699 enchant_dict_add(pdict->pdict, word, wordlen);
700}
701/* }}} */
702
703/* {{{ add 'word' to this spell-checking session */
705{
706 zval *dict;
707 char *word;
708 size_t wordlen;
709 enchant_dict *pdict;
710
711 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) {
713 }
714
716
717 enchant_dict_add_to_session(pdict->pdict, word, wordlen);
718}
719/* }}} */
720
721/* {{{ whether or not 'word' exists in this spelling-session */
723{
724 zval *dict;
725 char *word;
726 size_t wordlen;
727 enchant_dict *pdict;
728
729 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) {
731 }
732
734
735 RETURN_BOOL(enchant_dict_is_added(pdict->pdict, word, wordlen));
736}
737/* }}} */
738
739/* {{{ add a correction for 'mis' using 'cor'.
740 Notes that you replaced @mis with @cor, so it's possibly more likely
741 that future occurrences of @mis will be replaced with @cor. So it might
742 bump @cor up in the suggestion list.*/
744{
745 zval *dict;
746 char *mis, *cor;
747 size_t mislen, corlen;
748
749 enchant_dict *pdict;
750
751 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Opp", &dict, enchant_dict_ce, &mis, &mislen, &cor, &corlen) == FAILURE) {
753 }
754
756
757 enchant_dict_store_replacement(pdict->pdict, mis, mislen, cor, corlen);
758}
759/* }}} */
760
761/* {{{ Returns the last error of the current spelling-session */
763{
764 zval *dict;
765 enchant_dict *pdict;
766 const char *msg;
767
770 }
771
773
775 if (msg) {
776 RETURN_STRING((char *)msg);
777 }
778
780}
781/* }}} */
782
783/* {{{ Describes an individual dictionary 'dict' */
785{
786 zval *dict;
787 enchant_dict *pdict;
788
791 }
792
794
795 enchant_dict_describe(pdict->pdict, describe_dict_fn, (void *)return_value);
796}
797/* }}} */
file(string $filename, int $flags=0, $context=null)
#define Z_ENCHANT_DICT_P(zv)
Definition enchant.c:75
struct _dict_struct enchant_dict
zend_class_entry * enchant_broker_ce
Definition enchant.c:50
#define PHP_ENCHANT_ISPELL
Definition enchant.c:31
#define PHP_ENCHANT_MYSPELL
Definition enchant.c:30
#define PHP_ENCHANT_GET_DICT
Definition enchant.c:261
zend_class_entry * enchant_dict_ce
Definition enchant.c:68
zend_module_entry enchant_module_entry
Definition enchant.c:87
#define Z_ENCHANT_BROKER_P(zv)
Definition enchant.c:57
#define PHP_ENCHANT_GET_BROKER
Definition enchant.c:254
struct _broker_struct enchant_broker
enchant_broker_get_dict_path(EnchantBroker $broker, int $type)
enchant_broker_get_error(EnchantBroker $broker)
enchant_dict_quick_check(EnchantDictionary $dictionary, string $word, &$suggestions=null)
enchant_dict_suggest(EnchantDictionary $dictionary, string $word)
enchant_broker_set_ordering(EnchantBroker $broker, string $tag, string $ordering)
enchant_broker_request_dict(EnchantBroker $broker, string $tag)
enchant_broker_init()
enchant_broker_set_dict_path(EnchantBroker $broker, int $type, string $path)
enchant_broker_free_dict(EnchantDictionary $dictionary)
enchant_dict_store_replacement(EnchantDictionary $dictionary, string $misspelled, string $correct)
enchant_broker_describe(EnchantBroker $broker)
enchant_broker_list_dicts(EnchantBroker $broker)
enchant_broker_request_pwl_dict(EnchantBroker $broker, string $filename)
enchant_dict_add(EnchantDictionary $dictionary, string $word)
enchant_dict_describe(EnchantDictionary $dictionary)
enchant_dict_check(EnchantDictionary $dictionary, string $word)
enchant_dict_is_added(EnchantDictionary $dictionary, string $word)
enchant_dict_get_error(EnchantDictionary $dictionary)
enchant_dict_add_to_session(EnchantDictionary $dictionary, string $word)
enchant_broker_free(EnchantBroker $broker)
enchant_broker_dict_exists(EnchantBroker $broker, string $tag)
memcpy(ptr1, ptr2, size)
PHPAPI int php_check_open_basedir(const char *path)
#define NULL
Definition gdcache.h:45
#define SUCCESS
Definition hash_sha3.c:261
PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format,...)
Definition main.c:1173
php_info_print_table_start()
Definition info.c:1064
php_info_print_table_row(2, "PDO Driver for Firebird", "enabled")
php_info_print_table_end()
Definition info.c:1074
#define PHP_FUNCTION
Definition php.h:364
#define PHP_MSHUTDOWN_FUNCTION
Definition php.h:401
#define PHP_MINFO
Definition php.h:396
#define PHP_MINIT_FUNCTION
Definition php.h:400
#define PHP_MSHUTDOWN
Definition php.h:393
#define PHP_MINFO_FUNCTION
Definition php.h:404
#define PHP_MINIT
Definition php.h:392
#define PHP_ENCHANT_VERSION
Definition php_enchant.h:23
char * msg
Definition phpdbg.h:289
zend_object std
Definition enchant.c:41
EnchantBroker * pbroker
Definition enchant.c:39
zend_object std
Definition enchant.c:47
EnchantDict * pdict
Definition enchant.c:45
zval zbroker
Definition enchant.c:46
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format,...)
Definition zend.c:1772
ZEND_API zend_result object_init_ex(zval *arg, zend_class_entry *class_type)
Definition zend_API.c:1849
ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec,...)
Definition zend_API.c:1300
ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type)
Definition zend_API.c:1688
ZEND_API ZEND_COLD void zend_argument_must_not_be_empty_error(uint32_t arg_num)
Definition zend_API.c:443
ZEND_API zend_result add_next_index_string(zval *arg, const char *str)
Definition zend_API.c:2186
#define ZEND_NUM_ARGS()
Definition zend_API.h:530
#define RETURN_STRING(s)
Definition zend_API.h:1043
#define RETURN_FALSE
Definition zend_API.h:1058
#define ZEND_GET_MODULE(name)
Definition zend_API.h:241
#define zend_parse_parameters_none()
Definition zend_API.h:353
#define RETURN_BOOL(b)
Definition zend_API.h:1035
#define RETURN_THROWS()
Definition zend_API.h:1060
#define RETURN_TRUE
Definition zend_API.h:1059
#define array_init(arg)
Definition zend_API.h:537
struct _zval_struct zval
#define E_WARNING
Definition zend_errors.h:24
int32_t zend_long
Definition zend_long.h:42
#define STANDARD_MODULE_HEADER
struct _zend_module_entry zend_module_entry
#define STANDARD_MODULE_PROPERTIES
ZEND_API int zend_objects_not_comparable(zval *o1, zval *o2)
ZEND_API const zend_object_handlers std_object_handlers
ZEND_API void ZEND_FASTCALL zend_object_std_init(zend_object *object, zend_class_entry *ce)
ZEND_API void zend_object_std_dtor(zend_object *object)
#define XtOffsetOf(s_type, field)
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
@ FAILURE
Definition zend_types.h:61
#define ZVAL_COPY(z, v)
struct _zend_object_handlers zend_object_handlers
Definition zend_types.h:88
ZEND_API void zval_ptr_dtor(zval *zval_ptr)
zval * return_value
zend_string * name
value