Files
php-doc-ru/language/types/relative-class-types.xml
2024-04-25 07:59:49 +03:00

58 lines
1.9 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: 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
-->