Skip to content

Commit 783183d

Browse files
committed
merge origin changes
2 parents e2cb521 + 54ba892 commit 783183d

17 files changed

+490
-46
lines changed

doc/edoc-info

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{application,php}.
2+
{packages,[]}.
3+
{modules,[php,php_app,php_eval,php_sup,php_util]}.

doc/erlang.png

2.06 KB
Loading

doc/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>The php application</title>
5+
</head>
6+
<frameset cols="20%,80%">
7+
<frame src="modules-frame.html" name="modulesFrame" title="">
8+
9+
<frame src="overview-summary.html" name="overviewFrame" title="">
10+
<noframes>
11+
<h2>This page uses frames</h2>
12+
<p>Your browser does not accept frames.
13+
<br>You should go to the <a href="overview-summary.html">non-frame version</a> instead.
14+
</p>
15+
</noframes>
16+
</frameset>
17+
</html>

doc/modules-frame.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>The php application</title>
5+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
6+
</head>
7+
<body bgcolor="white">
8+
<h2 class="indextitle">Modules</h2>
9+
<table width="100%" border="0" summary="list of modules">
10+
<tr><td><a href="php.html" target="overviewFrame" class="module">php</a></td></tr>
11+
<tr><td><a href="php_app.html" target="overviewFrame" class="module">php_app</a></td></tr>
12+
<tr><td><a href="php_eval.html" target="overviewFrame" class="module">php_eval</a></td></tr>
13+
<tr><td><a href="php_sup.html" target="overviewFrame" class="module">php_sup</a></td></tr>
14+
<tr><td><a href="php_util.html" target="overviewFrame" class="module">php_util</a></td></tr></table>
15+
</body>
16+
</html>

doc/overview-summary.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>The php application</title>
5+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
6+
</head>
7+
<body bgcolor="white">
8+
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
9+
<h1>The php application</h1>
10+
11+
<hr>
12+
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
13+
<p><i>Generated by EDoc, Aug 19 2010, 16:13:09.</i></p>
14+
</body>
15+
</html>

doc/packages-frame.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>The php application</title>
5+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
6+
</head>
7+
<body bgcolor="white">
8+
<h2 class="indextitle">Packages</h2>
9+
<table width="100%" border="0" summary="list of packages"></table>
10+
</body>
11+
</html>

php.html renamed to doc/php.html

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,42 @@ <h3 class="typedecl"><a name="type-result">result()</a></h3>
4040

4141

4242
<h2><a name="index">Function Index</a></h2>
43-
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#eval-1">eval/1</a></td><td>Equivalent to eval(Code, undefined, infinity).</td></tr>
43+
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#call-2">call/2</a></td><td>Evaluates a function and returns the return value.</td></tr>
44+
<tr><td valign="top"><a href="#eval-1">eval/1</a></td><td>Equivalent to eval(Code, undefined, infinity).</td></tr>
4445
<tr><td valign="top"><a href="#eval-2">eval/2</a></td><td>Equivalent to eval(Code, Php, infinity) or eval(Code,
4546
undefined, Timeout).</td></tr>
4647
<tr><td valign="top"><a href="#eval-3">eval/3</a></td><td>Tests syntax and evaluates PHP code.</td></tr>
4748
<tr><td valign="top"><a href="#get_mem-1">get_mem/1</a></td><td>Measures the memory footprint of the PHP instance using
4849
`ps -o rss`.</td></tr>
4950
<tr><td valign="top"><a href="#release-1">release/1</a></td><td>Cancels the reservation of a PHP instance, returning it
5051
to the pool of available instances.</td></tr>
52+
<tr><td valign="top"><a href="#reload-0">reload/0</a></td><td>Reloads the application completely, carrying over any requires.</td></tr>
53+
<tr><td valign="top"><a href="#reload_clean-0">reload_clean/0</a></td><td>Same as reload() except no requires are carried over.</td></tr>
54+
<tr><td valign="top"><a href="#require_code-1">require_code/1</a></td><td>Adds code to be executed when initializing a PHP worker and
55+
restarts all.</td></tr>
5156
<tr><td valign="top"><a href="#reserve-0">reserve/0</a></td><td>Equivalent to reserve(undefined).</td></tr>
5257
<tr><td valign="top"><a href="#reserve-1">reserve/1</a></td><td>Reserves a PHP instance that will only be accessible to
5358
callers possessing the key returned by this function.</td></tr>
5459
<tr><td valign="top"><a href="#restart_all-0">restart_all/0</a></td><td>Restarts each PHP thread, waiting if any are reserved.</td></tr>
60+
<tr><td valign="top"><a href="#return-2">return/2</a></td><td>Same as call/2 except this returns the return, not the whole result.</td></tr>
5561
<tr><td valign="top"><a href="#start-0">start/0</a></td><td>Starts the PHP application, supervisor, a number of workers,
5662
and this API server module with the options set in php.app.</td></tr>
5763
<tr><td valign="top"><a href="#stop-0">stop/0</a></td><td>Stops the PHP application and everything it started.</td></tr>
64+
<tr><td valign="top"><a href="#unrequire-1">unrequire/1</a></td><td>Removes code from PHP worker initialization and restarts all.</td></tr>
5865
</table>
5966

