1
0
mirror of https://github.com/php/doc-ru.git synced 2026-03-26 16:52:12 +01:00
Files
archived-doc-ru/reference/reflection/reflectionclass/construct.xml

165 lines
4.2 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 98df2cf9a939729d73adee1484ec05929c74c98b Maintainer: aur Status: ready -->
<!-- Reviewed: yes -->
<!-- $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>Создаёт объект класса 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>
Создаёт новый объект класса <classname>ReflectionClass</classname>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>objectOrClass</parameter></term>
<listitem>
<para>
В качестве аргумента может принимать строку (<type>string</type>),
содержащую имя исследуемого класса, либо объект (<type>object</type>).
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает объект класса <classname>ReflectionClass</classname>.
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
<para>
Вызывает исключение <classname>ReflectionException</classname>, если заданный класс
не существует.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Простой пример использования 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">Конструкторы</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
-->