reference/intl/spoofchecker/issuspicious.xml
1976eae0d815797af97a1e16c5cd90ffc2868395
...
...
@@ -1,6 +1,5 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
3
<refentry xml:id="spoofchecker.issuspicious" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
5
<refname>Spoofchecker::isSuspicious</refname>
...
...
@@ -9,35 +8,34 @@
9
8

10
9
<refsect1 role="description">
11
10
&reftitle.description;
12
-
<methodsynopsis>
11
+
<methodsynopsis role="Spoofchecker">
13
12
<modifier>public</modifier> <type>bool</type><methodname>Spoofchecker::isSuspicious</methodname>
14
-
<methodparam><type>string</type><parameter>text</parameter></methodparam>
15
-
<methodparam choice="opt"><type>string</type><parameter role="reference">error</parameter></methodparam>
13
+
<methodparam><type>string</type><parameter>string</parameter></methodparam>
14
+
<methodparam choice="opt"><type>int</type><parameter role="reference">errorCode</parameter><initializer>&null;</initializer></methodparam>
16
15
</methodsynopsis>
17
16
<para>
18
-

17
+
Checks if given string contains any suspicious characters like letters which
18
+
are almost identical visually, but are Unicode characters from different sets.
19
19
</para>
20
-

21
-
&warn.undocumented.func;
22
-

23
20
</refsect1>
24
21

25
22
<refsect1 role="parameters">
26
23
&reftitle.parameters;
27
24
<variablelist>
28
25
<varlistentry>
29
-
<term><parameter>text</parameter></term>
26
+
<term><parameter>string</parameter></term>
30
27
<listitem>
31
28
<para>
32
-
29
+
String to test.
33
30
</para>
34
31
</listitem>
35
32
</varlistentry>
36
33
<varlistentry>
37
-
<term><parameter>error</parameter></term>
34
+
<term><parameter>errorCode</parameter></term>
38
35
<listitem>
39
36
<para>
40
-
37
+
This variable is set by-reference to &integer; containing an error, if there
38
+
was any.
41
39
</para>
42
40
</listitem>
43
41
</varlistentry>
...
...
@@ -47,13 +45,30 @@
47
45
<refsect1 role="returnvalues">
48
46
&reftitle.returnvalues;
49
47
<para>
50
-

48
+
Returns &true; if there are suspicious characters, &false; otherwise.
51
49
</para>
52
50
</refsect1>
53
51

52
+
<refsect1 role="examples">
53
+
&reftitle.examples;
54
+
<para>
55
+
<example>
56
+
<title><function>Spoofchecker::isSuspicious</function> example</title>
57
+
<programlisting role="php">
58
+
<![CDATA[
59
+
<?php
60
+
$checker = new Spoofchecker();
54
61

55
-
</refentry>
62
+
$checker->isSuspicious('google.com'); // FALSE: only ASCII characters
56
63

64
+
$checker->isSuspicious('Рaypal.com'); // TRUE
65
+
// The first letter is from Cyrylic, not a regular latin "P"
66
+
]]>
67
+
</programlisting>
68
+
</example>
69
+
</para>
70
+
</refsect1>
71
+
</refentry>
57
72
<!-- Keep this comment at the end of the file
58
73
Local variables:
59
74
mode: sgml
60
75