6067
<h2><a name="functions">Function Details</a></h2>
6168

69+
<h3 class="function"><a name="call-2">call/2</a></h3>
70+
<div class="spec">
71+
<p><tt>call(Func::Function, Args) -&gt; <a href="#type-result">result()</a></tt>
72+
<ul class="definitions"><li><tt>Function = string()</tt></li>
73+
<li><tt>Args = [Arg]</tt></li>
74+
<li><tt>Arg = string() | integer() | float()</tt></li>
75+
</ul></p>
76+
</div><p>Evaluates a function and returns the return value. Args are
77+
automatically escaped.</p>
78+
6279
<h3 class="function"><a name="eval-1">eval/1</a></h3>
6380
<div class="spec">
6481
<p><tt>eval(Code) -&gt; <a href="#type-result">result()</a></tt>
@@ -104,6 +121,25 @@ <h3 class="function"><a name="release-1">release/1</a></h3>
104121
</div><p>Cancels the reservation of a PHP instance, returning it
105122
to the pool of available instances.</p>
106123

124+
<h3 class="function"><a name="reload-0">reload/0</a></h3>
125+
<div class="spec">
126+
<p><tt>reload() -&gt; ok</tt></p>
127+
</div><p>Reloads the application completely, carrying over any requires.
128+
Specifically, this stops the app, unloads the app, loads the
129+
app, loads the modules, starts the app, adds each require.
130+
Meanwhile calls will result in noproc.</p>
131+
132+
<h3 class="function"><a name="reload_clean-0">reload_clean/0</a></h3>
133+
<div class="spec">
134+
<p><tt>reload_clean() -&gt; ok</tt></p>
135+
</div><p>Same as reload() except no requires are carried over.</p>
136+
137+
<h3 class="function"><a name="require_code-1">require_code/1</a></h3>
138+
<div class="spec">
139+
<p><tt>require_code(Code::string()) -&gt; <a href="#type-ref">ref()</a></tt></p>
140+
</div><p>Adds code to be executed when initializing a PHP worker and
141+
restarts all. The return value can be passed to unrequire/1.</p>
142+
107143
<h3 class="function"><a name="reserve-0">reserve/0</a></h3>
108144
<div class="spec">
109145
<p><tt>reserve() -&gt; reference()</tt></p>
@@ -128,6 +164,15 @@ <h3 class="function"><a name="restart_all-0">restart_all/0</a></h3>
128164
</div><p>Restarts each PHP thread, waiting if any are reserved. This
129165
is intended to force an updated PHPLOOP into use.</p>
130166

167+
<h3 class="function"><a name="return-2">return/2</a></h3>
168+
<div class="spec">
169+
<p><tt>return(Func::Function, Args) -&gt; any()</tt>
170+
<ul class="definitions"><li><tt>Function = string()</tt></li>
171+
<li><tt>Args = [Arg]</tt></li>
172+
<li><tt>Arg = string() | integer() | float()</tt></li>
173+
</ul></p>
174+
</div><p>Same as call/2 except this returns the return, not the whole result.</p>
175+
131176
<h3 class="function"><a name="start-0">start/0</a></h3>
132177
<div class="spec">
133178
<p><tt>start() -&gt; ok</tt></p>
@@ -138,9 +183,14 @@ <h3 class="function"><a name="stop-0">stop/0</a></h3>
138183
<div class="spec">
139184
<p><tt>stop() -&gt; ok</tt></p>
140185
</div><p>Stops the PHP application and everything it started.</p>
186+
187+
<h3 class="function"><a name="unrequire-1">unrequire/1</a></h3>
188+
<div class="spec">
189+
<p><tt>unrequire(Ref::<a href="#type-ref">ref()</a>) -&gt; ok</tt></p>
190+
</div><p>Removes code from PHP worker initialization and restarts all.</p>
141191
<hr>
142192

143193
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
144-
<p><i>Generated by EDoc, Feb 6 2009, 09:29:57.</i></p>
194+
<p><i>Generated by EDoc, Aug 19 2010, 16:13:09.</i></p>
145195
</body>
146196
</html>

doc/php_app.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>Module php_app</title>
5+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
6+
</head>
7+
<body bgcolor="white">
8+
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
9+
<hr>
10+
11+
<h1>Module php_app</h1>
12+
<ul class="index"><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>
13+
14+
<p><b>Behaviours:</b> <a href="application.html"><tt>application</tt></a>.</p>
15+
16+
<h2><a name="index">Function Index</a></h2>
17+
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#start-2">start/2</a></td><td></td></tr>
18+
<tr><td valign="top"><a href="#stop-1">stop/1</a></td><td></td></tr>
19+
</table>
20+
21+
<h2><a name="functions">Function Details</a></h2>
22+
23+
<h3 class="function"><a name="start-2">start/2</a></h3>
24+
<div class="spec">
25+
<p><tt>start(Type, StartArgs) -&gt; any()</tt></p>
26+
</div>
27+
28+
<h3 class="function"><a name="stop-1">stop/1</a></h3>
29+
<div class="spec">
30+
<p><tt>stop(State) -&gt; any()</tt></p>
31+
</div>
32+
<hr>
33+
34+
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
35+
<p><i>Generated by EDoc, Aug 19 2010, 16:13:09.</i></p>
36+
</body>
37+
</html>

