reference/runkit7/functions/runkit7-constant-add.xml
917c06eac884740ef9285f59387a3f5259d66722
...
...
@@ -0,0 +1,93 @@
1
+
<?xml version="1.0" encoding="utf-8"?>
2
+
<!-- $Revision$ -->
3
+

4
+
<refentry xml:id="function.runkit7-constant-add" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
+
<refnamediv>
6
+
<refname>runkit7_constant_add</refname>
7
+
<refpurpose>
8
+
Similar to define(), but allows defining in class definitions as well
9
+
</refpurpose>
10
+
</refnamediv>
11
+

12
+
<refsect1 role="description">
13
+
&reftitle.description;
14
+
<methodsynopsis>
15
+
<type>bool</type><methodname>runkit7_constant_add</methodname>
16
+
<methodparam><type>string</type><parameter>constant_name</parameter></methodparam>
17
+
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
18
+
<methodparam choice="opt"><type>int</type><parameter>newVisibility</parameter></methodparam>
19
+
</methodsynopsis>
20
+
</refsect1>
21
+

22
+
<refsect1 role="parameters">
23
+
&reftitle.parameters;
24
+
<variablelist>
25
+
<varlistentry>
26
+
<term><parameter>constant_name</parameter></term>
27
+
<listitem>
28
+
<para>
29
+
Name of constant to declare. Either a string to indicate a global constant,
30
+
or <literal>classname::constname</literal> to indicate a class constant.
31
+
</para>
32
+
</listitem>
33
+
</varlistentry>
34
+
<varlistentry>
35
+
<term><parameter>value</parameter></term>
36
+
<listitem>
37
+
<para>
38
+
NULL, Bool, Long, Double, String, Array, or Resource value to store in the new constant.
39
+
</para>
40
+
</listitem>
41
+
</varlistentry>
42
+
<varlistentry>
43
+
<term><parameter>newVisibility</parameter></term>
44
+
<listitem>
45
+
<para>
46
+
Visibility of the constant, for class constants. Public by default.
47
+
One of the <constant>RUNKIT7_ACC_*</constant> constants.
48
+
</para>
49
+
</listitem>
50
+
</varlistentry>
51
+
</variablelist>
52
+
</refsect1>
53
+

54
+
<refsect1 role="returnvalues">
55
+
&reftitle.returnvalues;
56
+
<para>
57
+
&return.success;
58
+
</para>
59
+
</refsect1>
60
+

61
+
<refsect1 role="seealso">
62
+
&reftitle.seealso;
63
+
<para>
64
+
<simplelist>
65
+
<member><function>define</function></member>
66
+
<member><function>runkit7_constant_redefine</function></member>
67
+
<member><function>runkit7_constant_remove</function></member>
68
+
</simplelist>
69
+
</para>
70
+
</refsect1>
71
+

72
+
</refentry>
73
+

74
+
<!-- Keep this comment at the end of the file
75
+
Local variables:
76
+
mode: sgml
77
+
sgml-omittag:t
78
+
sgml-shorttag:t
79
+
sgml-minimize-attributes:nil
80
+
sgml-always-quote-attributes:t
81
+
sgml-indent-step:1
82
+
sgml-indent-data:t
83
+
indent-tabs-mode:nil
84
+
sgml-parent-document:nil
85
+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
86
+
sgml-exposed-tags:nil
87
+
sgml-local-catalogs:nil
88
+
sgml-local-ecat-files:nil
89
+
End:
90
+
vim600: syn=xml fen fdm=syntax fdl=2 si
91
+
vim: et tw=78 syn=sgml
92
+
vi: ts=1 sw=1
93
+
-->
0
94