PHP Class IMP_Quota, horde

Author: Michael Slusarz ([email protected])
Show file Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_params array Driver parameters.

Public Methods

Method Description
__construct ( array $params = [] ) Constructor.
getMessages ( ) : array Returns the quota messages variants, including sprintf placeholders.
getQuota ( string $mailbox = null ) : array Get quota information (used/allocated), in bytes.
getUnit ( ) : array Determine the units of storage to display in the quota message.
isHiddenWhenUnlimited ( ) : boolean Should quota be displayed if no limit is configured?

Method Details

__construct() public method

Constructor.
public __construct ( array $params = [] )
$params 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() public method

Returns the quota messages variants, including sprintf placeholders.
public getMessages ( ) : array
return array An array with quota message templates.

getQuota() abstract public method

Get quota information (used/allocated), in bytes.
abstract public getQuota ( string $mailbox = null ) : array
$mailbox string Mailbox to check.
return array An array with the following keys: - limit: Maximum quota allowed - usage: Currently used portion of quota (in bytes)

getUnit() public method

Determine the units of storage to display in the quota message.
public getUnit ( ) : array
return array An array of size and unit type.

isHiddenWhenUnlimited() public method

Should quota be displayed if no limit is configured?
public isHiddenWhenUnlimited ( ) : boolean
return boolean Whether to hide the quota.

Property Details

$_params protected property

Driver parameters.
protected array $_params
return array