You are here

README.txt in Hosting 6.2

Same filename in this branch
  1. 6.2 quota/README.txt
  2. 6.2 queued/README.txt
Same filename and directory in other branches
  1. 7.4 quota/README.txt
  2. 7.3 quota/README.txt
API Documentation
~~~~~~~~~~~~~~~~~

Functions
---------

These are all defined in hosting_quota.module

hosting_quota_get($resource)
    Get info about a particular resource.
hosting_quota_get_usage($client, $resource, $start = NULL, $end = NULL)
    Get usage info about a resource for a given client, by calling that resources usage hook.
hosting_quota_resource_render($resource, $usage)
    Render a given resource, by calling its rendering hook.
hosting_quota_set_limit($client, $resource, $value)
    Sets the limit for a given clients quota.
hosting_quota_check($client, $resource, $start = NULL, $end = NULL)
    Convenient function to return a boolean, true if the client has not reached their limit, false if they have.
hosting_quota_get_all_info($client, $start = NULL, $end = NULL)
    Retrieve all of the info for a given clients quotas, within a declared period (defaults to the last month).

Hooks
-----

Hook definitions are documented in hosting_quota.hooks.php. A partial usage example was created in hosting_site.quota.inc

hook_hosting_quota_resource()
    Returns an array containing info about each resource provided by a module.
hook_hosting_quota_get_usage($client, $resource, $start, $end)
    This hook should return an integer that can be compared to the set limit.
hook_hosting_quota_resource_render($resource, $usage)
    This hook should return a human readable version of the usage for this resource.

File

quota/README.txt
View source
  1. API Documentation
  2. ~~~~~~~~~~~~~~~~~
  3. Functions
  4. ---------
  5. These are all defined in hosting_quota.module
  6. hosting_quota_get($resource)
  7. Get info about a particular resource.
  8. hosting_quota_get_usage($client, $resource, $start = NULL, $end = NULL)
  9. Get usage info about a resource for a given client, by calling that resources usage hook.
  10. hosting_quota_resource_render($resource, $usage)
  11. Render a given resource, by calling its rendering hook.
  12. hosting_quota_set_limit($client, $resource, $value)
  13. Sets the limit for a given clients quota.
  14. hosting_quota_check($client, $resource, $start = NULL, $end = NULL)
  15. Convenient function to return a boolean, true if the client has not reached their limit, false if they have.
  16. hosting_quota_get_all_info($client, $start = NULL, $end = NULL)
  17. Retrieve all of the info for a given clients quotas, within a declared period (defaults to the last month).
  18. Hooks
  19. -----
  20. Hook definitions are documented in hosting_quota.hooks.php. A partial usage example was created in hosting_site.quota.inc
  21. hook_hosting_quota_resource()
  22. Returns an array containing info about each resource provided by a module.
  23. hook_hosting_quota_get_usage($client, $resource, $start, $end)
  24. This hook should return an integer that can be compared to the set limit.
  25. hook_hosting_quota_resource_render($resource, $usage)
  26. This hook should return a human readable version of the usage for this resource.