svn: /phpdoc/ru/trunk/reference/tokenizer/ phptoken/construct.xml phptoken/getTokenName.xml phptoken/is.xml phptoken/isIgnorable.xml phptoken/toString.xml phptoken/tokenize.xml phptoken.xml

[email protected] (Andrey Gromov) Sat, 19 Dec 2020 10:57:11 +0000
Newsgroups php.doc.ru
Message-ID <[email protected]>
rjhdby                                   Sat, 19 Dec 2020 10:57:11 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=352133

Log:
new

Changed paths:
    A   phpdoc/ru/trunk/reference/tokenizer/phptoken/construct.xml
    A   phpdoc/ru/trunk/reference/tokenizer/phptoken/getTokenName.xml
    A   phpdoc/ru/trunk/reference/tokenizer/phptoken/is.xml
    A   phpdoc/ru/trunk/reference/tokenizer/phptoken/isIgnorable.xml
    A   phpdoc/ru/trunk/reference/tokenizer/phptoken/toString.xml
    A   phpdoc/ru/trunk/reference/tokenizer/phptoken/tokenize.xml
    A   phpdoc/ru/trunk/reference/tokenizer/phptoken.xml
svn-diffs-352133.txt (text/x-diff, 26.3 KB)
Added: phpdoc/ru/trunk/reference/tokenizer/phptoken/construct.xml
===================================================================
--- phpdoc/ru/trunk/reference/tokenizer/phptoken/construct.xml	                        (rev 0)
+++ phpdoc/ru/trunk/reference/tokenizer/phptoken/construct.xml	2020-12-19 10:57:11 UTC (rev 352133)
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- EN-Revision: 351961 Maintainer: rjhdby Status: ready -->
+<!-- $Revision$ -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="phptoken.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+  <refname>PhpToken::__construct</refname>
+  <refpurpose>Создаёт объект PhpToken</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+  &reftitle.description;
+  <constructorsynopsis>
+   <modifier>final</modifier> <modifier>public</modifier> <methodname>PhpToken::__construct</methodname>
+   <methodparam><type>int</type><parameter>id</parameter></methodparam>
+   <methodparam><type>string</type><parameter>text</parameter></methodparam>
+   <methodparam choice="opt"><type>int</type><parameter>line</parameter><initializer>-1</initializer></methodparam>
+   <methodparam choice="opt"><type>int</type><parameter>pos</parameter><initializer>-1</initializer></methodparam>
+  </constructorsynopsis>
+  <para>
+   Возвращает новый объект PhpToken.
+  </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+  &reftitle.parameters;
+  <variablelist>
+   <varlistentry>
+    <term><parameter>id</parameter></term>
+    <listitem>
+     <para>
+      Одна из констант T_* (см. <xref linkend="tokens"/>), или символ ASCII, представляющий односимвольный токен.
+     </para>
+    </listitem>
+   </varlistentry>
+   <varlistentry>
+    <term><parameter>text</parameter></term>
+    <listitem>
+     <para>
+      Текстовое содержимое токена.
+     </para>
+    </listitem>
+   </varlistentry>
+   <varlistentry>
+    <term><parameter>line</parameter></term>
+    <listitem>
+     <para>
+      Номер строки (начиная с 1), с которой начинается токен.
+     </para>
+    </listitem>
+   </varlistentry>
+   <varlistentry>
+    <term><parameter>pos</parameter></term>
+    <listitem>
+     <para>
+      Начальная позиция (начиная с 0) токена в строке.
+     </para>
+    </listitem>
+   </varlistentry>
+  </variablelist>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>
+   Возвращает новый объект PhpToken.
+  </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+  &reftitle.seealso;
+  <simplelist>
+   <member><function>PhpToken::tokenize</function></member>
+  </simplelist>
+ </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
+-->
+


