2009-08-15 14:39:48 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!-- $Revision$ -->
|
|
|
|
|
|
|
|
<refentry xml:id="reflectionclass.newinstance" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>ReflectionClass::newInstance</refname>
|
2018-01-25 15:34:22 +00:00
|
|
|
<refpurpose>Creates a new class instance from given arguments</refpurpose>
|
2009-08-15 14:39:48 +00:00
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
|
|
|
<methodsynopsis>
|
|
|
|
<modifier>public</modifier> <type>object</type><methodname>ReflectionClass::newInstance</methodname>
|
2020-11-02 11:17:26 +00:00
|
|
|
<methodparam rep="repeat"><type>mixed</type><parameter>args</parameter></methodparam>
|
2009-08-15 14:39:48 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2010-08-20 06:46:00 +00:00
|
|
|
Creates a new instance of the class. The given arguments are passed to the
|
|
|
|
class constructor.
|
2009-08-15 14:39:48 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2020-11-02 11:17:26 +00:00
|
|
|
<term><parameter>args</parameter></term>
|
2009-08-15 14:39:48 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2010-07-27 18:46:35 +00:00
|
|
|
Accepts a variable number of arguments which are passed to the class
|
|
|
|
constructor, much like <function>call_user_func</function>.
|
2009-08-15 14:39:48 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
2010-07-27 18:46:35 +00:00
|
|
|
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="errors">
|
|
|
|
&reftitle.errors;
|
|
|
|
<para>
|
|
|
|
A <classname>ReflectionException</classname> if the class constructor is not public.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
A <classname>ReflectionException</classname> if the class does not have a constructor
|
2020-11-02 11:17:26 +00:00
|
|
|
and the <parameter>args</parameter> parameter contains one or more parameters.
|
2009-08-15 14:39:48 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
|
|
|
<para>
|
|
|
|
<simplelist>
|
|
|
|
<member><methodname>ReflectionClass::newInstanceArgs</methodname></member>
|
2011-08-26 07:53:40 +00:00
|
|
|
<member><methodname>ReflectionClass::newInstanceWithoutConstructor</methodname></member>
|
2009-08-15 14:39:48 +00:00
|
|
|
</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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2009-08-15 14:39:48 +00:00
|
|
|
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
|
|
|
|
-->
|