mirror of
https://github.com/php/doc-ru.git
synced 2025-08-16 18:22:04 +00:00
58 lines
1.9 KiB
XML
58 lines
1.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- EN-Revision: 161dde4fe721309398dd324edbf02aec409f127b Maintainer: sergey Status: ready -->
|
||
<!-- Reviewed: no -->
|
||
<sect1 xml:id="language.types.relative-class-types">
|
||
<title>Относительные типы классов</title>
|
||
|
||
<para>
|
||
Эти объявления типов можно использовать только внутри классов.
|
||
</para>
|
||
|
||
<sect2 xml:id="language.types.relative-class-types.self">
|
||
<title><type>self</type></title>
|
||
<para>
|
||
Значение должно быть &instanceof; того же класса,
|
||
что и класс, в котором используется объявление типа.
|
||
</para>
|
||
</sect2>
|
||
|
||
<sect2 xml:id="language.types.relative-class-types.parent">
|
||
<title><type>parent</type></title>
|
||
<para>
|
||
Значение должно быть &instanceof; родительского класса,
|
||
наследуемого классом, в котором объявляется тип.
|
||
</para>
|
||
</sect2>
|
||
|
||
<sect2 xml:id="language.types.relative-class-types.static">
|
||
<title>static</title>
|
||
<para>
|
||
<type>static</type> — это тип только для возвращаемого значения,
|
||
который требует, чтобы возвращаемое значение было &instanceof; того же класса,
|
||
что и класс, в котором вызывается метод.
|
||
Доступен начиная с PHP 8.0.0.
|
||
</para>
|
||
</sect2>
|
||
|
||
</sect1>
|
||
<!-- 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
|
||
-->
|