Property changes on: phpdoc/ru/trunk/reference/tokenizer/phptoken/construct.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ru/trunk/reference/tokenizer/phptoken/getTokenName.xml
===================================================================
--- phpdoc/ru/trunk/reference/tokenizer/phptoken/getTokenName.xml	                        (rev 0)
+++ phpdoc/ru/trunk/reference/tokenizer/phptoken/getTokenName.xml	2020-12-19 10:57:11 UTC (rev 352133)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- EN-Revision: 351961 Maintainer: rjhdby Status: ready -->
+<!-- $Revision$ -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="phptoken.gettokenname" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+  <refname>PhpToken::getTokenName</refname>
+  <refpurpose>Возвращает имя токена</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+  &reftitle.description;
+  <methodsynopsis>
+   <modifier>public</modifier> <type class="union"><type>string</type><type>null</type></type> <methodname>PhpToken::getTokenName</methodname>
+   <void />
+  </methodsynopsis>
+  <para>
+   Возвращает имя токена.
+  </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+  &reftitle.parameters;
+  &no.function.parameters;
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>
+   Символ ASCII для односимвольных токенов, либо
+   имя одной из констант T_* (см. <xref linkend="tokens"/>),
+   либо &null;, для неизвестных токенов.
+  </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+  &reftitle.examples;
+  <example>
+   <title>Пример использования <function>PhpToken::getTokenName</function></title>
+   <programlisting role="php">
+<![CDATA[
+<?php
+// стандартный токен
+$token = new PhpToken(T_ECHO, 'echo');
+var_dump($token->getTokenName());   // -> string(6) "T_ECHO"
+
+// односимвольный токен
+$token = new PhpToken(ord(';'), ';');
+var_dump($token->getTokenName());   // -> string(1) ";"
+
+// неизвестный токен
+$token = new PhpToken(10000 , "\0");
+var_dump($token->getTokenName());   // -> NULL
+]]>
+   </programlisting>
+  </example>
+ </refsect1>
+
+ <refsect1 role="seealso">
+  &reftitle.seealso;
+  <simplelist>
+   <member><function>PhpToken::tokenize</function></member>
+   <member><function>token_name</function></member>
+  </simplelist>
+ </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
+-->


Property changes on: phpdoc/ru/trunk/reference/tokenizer/phptoken/getTokenName.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ru/trunk/reference/tokenizer/phptoken/is.xml
===================================================================
--- phpdoc/ru/trunk/reference/tokenizer/phptoken/is.xml	                        (rev 0)
+++ phpdoc/ru/trunk/reference/tokenizer/phptoken/is.xml	2020-12-19 10:57:11 UTC (rev 352133)
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- EN-Revision: 351961 Maintainer: rjhdby Status: ready -->
+<!-- $Revision$ -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="phptoken.is" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+  <refname>PhpToken::is</refname>
+  <refpurpose>Проверяет, соответствует ли токен указанному типу</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+  &reftitle.description;
+  <methodsynopsis>
+   <modifier>public</modifier> <type>bool</type> <methodname>PhpToken::is</methodname>
+   <methodparam><type class="union"><type>int</type><type>string</type><type>array</type></type><parameter>kind</parameter></methodparam>
+  </methodsynopsis>
+  <para>
+   Проверяет, соответствует ли токен указанному типу <parameter>kind</parameter>.
+  </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+  &reftitle.parameters;
+  <variablelist>
+   <varlistentry>
+    <term><parameter>kind</parameter></term>
+    <listitem>
+     <para>
+      Значение для сравнения с идентификатором токена, либо его текстовым представлением, или массив таких значений.
+     </para>
+    </listitem>
+   </varlistentry>
+  </variablelist>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>
+   Логическое значение, &true; или &false;.
+  </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+  &reftitle.examples;
+  <example>
+   <title>Пример использования <function>PhpToken::is</function></title>
+   <programlisting role="php">
+<![CDATA[
+<?php
+$token = new PhpToken(T_ECHO, 'echo');
+var_dump($token->is(T_ECHO));        // -> bool(true)
+var_dump($token->is('echo'));        // -> bool(true)
+var_dump($token->is(T_FOREACH));     // -> bool(false)
+var_dump($token->is('foreach'));     // -> bool(false)
+]]>
+   </programlisting>
+  </example>
+  <example>
+   <title>Использование с массивом</title>
+   <programlisting role="php">
+<![CDATA[
+<?php
+function isClassType(PhpToken $token): bool {
+    return $token->is([T_CLASS, T_INTERFACE, T_TRAIT]);
+}
+
+$interface = new PhpToken(T_INTERFACE, 'interface');
+var_dump(isClassType($interface));   // -> bool(true)
+
+$function = new PhpToken(T_FUNCTION, 'function');
+var_dump(isClassType($function));    // -> bool(false)
+]]>
+   </programlisting>
+  </example>
+ </refsect1>
+
+ <refsect1 role="seealso">
+  &reftitle.seealso;
+  <simplelist>
+   <member><function>token_name</function></member>
+  </simplelist>
+ </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
+-->


