mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
154 lines
3.7 KiB
XML
154 lines
3.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="reflectionclass.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>ReflectionClass::__construct</refname>
|
|
<refpurpose>Constructs a ReflectionClass</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<constructorsynopsis>
|
|
<modifier>public</modifier> <methodname>ReflectionClass::__construct</methodname>
|
|
<methodparam><type class="union"><type>object</type><type>string</type></type><parameter>objectOrClass</parameter></methodparam>
|
|
</constructorsynopsis>
|
|
<para>
|
|
Constructs a new <classname>ReflectionClass</classname> object.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>objectOrClass</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Either a <type>string</type> containing the name of the class to
|
|
reflect, or an <type>object</type>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
Throws <classname>ReflectionException</classname> if the class to reflect does not exist.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Basic usage ReflectionClass</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
Reflection::export(new ReflectionClass('Exception'));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
Class [ <internal:Core> class Exception ] {
|
|
|
|
- Constants [0] {
|
|
}
|
|
|
|
- Static properties [0] {
|
|
}
|
|
|
|
- Static methods [0] {
|
|
}
|
|
|
|
- Properties [7] {
|
|
Property [ <default> protected $message ]
|
|
Property [ <default> private $string ]
|
|
Property [ <default> protected $code ]
|
|
Property [ <default> protected $file ]
|
|
Property [ <default> protected $line ]
|
|
Property [ <default> private $trace ]
|
|
Property [ <default> private $previous ]
|
|
}
|
|
|
|
- Methods [10] {
|
|
Method [ <internal:Core> final private method __clone ] {
|
|
}
|
|
|
|
Method [ <internal:Core, ctor> public method __construct ] {
|
|
|
|
- Parameters [3] {
|
|
Parameter #0 [ <optional> $message ]
|
|
Parameter #1 [ <optional> $code ]
|
|
Parameter #2 [ <optional> $previous ]
|
|
}
|
|
}
|
|
|
|
Method [ <internal:Core> final public method getMessage ] {
|
|
}
|
|
|
|
Method [ <internal:Core> final public method getCode ] {
|
|
}
|
|
|
|
Method [ <internal:Core> final public method getFile ] {
|
|
}
|
|
|
|
Method [ <internal:Core> final public method getLine ] {
|
|
}
|
|
|
|
Method [ <internal:Core> final public method getTrace ] {
|
|
}
|
|
|
|
Method [ <internal:Core> final public method getPrevious ] {
|
|
}
|
|
|
|
Method [ <internal:Core> final public method getTraceAsString ] {
|
|
}
|
|
|
|
Method [ <internal:Core> public method __toString ] {
|
|
}
|
|
}
|
|
}
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><methodname>ReflectionObject::__construct</methodname></member>
|
|
<member><link linkend="language.oop5.decon.constructor">Constructors</link></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:"~/.phpdoc/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
|
|
-->
|