mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
added new inclued documentation
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@262786 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
0fc1a985c3
commit
8ee23b4f18
8 changed files with 490 additions and 0 deletions
52
reference/inclued/book.xml
Normal file
52
reference/inclued/book.xml
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Purpose: basic.php -->
|
||||
<!-- Membership: pecl -->
|
||||
|
||||
<book xml:id="book.inclued" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Inclusion hierarchy viewer</title>
|
||||
<titleabbrev>inclued</titleabbrev>
|
||||
|
||||
<preface xml:id="intro.inclued">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
Traces through and dumps the hierarchy of file inclusions and class inheritance at runtime.
|
||||
</para>
|
||||
<para>
|
||||
The files may have been included using
|
||||
<function>include</function>, <function>include_once</function>,
|
||||
<function>require</function>, or <function>require_once</function>.
|
||||
</para>
|
||||
<para>
|
||||
Class inheritance dependencies are also reported.
|
||||
</para>
|
||||
</preface>
|
||||
|
||||
&reference.inclued.setup;
|
||||
&reference.inclued.constants;
|
||||
&reference.inclued.examples;
|
||||
&reference.inclued.reference;
|
||||
|
||||
</book>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
38
reference/inclued/configure.xml
Normal file
38
reference/inclued/configure.xml
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<section xml:id="inclued.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.install;
|
||||
|
||||
<para>
|
||||
&pecl.info;
|
||||
<link xlink:href="&url.pecl.package;inclued">&url.pecl.package;inclued</link>
|
||||
</para>
|
||||
<para>
|
||||
The latest PECL/inclued Win32 DLL is available here:
|
||||
<link xlink:href="&url.pecl.win.ext;php_inclued.dll">php_inclued.dll</link>
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
32
reference/inclued/constants.xml
Normal file
32
reference/inclued/constants.xml
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<appendix xml:id="inclued.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
|
||||
&no.constants;
|
||||
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
81
reference/inclued/examples.xml
Normal file
81
reference/inclued/examples.xml
Normal file
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<chapter xml:id="inclued.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.examples;
|
||||
|
||||
<section xml:id='inclued.examples-implementation'>
|
||||
<title>Example that implements inclued into an application</title>
|
||||
<para>
|
||||
This example demonstrates the process of implementing inclued into
|
||||
an existing application, and viewing the results.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Getting the data from inclued</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// File to store the inclued information
|
||||
$fp = fopen('/tmp/wp.json', 'w');
|
||||
if ($fp) {
|
||||
$clue = inclued_get_data();
|
||||
if ($clue) {
|
||||
fwrite($fp, json_encode($clue);
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
Now that some data exists, it's time to make sense of it in the form of
|
||||
a graph. The inclued extension includes a PHP file named
|
||||
<filename>gengraph.php</filename> that creates a dot file that
|
||||
requires the <link xlink:href="&url.graphviz;">graphviz</link> library.
|
||||
However, this form is not required.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Example use of gengraph.php</title>
|
||||
<para>
|
||||
This example creates an image named inclued.png that
|
||||
shows the inclued data.
|
||||
</para>
|
||||
<programlisting role="shell">
|
||||
<![CDATA[
|
||||
# First, create the dot file
|
||||
$ php graphviz.php -i /tmp/wp.json -o wp.dot
|
||||
|
||||
# Next, create the image
|
||||
$ dot -Tpng -o inclued.png wp.dot
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
108
reference/inclued/functions/inclued-get-data.xml
Normal file
108
reference/inclued/functions/inclued-get-data.xml
Normal file
|
@ -0,0 +1,108 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<refentry xml:id="function.inclued-get-data" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>inclued_get_data</refname>
|
||||
<refpurpose>Get the inclued data</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>inclued_get_data</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get the inclued data.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The inclued data.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>inclued_get_data</function> example</title>
|
||||
<para>
|
||||
See the <link linkend="inclued.examples-implementation">inclued examples</link>
|
||||
section for ways to create a graphs with this data.
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
include 'x.php';
|
||||
|
||||
$clue = inclued_get_data();
|
||||
|
||||
print_r($clue);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[includes] => Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[operation] => include
|
||||
[op_type] => 2
|
||||
[filename] => x.php
|
||||
[opened_path] => /tmp/x.php
|
||||
[fromfile] => /tmp/z.php
|
||||
[fromline] => 2
|
||||
)
|
||||
)
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><link linkend="inclued.examples-implementation">inclued examples</link></member>
|
||||
<member><function>debug_backtrace</function></member>
|
||||
<member><function>include</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
100
reference/inclued/ini.xml
Normal file
100
reference/inclued/ini.xml
Normal file
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<section xml:id="inclued.configuration" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.runtime;
|
||||
&extension.runtime;
|
||||
|
||||
<para>
|
||||
<table>
|
||||
<title>inclued &ConfigureOptions;</title>
|
||||
<tgroup cols="4">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Name;</entry>
|
||||
<entry>&Default;</entry>
|
||||
<entry>&Changeable;</entry>
|
||||
<entry>Changelog</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>inclued.enabled</entry>
|
||||
<entry>Off</entry>
|
||||
<entry>PHP_INI_*</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>inclued.dumpdir</entry>
|
||||
<entry>Off</entry>
|
||||
<entry>PHP_INI_*</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
&ini.php.constants;
|
||||
|
||||
</para>
|
||||
|
||||
&ini.descriptions.title;
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry xml:id="ini.inclued.enabled">
|
||||
<term>
|
||||
<parameter>inclued.enabled</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Whether or not to enable inclued.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.inclued.dumpdir">
|
||||
<term>
|
||||
<parameter>inclued.dumpdir</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Location (path) to the directory that stores inclued files. If set, each
|
||||
PHP request will create a file.
|
||||
</para>
|
||||
<caution>
|
||||
<para>
|
||||
Because every request creates a file, this directory may fill up fast!
|
||||
</para>
|
||||
</caution>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
30
reference/inclued/reference.xml
Normal file
30
reference/inclued/reference.xml
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<reference xml:id="ref.inclued" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>inclued &Functions;</title>
|
||||
|
||||
&reference.inclued.entities.functions;
|
||||
|
||||
</reference>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
49
reference/inclued/setup.xml
Normal file
49
reference/inclued/setup.xml
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<chapter xml:id="inclued.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.setup;
|
||||
|
||||
<section xml:id="inclued.requirements">
|
||||
&reftitle.required;
|
||||
<para>
|
||||
PHP version 5.1.0 or greater.
|
||||
</para>
|
||||
<para>
|
||||
The included <filename>gengraph.php</filename> file utilizes
|
||||
the <link xlink:href="&url.graphviz;">graphviz</link> library,
|
||||
however, this is not required.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
&reference.inclued.configure;
|
||||
&reference.inclued.ini;
|
||||
|
||||
<section xml:id="inclued.resources">
|
||||
&reftitle.resources;
|
||||
&no.resource;
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
Loading…
Reference in a new issue