Property changes on: phpdoc/ru/trunk/reference/tokenizer/phptoken/is.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ru/trunk/reference/tokenizer/phptoken/isIgnorable.xml
===================================================================
--- phpdoc/ru/trunk/reference/tokenizer/phptoken/isIgnorable.xml	                        (rev 0)
+++ phpdoc/ru/trunk/reference/tokenizer/phptoken/isIgnorable.xml	2020-12-19 10:57:11 UTC (rev 352133)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 351961 Maintainer: rjhdby Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="phptoken.isignorable" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+  <refname>PhpToken::isIgnorable</refname>
+  <refpurpose>Сообщает, будет ли токен игнорироваться парсером PHP</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+  &reftitle.description;
+  <methodsynopsis>
+   <modifier>public</modifier> <type>bool</type> <methodname>PhpToken::isIgnorable</methodname>
+   <void />
+  </methodsynopsis>
+  <para>
+   Сообщает, будет ли токен игнорироваться парсером PHP.
+  </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+  &reftitle.parameters;
+  &no.function.parameters;
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>
+   Если токен будет игнорироваться парсером PHP (такие как пробельные последовательности или комментарии), то вернёт &true;.
+   В противном случае вернёт &false;.
+  </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+  &reftitle.examples;
+  <example>
+   <title>Пример использования <function>PhpToken::isIgnorable</function></title>
+   <programlisting role="php">
+<![CDATA[
+<?php
+$echo = new PhpToken(T_ECHO, 'echo');
+var_dump($echo->isIgnorable());   // -> bool(false)
+
+$space = new PhpToken(T_WHITESPACE, ' ');
+var_dump($space->isIgnorable());  // -> bool(true)
+]]>
+   </programlisting>
+  </example>
+ </refsect1>
+
+ <refsect1 role="seealso">
+  &reftitle.seealso;
+  <simplelist>
+   <member><function>PhpToken::tokenize</function></member>
+  </simplelist>
+ </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
+-->


Property changes on: phpdoc/ru/trunk/reference/tokenizer/phptoken/isIgnorable.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ru/trunk/reference/tokenizer/phptoken/toString.xml
===================================================================
--- phpdoc/ru/trunk/reference/tokenizer/phptoken/toString.xml	                        (rev 0)
+++ phpdoc/ru/trunk/reference/tokenizer/phptoken/toString.xml	2020-12-19 10:57:11 UTC (rev 352133)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- EN-Revision: 351961 Maintainer: rjhdby Status: ready -->
+<!-- $Revision$ -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="phptoken.tostring" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+  <refname>PhpToken::__toString</refname>
+  <refpurpose>Возвращает текстовое содержимое токена</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+  &reftitle.description;
+  <methodsynopsis>
+   <modifier>public</modifier> <type>string</type> <methodname>PhpToken::__toString</methodname>
+   <void />
+  </methodsynopsis>
+  <para>
+   Возвращает текстовое содержимое токена.
+  </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+  &reftitle.parameters;
+  &no.function.parameters;
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>
+   Текстовое содержимое токена.
+  </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+  &reftitle.examples;
+  <example>
+   <title>Пример использования <function>PhpToken::__toString</function></title>
+   <programlisting role="php">
+<![CDATA[
+<?php
+$token = new PhpToken(T_ECHO, 'echo');
+echo $token;
+]]>
+   </programlisting>
+   &examples.outputs;
+   <screen>
+<![CDATA[
+echo
+]]>
+   </screen>
+  </example>
+ </refsect1>
+
+ <refsect1 role="seealso">
+  &reftitle.seealso;
+  <simplelist>
+   <member><function>token_name</function></member>
+  </simplelist>
+ </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
+-->


