Class IMP_Quota_Base
The IMP_Quota_Base:: class is the abstract class that all drivers inherit
from.
Copyright 2010-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (GPL). If you
did not receive this file, see http://www.horde.org/licenses/gpl.
Methods summary
public
|
#
__construct( array $params = array() )
Constructor.
Parameters
- $params
- Parameters:
<pre><span class="php-quote">'format'</span> - (string) The formats of the quota messages in the user
<span class="php-keyword1">interface</span>. Must be a <span class="php-keyword2">hash</span> with the four possible elements
<span class="php-quote">'long'</span>, <span class="php-quote">'short'</span>, <span class="php-quote">'nolimit_long'</span>, <span class="php-keyword1">and</span> <span class="php-quote">'nolimit_short'</span>. The
strings will be passed through <span class="php-keyword2">sprintf</span>().
<span class="php-quote">'unit'</span> - (string) What storage unit the quota messages should be
displayed in. Either <span class="php-quote">'GB'</span>, <span class="php-quote">'MB'</span>, <span class="php-keyword1">or</span> <span class="php-quote">'KB'</span>.
<span class="php-quote">'username'</span> - (string) The username to query.</pre>
|
abstract public
array
|
#
getQuota( )
Get quota information (used/allocated), in bytes.
Get quota information (used/allocated), in bytes.
Returns
array An array with the following keys:
'limit' = Maximum quota allowed
'usage' = Currently used portion of quota (in bytes)
Throws
|
public
array
|
#
getMessages( )
Returns the quota messages variants, including sprintf placeholders.
Returns the quota messages variants, including sprintf placeholders.
Returns
array An array with quota message templates.
|
public
array
|
#
getUnit( )
Determine the units of storage to display in the quota message.
Determine the units of storage to display in the quota message.
Returns
array An array of size and unit type.
|