IMP_Quota
in package
AbstractYes
The abstract class that all quota drivers inherit from.
Tags
Table of Contents
Properties
- $_params : array<string|int, mixed>
- Driver parameters.
Methods
- __construct() : mixed
- Constructor.
- getMessages() : array<string|int, mixed>
- Returns the quota messages variants, including sprintf placeholders.
- getQuota() : array<string|int, mixed>
- Get quota information (used/allocated), in bytes.
- getUnit() : array<string|int, mixed>
- Determine the units of storage to display in the quota message.
- isHiddenWhenUnlimited() : bool
- Should quota be displayed if no limit is configured?
Properties
$_params
Driver parameters.
protected
array<string|int, mixed>
$_params
= array('hide_when_unlimited' => \false, 'unit' => 'MB')
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed> = array()
-
Parameters:
- unit: (string) What storage unit the quota messages should be displayed in. Either 'GB', 'MB', or 'KB'.
- username: (string) The username to query.
getMessages()
Returns the quota messages variants, including sprintf placeholders.
public
getMessages() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array with quota message templates.
getQuota()
Get quota information (used/allocated), in bytes.
public
abstract getQuota([string $mailbox = null ]) : array<string|int, mixed>
Parameters
- $mailbox : string = null
-
Mailbox to check.
Tags
Return values
array<string|int, mixed> —An array with the following keys:
- limit: Maximum quota allowed
- usage: Currently used portion of quota (in bytes)
getUnit()
Determine the units of storage to display in the quota message.
public
getUnit() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of size and unit type.
isHiddenWhenUnlimited()
Should quota be displayed if no limit is configured?
public
isHiddenWhenUnlimited() : bool
Return values
bool —Whether to hide the quota.