doc/php_eval.html

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>Module php_eval</title>
5+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
6+
</head>
7+
<body bgcolor="white">
8+
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
9+
<hr>
10+
11+
<h1>Module php_eval</h1>
12+
<ul class="index"><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>
13+
14+
<p><b>Behaviours:</b> <a href="gen_server.html"><tt>gen_server</tt></a>.</p>
15+
16+
<h2><a name="index">Function Index</a></h2>
17+
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#code_change-3">code_change/3</a></td><td></td></tr>
18+
<tr><td valign="top"><a href="#handle_call-3">handle_call/3</a></td><td></td></tr>
19+
<tr><td valign="top"><a href="#handle_cast-2">handle_cast/2</a></td><td></td></tr>
20+
<tr><td valign="top"><a href="#handle_info-2">handle_info/2</a></td><td></td></tr>
21+
<tr><td valign="top"><a href="#init-1">init/1</a></td><td></td></tr>
22+
<tr><td valign="top"><a href="#start_link-2">start_link/2</a></td><td></td></tr>
23+
<tr><td valign="top"><a href="#terminate-2">terminate/2</a></td><td></td></tr>
24+
</table>
25+
26+
<h2><a name="functions">Function Details</a></h2>
27+
28+
<h3 class="function"><a name="code_change-3">code_change/3</a></h3>
29+
<div class="spec">
30+
<p><tt>code_change(OldVsn, State, Extra) -&gt; any()</tt></p>
31+
</div>
32+
33+
<h3 class="function"><a name="handle_call-3">handle_call/3</a></h3>
34+
<div class="spec">
35+
<p><tt>handle_call(Request, From, State) -&gt; any()</tt></p>
36+
</div>
37+
38+
<h3 class="function"><a name="handle_cast-2">handle_cast/2</a></h3>
39+
<div class="spec">
40+
<p><tt>handle_cast(Msg, State) -&gt; any()</tt></p>
41+
</div>
42+
43+
<h3 class="function"><a name="handle_info-2">handle_info/2</a></h3>
44+
<div class="spec">
45+
<p><tt>handle_info(Info, State) -&gt; any()</tt></p>
46+
</div>
47+
48+
<h3 class="function"><a name="init-1">init/1</a></h3>
49+
<div class="spec">
50+
<p><tt>init(Opts) -&gt; any()</tt></p>
51+
</div>
52+
53+
<h3 class="function"><a name="start_link-2">start_link/2</a></h3>
54+
<div class="spec">
55+
<p><tt>start_link(Args, Proc) -&gt; any()</tt></p>
56+
</div>
57+
58+
<h3 class="function"><a name="terminate-2">terminate/2</a></h3>
59+
<div class="spec">
60+
<p><tt>terminate(Reason, State) -&gt; any()</tt></p>
61+
</div>
62+
<hr>
63+
64+
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
65+
<p><i>Generated by EDoc, Aug 19 2010, 16:13:09.</i></p>
66+
</body>
67+
</html>

doc/php_sup.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>Module php_sup</title>
5+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
6+
</head>
7+
<body bgcolor="white">
8+
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
9+
<hr>
10+
11+
<h1>Module php_sup</h1>
12+
<ul class="index"><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>
13+
14+
<p><b>Behaviours:</b> <a href="supervisor.html"><tt>supervisor</tt></a>.</p>
15+
16+
<h2><a name="index">Function Index</a></h2>
17+
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#init-1">init/1</a></td><td></td></tr>
18+
<tr><td valign="top"><a href="#start_link-0">start_link/0</a></td><td></td></tr>
19+
<tr><td valign="top"><a href="#start_link-1">start_link/1</a></td><td></td></tr>
20+
</table>
21+
22+
<h2><a name="functions">Function Details</a></h2>
23+
24+
<h3 class="function"><a name="init-1">init/1</a></h3>
25+
<div class="spec">
26+
<p><tt>init(Args) -&gt; any()</tt></p>
27+
</div>
28+
29+
<h3 class="function"><a name="start_link-0">start_link/0</a></h3>
30+
<div class="spec">
31+
<p><tt>start_link() -&gt; any()</tt></p>
32+
</div>
33+
34+
<h3 class="function"><a name="start_link-1">start_link/1</a></h3>
35+
<div class="spec">
36+
<p><tt>start_link(Args) -&gt; any()</tt></p>
37+
</div>
38+
<hr>
39+
40+
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
41+
<p><i>Generated by EDoc, Aug 19 2010, 16:13:09.</i></p>
42+
</body>
43+
</html>

0 commit comments

Comments
 (0)