Files
php-doc-ru/language/predefined/attributes/attribute.xml
2024-06-14 17:02:33 +01:00

192 lines
6.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: 14767af0f05dffa6fdb9b49e1a1f4e9ca7022a60 Maintainer: sergey Status: ready -->
<!-- Reviewed: no -->
<reference xml:id="class.attribute" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Класс Attribute</title>
<titleabbrev>Attribute</titleabbrev>
<partintro>
<section xml:id="attribute.intro">
&reftitle.intro;
<para>
Атрибуты дают возможность добавлять структурированную, машиночитаемую информацию
метаданных о декларациях в коде: целью атрибута могут быть классы, методы, функции, параметры, свойства
и константы класса.
Метаданные, определённые атрибутами, могут быть проверены во время выполнения
с помощью <link linkend="book.reflection">Reflection API</link>.
Поэтому атрибуты можно рассматривать как язык конфигурации, встроенный непосредственно в код.
</para>
</section>
<section xml:id="attribute.synopsis">
&reftitle.classsynopsis;
<classsynopsis class="class">
<ooclass>
<modifier>final</modifier>
<classname>Attribute</classname>
</ooclass>
<classsynopsisinfo role="comment">&Constants;</classsynopsisinfo>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="attribute.constants.target-class">Attribute::TARGET_CLASS</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="attribute.constants.target-function">Attribute::TARGET_FUNCTION</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="attribute.constants.target-method">Attribute::TARGET_METHOD</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="attribute.constants.target-property">Attribute::TARGET_PROPERTY</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="attribute.constants.target-class-constant">Attribute::TARGET_CLASS_CONSTANT</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="attribute.constants.target-parameter">Attribute::TARGET_PARAMETER</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="attribute.constants.target-all">Attribute::TARGET_ALL</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="attribute.constants.is-repeatable">Attribute::IS_REPEATABLE</varname>
</fieldsynopsis>
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
<fieldsynopsis>
<modifier>public</modifier>
<type>int</type>
<varname linkend="attribute.props.flags">flags</varname>
</fieldsynopsis>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.attribute')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='Attribute'])">
<xi:fallback/>
</xi:include>
</classsynopsis>
</section>
<section xml:id="attribute.constants">
&reftitle.constants;
<variablelist>
<varlistentry xml:id="attribute.constants.target-class">
<term><constant>Attribute::TARGET_CLASS</constant></term>
<listitem>
<para/>
</listitem>
</varlistentry>
<varlistentry xml:id="attribute.constants.target-function">
<term><constant>Attribute::TARGET_FUNCTION</constant></term>
<listitem>
<para/>
</listitem>
</varlistentry>
<varlistentry xml:id="attribute.constants.target-method">
<term><constant>Attribute::TARGET_METHOD</constant></term>
<listitem>
<para/>
</listitem>
</varlistentry>
<varlistentry xml:id="attribute.constants.target-property">
<term><constant>Attribute::TARGET_PROPERTY</constant></term>
<listitem>
<para/>
</listitem>
</varlistentry>
<varlistentry xml:id="attribute.constants.target-class-constant">
<term><constant>Attribute::TARGET_CLASS_CONSTANT</constant></term>
<listitem>
<para/>
</listitem>
</varlistentry>
<varlistentry xml:id="attribute.constants.target-parameter">
<term><constant>Attribute::TARGET_PARAMETER</constant></term>
<listitem>
<para/>
</listitem>
</varlistentry>
<varlistentry xml:id="attribute.constants.target-all">
<term><constant>Attribute::TARGET_ALL</constant></term>
<listitem>
<para/>
</listitem>
</varlistentry>
<varlistentry xml:id="attribute.constants.is-repeatable">
<term><constant>Attribute::IS_REPEATABLE</constant></term>
<listitem>
<para/>
</listitem>
</varlistentry>
</variablelist>
</section>
<section xml:id="attribute.props">
&reftitle.properties;
<variablelist>
<varlistentry xml:id="attribute.props.flags">
<term><varname>flags</varname></term>
<listitem>
<para/>
</listitem>
</varlistentry>
</variablelist>
</section>
<section xml:id="attribute.seealso">
&reftitle.seealso;
<para><link linkend="language.attributes">Введение в атрибуты</link></para>
</section>
</partintro>
&language.predefined.attribute.construct;
</reference>
<!-- 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
-->