source: www/manuals/PHP_manual/zend.structure.get-module.html@ 1

Last change on this file since 1 was 1, checked in by george, 17 years ago

Prvotní import všeho

File size: 3.8 KB
Line 
1<HTML
2><HEAD
3><TITLE
4>Creation of get_module</TITLE
5><META
6NAME="GENERATOR"
7CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
8REL="HOME"
9TITLE="Manuál PHP"
10HREF="index.html"><LINK
11REL="UP"
12TITLE="Source Discussion"
13HREF="zend.structure.html"><LINK
14REL="PREVIOUS"
15TITLE="Declaration of the Zend Module Block"
16HREF="zend.structure.module-block.html"><LINK
17REL="NEXT"
18TITLE="Implementation of All Exported Functions"
19HREF="zend.structure.implementation.html"><META
20HTTP-EQUIV="Content-type"
21CONTENT="text/html; charset=ISO-8859-2"></HEAD
22><BODY
23CLASS="section"
24BGCOLOR="#FFFFFF"
25TEXT="#000000"
26LINK="#0000FF"
27VLINK="#840084"
28ALINK="#0000FF"
29><DIV
30CLASS="NAVHEADER"
31><TABLE
32SUMMARY="Header navigation table"
33WIDTH="100%"
34BORDER="0"
35CELLPADDING="0"
36CELLSPACING="0"
37><TR
38><TH
39COLSPAN="3"
40ALIGN="center"
41>Manuál PHP</TH
42></TR
43><TR
44><TD
45WIDTH="10%"
46ALIGN="left"
47VALIGN="bottom"
48><A
49HREF="zend.structure.module-block.html"
50ACCESSKEY="P"
51>Pøedcházející</A
52></TD
53><TD
54WIDTH="80%"
55ALIGN="center"
56VALIGN="bottom"
57>Kapitola 31. Source Discussion</TD
58><TD
59WIDTH="10%"
60ALIGN="right"
61VALIGN="bottom"
62><A
63HREF="zend.structure.implementation.html"
64ACCESSKEY="N"
65>Dal¹í</A
66></TD
67></TR
68></TABLE
69><HR
70ALIGN="LEFT"
71WIDTH="100%"></DIV
72><DIV
73CLASS="section"
74><H1
75CLASS="section"
76><A
77NAME="zend.structure.get-module"
78></A
79>Creation of <B
80CLASS="function"
81>get_module()</B
82></H1
83><P
84>&#13; This function is special to all dynamic loadable modules. Take a
85 look at the creation via the <TT
86CLASS="literal"
87>ZEND_GET_MODULE</TT
88>
89 macro first:
90 </P
91><TABLE
92BORDER="0"
93BGCOLOR="#E0E0E0"
94CELLPADDING="5"
95><TR
96><TD
97><PRE
98CLASS="programlisting"
99>#if COMPILE_DL_FIRSTMOD
100 ZEND_GET_MODULE(firstmod)
101#endif</PRE
102></TD
103></TR
104></TABLE
105><P
106>&#13; The function implementation is surrounded by a conditional
107 compilation statement. This is needed since the function
108 <B
109CLASS="function"
110>get_module()</B
111> is only required if your module is
112 built as a dynamic extension. By specifying a definition of
113 <TT
114CLASS="literal"
115>COMPILE_DL_FIRSTMOD</TT
116> in the compiler command
117 (see above for a discussion of the compilation instructions
118 required to build a dynamic extension), you can instruct your
119 module whether you intend to build it as a dynamic extension or as
120 a built-in module. If you want a built-in module, the
121 implementation of <B
122CLASS="function"
123>get_module()</B
124> is simply left
125 out.
126 </P
127><P
128>&#13; <B
129CLASS="function"
130>get_module()</B
131> is called by Zend at load time
132 of the module. You can think of it as being invoked by the
133 <A
134HREF="function.dl.html"
135><B
136CLASS="function"
137>dl()</B
138></A
139> call in your script. Its purpose is to pass the
140 module information block back to Zend in order to inform the engine about the
141 module contents.
142 </P
143><P
144>&#13; If you don't implement a <B
145CLASS="function"
146>get_module()</B
147> function in
148 your dynamic loadable module, Zend will compliment you with an error message
149 when trying to access it.
150 </P
151></DIV
152><DIV
153CLASS="NAVFOOTER"
154><HR
155ALIGN="LEFT"
156WIDTH="100%"><TABLE
157SUMMARY="Footer navigation table"
158WIDTH="100%"
159BORDER="0"
160CELLPADDING="0"
161CELLSPACING="0"
162><TR
163><TD
164WIDTH="33%"
165ALIGN="left"
166VALIGN="top"
167><A
168HREF="zend.structure.module-block.html"
169ACCESSKEY="P"
170>Pøedcházející</A
171></TD
172><TD
173WIDTH="34%"
174ALIGN="center"
175VALIGN="top"
176><A
177HREF="index.html"
178ACCESSKEY="H"
179>Domù</A
180></TD
181><TD
182WIDTH="33%"
183ALIGN="right"
184VALIGN="top"
185><A
186HREF="zend.structure.implementation.html"
187ACCESSKEY="N"
188>Dal¹í</A
189></TD
190></TR
191><TR
192><TD
193WIDTH="33%"
194ALIGN="left"
195VALIGN="top"
196>Declaration of the Zend Module Block</TD
197><TD
198WIDTH="34%"
199ALIGN="center"
200VALIGN="top"
201><A
202HREF="zend.structure.html"
203ACCESSKEY="U"
204>Nahoru</A
205></TD
206><TD
207WIDTH="33%"
208ALIGN="right"
209VALIGN="top"
210>Implementation of All Exported Functions</TD
211></TR
212></TABLE
213></DIV
214></BODY
215></HTML
216>
Note: See TracBrowser for help on using the repository browser.