function hook_hosting_quota_get_usage

7.x-3.x hosting_quota.api.php hook_hosting_quota_get_usage($client, $resource, $start, $end)

Definition of hook_hosting_quota_get_usage

Parameters

$client int: The nid of the client node

$resource string: The machine name of the resource

$start string: A MySQL format date

$end string: Another MySQL format date

Return value

int Return an integer that can be compared to what the quota is set to

Related topics

1 function implements hook_hosting_quota_get_usage()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

hosting_site_hosting_quota_get_usage in site/hosting_site.quota.inc
Implements hook_hosting_quota_get_usage().
2 invocations of hook_hosting_quota_get_usage()
hosting_quota_check in quota/hosting_quota.module
Quickly check if a given quota has been exceeded
hosting_quota_get_usage in quota/hosting_quota.module
@todo Please document this function.

File

quota/hosting_quota.api.php, line 42
Hooks provided by the hosting quota module.

Code

function hook_hosting_quota_get_usage($client, $resource, $start, $end) {

  if (hosting_get_client($client)) {
    switch ($resource) {
      case 'foo':
        // Do some things
        return $usage;
    }
  }
}