Property changes on: phpdoc/ru/trunk/reference/tokenizer/phptoken/toString.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ru/trunk/reference/tokenizer/phptoken/tokenize.xml
===================================================================
--- phpdoc/ru/trunk/reference/tokenizer/phptoken/tokenize.xml	                        (rev 0)
+++ phpdoc/ru/trunk/reference/tokenizer/phptoken/tokenize.xml	2020-12-19 10:57:11 UTC (rev 352133)
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- EN-Revision: 351961 Maintainer: rjhdby Status: ready -->
+<!-- $Revision$ -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="phptoken.tokenize" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+  <refname>PhpToken::tokenize</refname>
+  <refpurpose>Разбирает заданную строку, содержащую программу на PHP, на массив объектов PhpToken</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+  &reftitle.description;
+  <methodsynopsis>
+   <modifier>public</modifier> <modifier>static</modifier> <type>array</type> <methodname>PhpToken::tokenize</methodname>
+   <methodparam><type>string</type><parameter>code</parameter></methodparam>
+   <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
+  </methodsynopsis>
+  <para>
+   Возвращает массив объектов PhpToken, представляющих код <parameter>code</parameter>.
+  </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+  &reftitle.parameters;
+  <variablelist>
+   <varlistentry>
+    <term><parameter>code</parameter></term>
+    <listitem>
+     <para>
+      Исходный код на языке PHP.
+     </para>
+    </listitem>
+   </varlistentry>
+   <varlistentry>
+    <term><parameter>flags</parameter></term>
+    <listitem>
+     <para>
+      Допустимые флаги:
+      <itemizedlist>
+       <listitem>
+        <simpara>
+         <constant>TOKEN_PARSE</constant> - допускает возможность использовать зарезервированные слова в определенных контекстах.
+        </simpara>
+       </listitem>
+      </itemizedlist>
+     </para>
+    </listitem>
+   </varlistentry>
+  </variablelist>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>
+   Массив токенов PHP в виде объектов класса PhpToken или его потомков.
+   Этот метод возвращает <type>static[]</type>, так что PhpToken можно свободно расширять.
+  </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+  &reftitle.examples;
+  <example>
+   <title>Пример использования <function>PhpToken::tokenize</function></title>
+   <programlisting role="php">
+<![CDATA[
+<?php
+$tokens = PhpToken::tokenize('<?php echo; ?>');
+
+foreach ($tokens as $token) {
+    echo "Line {$token->line}: {$token->getTokenName()} ('{$token->text}')", PHP_EOL;
+}
+]]>
+   </programlisting>
+   &examples.outputs;
+   <screen>
+<![CDATA[
+Line 1: T_OPEN_TAG ('<?php ')
+Line 1: T_ECHO ('echo')
+Line 1: ; (';')
+Line 1: T_WHITESPACE (' ')
+Line 1: T_CLOSE_TAG ('?>')
+]]>
+   </screen>
+  </example>
+  <example>
+   <title>Расширение PhpToken</title>
+   <programlisting role="php">
+<![CDATA[
+<?php
+
+class MyPhpToken extends PhpToken {
+    public function getUpperText() {
+        return strtoupper($this->text);
+    }
+}
+
+$tokens = MyPhpToken::tokenize('<?php echo; ?>');
+echo "'{$tokens[0]->getUpperText()}'";
+]]>
+   </programlisting>
+   &examples.outputs;
+   <screen>
+<![CDATA[
+'<?PHP '
+]]>
+   </screen>
+  </example>
+ </refsect1>
+
+ <refsect1 role="seealso">
+  &reftitle.seealso;
+  <simplelist>
+   <member><function>token_get_all</function></member>
+  </simplelist>
+ </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
+-->


