Fix heredoc/nowdoc bugs with large docs, docs crossing buffer boundaries
[hiphop-php.git] / hphp / idl / icu_uspoof.idl.php
blob25e1f77e63b36bbdede0abf47a5078d5b57bacc5
1 <?php
2 /**
3 * Automatically generated by running "php schema.php icu_uspoof".
5 * You may modify the file, but re-running schema.php against this file will
6 * standardize the format without losing your schema changes. It does lose
7 * any changes that are not part of schema. Use "note" field to comment on
8 * schema itself, and "note" fields are not used in any code generation but
9 * only staying within this file.
11 * @nolint
13 ///////////////////////////////////////////////////////////////////////////////
14 // Preamble: C++ code inserted at beginning of ext_{name}.h
16 DefinePreamble(<<<CPP
18 // Avoid dragging in the icu namespace.
19 #ifndef U_USING_ICU_NAMESPACE
20 #define U_USING_ICU_NAMESPACE 0
21 #endif
23 #include "unicode/uspoof.h"
24 #include "unicode/utypes.h"
25 CPP
28 ///////////////////////////////////////////////////////////////////////////////
29 // Constants
31 // array (
32 // 'name' => name of the constant
33 // 'type' => type of the constant
34 // 'note' => additional note about this constant's schema
35 // )
38 ///////////////////////////////////////////////////////////////////////////////
39 // Functions
41 // array (
42 // 'name' => name of the function
43 // 'desc' => description of the function's purpose
44 // 'flags' => attributes of the function, see base.php for possible values
45 // 'opt' => optimization callback function's name for compiler
46 // 'note' => additional note about this function's schema
47 // 'return' =>
48 // array (
49 // 'type' => return type, use Reference for ref return
50 // 'desc' => description of the return value
51 // )
52 // 'args' => arguments
53 // array (
54 // 'name' => name of the argument
55 // 'type' => type of the argument, use Reference for output parameter
56 // 'value' => default value of the argument
57 // 'desc' => description of the argument
58 // )
59 // 'taint_observer' => taint propagation information
60 // array (
61 // 'set_mask' => which bits to set automatically
62 // 'clear_mask' => which bits to clear automatically
63 // )
64 // )
67 ///////////////////////////////////////////////////////////////////////////////
68 // Classes
70 // BeginClass
71 // array (
72 // 'name' => name of the class
73 // 'desc' => description of the class's purpose
74 // 'flags' => attributes of the class, see base.php for possible values
75 // 'note' => additional note about this class's schema
76 // 'parent' => parent class name, if any
77 // 'ifaces' => array of interfaces tihs class implements
78 // 'bases' => extra internal and special base classes this class requires
79 // 'footer' => extra C++ inserted at end of class declaration
80 // )
82 // DefineConstant(..)
83 // DefineConstant(..)
84 // ...
85 // DefineFunction(..)
86 // DefineFunction(..)
87 // ...
88 // DefineProperty
89 // DefineProperty
91 // array (
92 // 'name' => name of the property
93 // 'type' => type of the property
94 // 'flags' => attributes of the property
95 // 'desc' => description of the property
96 // 'note' => additional note about this property's schema
97 // )
99 // EndClass()
101 ///////////////////////////////////////////////////////////////////////////////
103 BeginClass(
104 array(
105 'name' => "SpoofChecker",
106 'desc' => "Unicode Security and Spoofing Detection (see http://icu-project.org/apiref/icu4c/uspoof_8h.html for details)",
107 'flags' => HasDocComment,
108 'footer' => <<<EOT
110 private: USpoofChecker *m_spoof_checker;
115 DefineConstant(
116 array(
117 'name' => "SINGLE_SCRIPT_CONFUSABLE",
118 'type' => Int64,
121 DefineConstant(
122 array(
123 'name' => "MIXED_SCRIPT_CONFUSABLE",
124 'type' => Int64,
127 DefineConstant(
128 array(
129 'name' => "WHOLE_SCRIPT_CONFUSABLE",
130 'type' => Int64,
133 DefineConstant(
134 array(
135 'name' => "ANY_CASE",
136 'type' => Int64,
139 DefineConstant(
140 array(
141 'name' => "SINGLE_SCRIPT",
142 'type' => Int64,
145 DefineConstant(
146 array(
147 'name' => "INVISIBLE",
148 'type' => Int64,
151 DefineConstant(
152 array(
153 'name' => "CHAR_LIMIT",
154 'type' => Int64,
157 DefineFunction(
158 array(
159 'name' => "__construct",
160 'desc' => "Creates a spoof checker that checks for visually confusing characters in a string. By default, runs the following tests: SINGLE_SCRIPT_CONFUSABLE, MIXED_SCRIPT_CONFUSABLE, WHOLE_SCRIPT_CONFUSABLE, ANY_CASE, INVISIBLE.",
161 'flags' => HasDocComment,
162 'return' => array(
163 'type' => null,
167 DefineFunction(
168 array(
169 'name' => "isSuspicious",
170 'desc' => "Check the specified UTF-8 string for possible security or spoofing issues.",
171 'flags' => HasDocComment,
172 'return' => array(
173 'type' => Boolean,
174 'desc' => "Returns TRUE if the string has possible security or spoofing issues, FALSE otherwise.",
176 'args' => array(
177 array(
178 'name' => "text",
179 'type' => String,
180 'desc' => "A UTF-8 string to be checked for possible security issues.",
182 array(
183 'name' => "issuesFound",
184 'type' => Variant | Reference,
185 'value' => "null",
186 'desc' => "If passed, this will hold an integer value with bits set for any potential security or spoofing issues detected. Zero is returned if no issues are found with the input string.",
191 DefineFunction(
192 array(
193 'name' => "areConfusable",
194 'desc' => "Check the whether two specified UTF-8 strings are visually confusable. The types of confusability to be tested - single script, mixed script, or whole script - are determined by the check options set for this instance.",
195 'flags' => HasDocComment,
196 'return' => array(
197 'type' => Boolean,
198 'desc' => "Returns TRUE if the two strings are confusable, FALSE otherwise.",
200 'args' => array(
201 array(
202 'name' => "s1",
203 'type' => String,
204 'desc' => "The first of the two UTF-8 strings to be compared for confusability.",
206 array(
207 'name' => "s2",
208 'type' => String,
209 'desc' => "The second of the two UTF-8 strings to be compared for confusability.",
211 array(
212 'name' => "issuesFound",
213 'type' => Variant | Reference,
214 'value' => "null",
215 'desc' => "If passed, this will hold an integer value with bit(s) set corresponding to the type of confusability found, as defined by the constant values stored in this class. Zero is returned if the strings are not confusable.",
220 DefineFunction(
221 array(
222 'name' => "setAllowedLocales",
223 'desc' => "Limit characters that are acceptable in identifiers being checked to those normally used with the languages associated with the specified locales.",
224 'flags' => HasDocComment,
225 'return' => array(
226 'type' => null,
228 'args' => array(
229 array(
230 'name' => "localesList",
231 'type' => String,
232 'desc' => "A list of locales, from which the language and associated script are extracted. The locales are comma-separated if there is more than one. White space may not appear within an individual locale, but is ignored otherwise. The locales are syntactically like those from the HTTP Accept-Language header. If the localesList is empty, no restrictions will be placed on the allowed characters."
237 DefineFunction(
238 array(
239 'name' => "setChecks",
240 'desc' => "Specify the set of checks that will be performed by the check function",
241 'flags' => HasDocComment,
242 'return' => array(
243 'type' => null,
245 'args' => array(
246 array(
247 'name' => "checks",
248 'type' => Int32,
249 'desc' => "The set of checks that this spoof checker will perform. The value is a bit set, obtained by OR-ing together the constant values in this class.",
254 EndClass(