mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
doc classkit_import()
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@167935 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
695308dcbc
commit
54ba1998b0
1 changed files with 121 additions and 0 deletions
121
reference/classkit/functions/classkit-import.xml
Normal file
121
reference/classkit/functions/classkit-import.xml
Normal file
|
@ -0,0 +1,121 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<refentry id="function.classkit-import">
|
||||
<refnamediv>
|
||||
<refname>classkit_import</refname>
|
||||
<refpurpose>Import new class method definitions from a file</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>classkit_import</methodname>
|
||||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
¬e.classkit.selfmanipulation;
|
||||
&warn.experimental.func;
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>filename</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The filename of the class method definitions to import
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Associative array of imported methods
|
||||
</para>
|
||||
</refsect1>
|
||||
<!-- No changelog: it's only in PECL. -->
|
||||
<refsect1>
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>classkit_import</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// file: newclass.php
|
||||
class Example {
|
||||
function foo() {
|
||||
return "bar!\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// requires newclass.php (see above)
|
||||
class Example {
|
||||
function foo() {
|
||||
return "foo!\n";
|
||||
}
|
||||
}
|
||||
|
||||
$e = new Example();
|
||||
|
||||
// output original
|
||||
echo $e->foo();
|
||||
|
||||
// import replacement method
|
||||
classkit_import('newclass.php');
|
||||
|
||||
// output imported
|
||||
echo $e->foo();
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
foo!
|
||||
bar!
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 roles="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>classkit_method_add</function></member>
|
||||
<member><function>classkit_method_copy</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
|
||||
-->
|
Loading…
Reference in a new issue