Property changes on: phpdoc/ru/trunk/reference/tokenizer/phptoken/tokenize.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ru/trunk/reference/tokenizer/phptoken.xml
===================================================================
--- phpdoc/ru/trunk/reference/tokenizer/phptoken.xml	                        (rev 0)
+++ phpdoc/ru/trunk/reference/tokenizer/phptoken.xml	2020-12-19 10:57:11 UTC (rev 352133)
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- EN-Revision: 351961 Maintainer: rjhdby Status: ready -->
+<!-- $Revision$ -->
+<!-- Reviewed: no -->
+
+<phpdoc:classref xml:id="class.phptoken" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <title>Класс PhpToken</title>
+ <titleabbrev>PhpToken</titleabbrev>
+
+ <partintro>
+
+  <!-- {{{ PhpToken intro -->
+  <section xml:id="phptoken.intro">
+   &reftitle.intro;
+   <para>
+    Этот класс предоставляет альтернативу функции <function>token_get_all</function>. Тогда как функция возвращает токены
+    либо в виде односимвольной строки, либо в виде массива с иденотификатором токена, его текстом и номером строки,
+    <function>PhpToken::tokenize</function> нормализует все токены в объекты PhpToken, что позволяет гораздо
+    более удобно работать с токенами.
+   </para>
+  </section>
+  <!-- }}} -->
+
+  <section xml:id="phptoken.synopsis">
+   &reftitle.classsynopsis;
+
+   <!-- {{{ Synopsis -->
+   <classsynopsis>
+    <ooclass><classname>PhpToken</classname></ooclass>
+
+    <!-- {{{ Class synopsis -->
+    <classsynopsisinfo>
+     <ooclass>
+      <classname>PhpToken</classname>
+     </ooclass>
+    </classsynopsisinfo>
+    <!-- }}} -->
+
+    <classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
+    <fieldsynopsis>
+     <modifier>public</modifier>
+     <type>int</type>
+     <varname linkend="phptoken.props.id">id</varname>
+    </fieldsynopsis>
+    <fieldsynopsis>
+     <modifier>public</modifier>
+     <type>string</type>
+     <varname linkend="phptoken.props.text">text</varname>
+    </fieldsynopsis>
+    <fieldsynopsis>
+     <modifier>public</modifier>
+     <type>int</type>
+     <varname linkend="phptoken.props.line">line</varname>
+    </fieldsynopsis>
+    <fieldsynopsis>
+     <modifier>public</modifier>
+     <type>int</type>
+     <varname linkend="phptoken.props.pos">pos</varname>
+    </fieldsynopsis>
+
+    <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
+    <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.phptoken')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis)">
+     <xi:fallback />
+    </xi:include>
+    <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.phptoken')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis)">
+     <xi:fallback />
+    </xi:include>
+
+   </classsynopsis>
+   <!-- }}} -->
+
+  </section>
+
+  <section xml:id="phptoken.props">
+   &reftitle.properties;
+   <variablelist>
+    <varlistentry xml:id="phptoken.props.id">
+     <term><varname>id</varname></term>
+     <listitem>
+      <para>
+       Одна из констант T_*, или символ ASCII, представляющий односимвольный токен.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry xml:id="phptoken.props.text">
+     <term><varname>text</varname></term>
+     <listitem>
+      <para>
+       Текстовое содержимое токена.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry xml:id="phptoken.props.line">
+     <term><varname>line</varname></term>
+     <listitem>
+      <para>
+       Номер строки (начиная с 1), с которой начинается токен.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry xml:id="phptoken.props.pos">
+     <term><varname>pos</varname></term>
+     <listitem>
+      <para>
+       Начальная позиция (начиная с 0) токена в строке.
+      </para>
+     </listitem>
+    </varlistentry>
+   </variablelist>
+  </section>
+
+ </partintro>
+
+ &reference.tokenizer.entities.phptoken;
+
+</phpdoc:classref>
+<!-- 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
+-->


Property changes on: phpdoc/ru/trunk/reference/tokenizer/phptoken.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property