Class IMP_Quota
The abstract class that all quota drivers inherit from.
Methods summary
public
|
#
__construct( array $params = array() )
Constructor.
Parameters
- $params
- <p>Parameters:
- unit: (string) What storage unit the quota messages should be
displayed in. Either 'GB', 'MB', or 'KB'.
- username: (string) The username to query.</p>
|
abstract public
array
|
#
getQuota( string $mailbox = null )
Get quota information (used/allocated), in bytes.
Get quota information (used/allocated), in bytes.
Parameters
- $mailbox
- Mailbox to check.
Returns
array An array with the following keys:
- limit: Maximum quota allowed
- usage: Currently used portion of quota (in bytes)
Throws
|
public
boolean
|
#
isHiddenWhenUnlimited( )
Should quota be displayed if no limit is configured?
Should quota be displayed if no limit is configured?
Returns
boolean Whether to hide the quota.
|
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.
|