<?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 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.imap-get-quotaroot.php',
    1 => 'imap_get_quotaroot',
    2 => 'Retrieve the quota settings per user',
  ),
  'up' => 
  array (
    0 => 'ref.imap.php',
    1 => 'IMAP Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.imap-get-quota.php',
    1 => 'imap_get_quota',
  ),
  'next' => 
  array (
    0 => 'function.imap-getacl.php',
    1 => 'imap_getacl',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/imap/functions/imap-get-quotaroot.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.imap-get-quotaroot" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imap_get_quotaroot</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">imap_get_quotaroot</span> &mdash; <span class="dc-title">Retrieve the quota settings per user</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imap-get-quotaroot-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imap_get_quotaroot</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.string.php" class="type string">string</a></span> <code class="parameter">$mailbox</code></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Retrieve the quota settings per user. The limit value represents the total
   amount of space allowed for this user&#039;s total mailbox usage.  The usage
   value represents the user&#039;s current total mailbox capacity.  
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.imap-get-quotaroot-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    <dt>
<code class="parameter">imap</code></dt><dd><p class="para">An <span class="classname"><a href="class.imap-connection.php" class="classname">IMAP\Connection</a></span> instance.</p></dd>
    
     <dt><code class="parameter">mailbox</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">mailbox</code> should normally be in the form of
       which mailbox (i.e. INBOX).
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.imap-get-quotaroot-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Returns an array of integer values pertaining to the specified user
   mailbox.  All values contain a key based upon the resource name, and a
   corresponding array with the usage and limit values within.
  </p>
  <p class="para">
   This function will return <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in the case of call failure, and an
   array of information about the connection upon an un-parsable response
   from the server.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imap-get-quotaroot-changelog">
  <h3 class="title">Log delle modifiche</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versione</th>
      <th>Descrizione</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.1.0</td>
 <td>
  The <code class="parameter">imap</code> parameter expects an <span class="classname"><a href="class.imap-connection.php" class="classname">IMAP\Connection</a></span>
  instance now; previously, a valid <code class="literal">imap</code> <a href="language.types.resource.php" class="link">resource</a> was expected.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>

 
 <div class="refsect1 examples" id="refsect1-function.imap-get-quotaroot-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 <span class="function"><strong>imap_get_quotaroot()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$mbox </span><span style="color: #007700">= </span><span style="color: #0000BB">imap_open</span><span style="color: #007700">(</span><span style="color: #DD0000">"{imap.example.org}"</span><span style="color: #007700">, </span><span style="color: #DD0000">"kalowsky"</span><span style="color: #007700">, </span><span style="color: #DD0000">"password"</span><span style="color: #007700">, </span><span style="color: #0000BB">OP_HALFOPEN</span><span style="color: #007700">)<br />      or die(</span><span style="color: #DD0000">"can't connect: " </span><span style="color: #007700">. </span><span style="color: #0000BB">imap_last_error</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">$quota </span><span style="color: #007700">= </span><span style="color: #0000BB">imap_get_quotaroot</span><span style="color: #007700">(</span><span style="color: #0000BB">$mbox</span><span style="color: #007700">, </span><span style="color: #DD0000">"INBOX"</span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">is_array</span><span style="color: #007700">(</span><span style="color: #0000BB">$quota</span><span style="color: #007700">)) {<br />   </span><span style="color: #0000BB">$storage </span><span style="color: #007700">= </span><span style="color: #0000BB">$quota</span><span style="color: #007700">[</span><span style="color: #DD0000">'STORAGE'</span><span style="color: #007700">];<br />   echo </span><span style="color: #DD0000">"STORAGE usage level is: " </span><span style="color: #007700">.  </span><span style="color: #0000BB">$storage</span><span style="color: #007700">[</span><span style="color: #DD0000">'usage'</span><span style="color: #007700">];<br />   echo </span><span style="color: #DD0000">"STORAGE limit level is: " </span><span style="color: #007700">.  </span><span style="color: #0000BB">$storage</span><span style="color: #007700">[</span><span style="color: #DD0000">'limit'</span><span style="color: #007700">];<br /><br />   </span><span style="color: #0000BB">$message </span><span style="color: #007700">= </span><span style="color: #0000BB">$quota</span><span style="color: #007700">[</span><span style="color: #DD0000">'MESSAGE'</span><span style="color: #007700">];<br />   echo </span><span style="color: #DD0000">"MESSAGE usage level is: " </span><span style="color: #007700">.  </span><span style="color: #0000BB">$message</span><span style="color: #007700">[</span><span style="color: #DD0000">'usage'</span><span style="color: #007700">];<br />   echo </span><span style="color: #DD0000">"MESSAGE limit level is: " </span><span style="color: #007700">.  </span><span style="color: #0000BB">$message</span><span style="color: #007700">[</span><span style="color: #DD0000">'limit'</span><span style="color: #007700">];<br /><br />   </span><span style="color: #FF8000">/* ...  */<br /><br /></span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB">imap_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$mbox</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>

 <div class="refsect1 notes" id="refsect1-function.imap-get-quotaroot-notes">
  <h3 class="title">Note</h3>
  <p class="para">
   This function is currently only available to users of the c-client2000
   or greater library.
  </p>
  <p class="para">
   The <code class="parameter">imap</code> should be opened as the user whose
   mailbox you wish to check.
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.imap-get-quotaroot-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.imap-open.php" class="function" rel="rdfs-seeAlso">imap_open()</a> - Open an IMAP stream to a mailbox</span></li>
    <li><span class="function"><a href="function.imap-set-quota.php" class="function" rel="rdfs-seeAlso">imap_set_quota()</a> - Sets a quota for a given mailbox</span></li>
    <li><span class="function"><a href="function.imap-get-quota.php" class="function" rel="rdfs-seeAlso">imap_get_quota()</a> - Retrieve the quota level settings, and usage statics per mailbox</span></li>
   </ul>
  </p>
 </div>

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