<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.imap.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.imap-fetchstructure.php',
    1 => 'imap_fetchstructure',
    2 => 'Читает структуру указанного сообщения',
  ),
  'up' => 
  array (
    0 => 'ref.imap.php',
    1 => 'Функции IMAP',
  ),
  'prev' => 
  array (
    0 => 'function.imap-fetchmime.php',
    1 => 'imap_fetchmime',
  ),
  'next' => 
  array (
    0 => 'function.imap-fetchtext.php',
    1 => 'imap_fetchtext',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/imap/functions/imap-fetchstructure.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.imap-fetchstructure" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imap_fetchstructure</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">imap_fetchstructure</span> &mdash; <span class="dc-title">Читает структуру указанного сообщения</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imap-fetchstructure-description">
  <h3 class="title">Описание</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imap_fetchstructure</strong></span>(<span class="methodparam"><span class="type"><a href="class.imap-connection.php" class="type IMAP\Connection">IMAP\Connection</a></span> <code class="parameter">$imap</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$message_num</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>): <span class="type"><span class="type"><a href="class.stdclass.php" class="type stdClass">stdClass</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Извлекает информацию о структуре указанного сообщения.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.imap-fetchstructure-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    <dt>
<code class="parameter">imap</code></dt><dd><p class="para">Экземпляр класса <span class="classname"><a href="class.imap-connection.php" class="classname">IMAP\Connection</a></span>.</p></dd>
    
     <dt><code class="parameter">message_num</code></dt>
     <dd>
      <p class="para">
       Номер сообщения
      </p>
     </dd>
    
    
     <dt><code class="parameter">flags</code></dt>
     <dd>
      <p class="para">
       Если задано как <strong><code><a href="imap.constants.php#constant.ft-uid">FT_UID</a></code></strong>, то в
       <code class="parameter">message_num</code> должны быть <code class="literal">UID</code> сообщений,
       а не их номера.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.imap-fetchstructure-returnvalues">
  <h3 class="title">Возвращаемые значения</h3>
  <p class="para">
   Возвращает объект со свойствами, перечисленными в таблице ниже или <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, если возникла ошибка.
  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>
     Объект, возвращаемый <span class="function"><strong>imap_fetchstructure()</strong></span>
    </strong></caption>
    
     <tbody class="tbody">
      <tr>
       <td>type</td>
       <td>Первичный тип тела</td>
      </tr>

      <tr>
       <td>encoding</td>
       <td>Кодировка тела</td>
      </tr>

      <tr>
       <td>ifsubtype</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, если есть строка подтипа</td>
      </tr>

      <tr>
       <td>subtype</td>
       <td><abbr title="Multipurpose Internet Mail Extensions">MIME</abbr>-подтип</td>
      </tr>

      <tr>
       <td>ifdescription</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, если есть строка описания</td>
      </tr>

      <tr>
       <td>description</td>
       <td>Контент строки описания</td>
      </tr>

      <tr>
       <td>ifid</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, если есть строка идентификатор</td>
      </tr>

      <tr>
       <td>id</td>
       <td>Строка идентификатор</td>
      </tr>

      <tr>
       <td>lines</td>
       <td>Количество строк</td>
      </tr>

      <tr>
       <td>bytes</td>
       <td>Количество байт</td>
      </tr>

      <tr>
       <td>ifdisposition</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, если есть строка расположения</td>
      </tr>

      <tr>
       <td>disposition</td>
       <td>Строка расположения</td>
      </tr>

      <tr>
       <td>ifdparameters</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, если есть массив <var class="varname">dparameters</var></td>
      </tr>

      <tr>
       <td>dparameters</td>
       <td>Массив объектов, каждый из которых имеет свойства
        <code class="literal">&quot;attribute&quot;</code> и <code class="literal">&quot;value&quot;</code>, соответствующие
        параметрам <code class="literal">Content-disposition</code> заголовка
        <abbr title="Multipurpose Internet Mail Extensions">MIME</abbr>.</td>
      </tr>

      <tr>
       <td>ifparameters</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, если есть массив параметров</td>
      </tr>

      <tr>
       <td>parameters</td>
       <td>Массив объектов, каждый из которых имеет свойства
        <code class="literal">&quot;attribute&quot;</code> и <code class="literal">&quot;value&quot;</code>.</td>
      </tr>

      <tr>
       <td>parts</td>
       <td>Массив объектов идентичных по структуре с верхнеуровневым объектом,
        каждый из которых соответствует <abbr title="Multipurpose Internet Mail Extensions">MIME</abbr> части тела.</td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Первичный тип тела (значения могут отличаться в зависимости от используемой
     библиотеки, так что рекомендуется использовать константы)</strong></caption>
    
     <thead>
      <tr><th>Значение</th><th>Тип</th><th>Константа</th></tr>

     </thead>

     <tbody class="tbody">
      <tr><td>0</td><td>text</td><td>TYPETEXT</td></tr>

      <tr><td>1</td><td>multipart</td><td>TYPEMULTIPART</td></tr>

      <tr><td>2</td><td>message</td><td>TYPEMESSAGE</td></tr>

      <tr><td>3</td><td>application</td><td>TYPEAPPLICATION</td></tr>

      <tr><td>4</td><td>audio</td><td>TYPEAUDIO</td></tr>

      <tr><td>5</td><td>image</td><td>TYPEIMAGE</td></tr>

      <tr><td>6</td><td>video</td><td>TYPEVIDEO</td></tr>

      <tr><td>7</td><td>model</td><td>TYPEMODEL</td></tr>

      <tr><td>8</td><td>other</td><td>TYPEOTHER</td></tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Кодировка (значения могут отличаться в зависимости от используемой
     библиотеки, так что рекомендуется использовать константы)</strong></caption>
    
     <thead>
      <tr><th>Значение</th><th>Тип</th><th>Константа</th></tr>

     </thead>

     <tbody class="tbody">
      <tr><td>0</td><td>7bit</td><td>ENC7BIT</td></tr>

      <tr><td>1</td><td>8bit</td><td>ENC8BIT</td></tr>

      <tr><td>2</td><td>Binary</td><td>ENCBINARY</td></tr>

      <tr><td>3</td><td>Base64</td><td>ENCBASE64</td></tr>

      <tr><td>4</td><td>Quoted-Printable</td><td>ENCQUOTEDPRINTABLE</td></tr>

      <tr><td>5</td><td>other</td><td>ENCOTHER</td></tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imap-fetchstructure-changelog">
  <h3 class="title">Список изменений</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версия</th>
      <th>Описание</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.1.0</td>
 <td>
  Параметр <code class="parameter">imap</code> теперь принимает объект <span class="classname"><a href="class.imap-connection.php" class="classname">IMAP\Connection</a></span>;
  раньше параметр ждал ресурс (<span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>) <code class="literal">imap</code>.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.imap-fetchstructure-seealso">
  <h3 class="title">Смотрите также</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.imap-fetchbody.php" class="function" rel="rdfs-seeAlso">imap_fetchbody()</a> - Извлекает конкретную секцию тела сообщения</span></li>
    <li><span class="function"><a href="function.imap-bodystruct.php" class="function" rel="rdfs-seeAlso">imap_bodystruct()</a> - Читает структуру указанной секции тела заданного сообщения</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>