phpDocumentor Quotas
Classes
[ class tree: Quotas ] [ index: Quotas ] [ all elements ]

Class: GalleryQuotasHelper

Source Location: /modules/quotas/classes/GalleryQuotasHelper.class

Class GalleryQuotasHelper

Method Summary
array   fetchGroupQuota()   Get the quota assigned to a group
array   fetchHighestGroupQuota()   Get the users highest group quota, if they have multiple (or one), or return no quota if they have no group quotas assigned.
array   fetchQuotaGroupCount()   Get the users highest group quota, if they have multiple (or one), or return no quota if they have no group quotas assigned.
array   fetchQuotaGroupIdList()   Get list of groups who have quotas
array   fetchQuotaUserCount()   Get the number of users that have a quota assigned directly to them
array   fetchQuotaUserIdList()   Get list of user's who have quotas
array   fetchUserQuota()   Get the quota assigned to a user
array   getUserDiskQuota()   Get the user's quota if one exists. This is achieved by checking for a direct user quota, if one does not exist, then quotas for groups the user belongs to is checked.
array   getUserDiskUsage()   Get the total size of all the user's current files, excluding the files in the excludeIds param array.
array   humanReadableFromKilobytes()   Convert Kilobytes to a human readable format (ie: KB, MB, GB)

[ Top ]
Methods
fetchGroupQuota  [line 354]

  array fetchGroupQuota( $groupId  )

Get the quota assigned to a group

Parameters:
   $groupId: 

API Tags:
Return:  GalleryStatus a status code boolean does a quota exist array('id' => group's groupId 'quota' => group's disk quota, 'name' => group's groupname)


[ Top ]
fetchHighestGroupQuota  [line 129]

  array fetchHighestGroupQuota( $userId  )

Get the users highest group quota, if they have multiple (or one), or return no quota if they have no group quotas assigned.

Parameters:
   $userId: 

API Tags:
Return:  GalleryStatus a status code boolean: does a quota exists for this user array('quota' => integer user's disk quota in Kilobytes, 'name' => string group's name)


[ Top ]
fetchQuotaGroupCount  [line 249]

  array fetchQuotaGroupCount( )

Get the users highest group quota, if they have multiple (or one), or return no quota if they have no group quotas assigned.


API Tags:
Return:  GalleryStatus a status code integer the number of groups that have quotas assigned


[ Top ]
fetchQuotaGroupIdList  [line 208]

  array fetchQuotaGroupIdList( $count, [ $offset = 0]  )

Get list of groups who have quotas

Parameters:
   $count: 
   $offset: 

API Tags:
Return:  GalleryStatus a status code array(groupId => array('quota' => group's disk quota, 'name' => group's groupname))


[ Top ]
fetchQuotaUserCount  [line 320]

  array fetchQuotaUserCount( )

Get the number of users that have a quota assigned directly to them


API Tags:
Return:  GalleryStatus a status code integer the number of users that have quotas assigned


[ Top ]
fetchQuotaUserIdList  [line 281]

  array fetchQuotaUserIdList( $count, [ $offset = 0]  )

Get list of user's who have quotas

Parameters:
   $count: 
   $offset: 

API Tags:
Return:  GalleryStatus a status code array(groupId => array('quota' => user's disk quota, 'name' => user's username))


[ Top ]
fetchUserQuota  [line 399]

  array fetchUserQuota( $userId  )

Get the quota assigned to a user

Parameters:
   $userId: 

API Tags:
Return:  GalleryStatus a status code boolean does a quota exist array('id' => user's userId 'quota' => user's disk quota, 'name' => user's username)


[ Top ]
getUserDiskQuota  [line 94]

  array getUserDiskQuota( $userId  )

Get the user's quota if one exists. This is achieved by checking for a direct user quota, if one does not exist, then quotas for groups the user belongs to is checked.

If the user belongs to one or more groups with quotas, the group with the highest quota is used as their quota.

Parameters:
   $userId: 

API Tags:
Return:  GalleryStatus a status code bool does a quota exists for this user integer user's disk quota in Kilobytes


[ Top ]
getUserDiskUsage  [line 44]

  array getUserDiskUsage( $userId, [ $excludeIds = array()]  )

Get the total size of all the user's current files, excluding the files in the excludeIds param array.

Parameters:
   $userId: 
   $excludeIds: 

API Tags:
Return:  GalleryStatus a status code integer user's disk usage in bytes


[ Top ]
humanReadableFromKilobytes  [line 182]

  array humanReadableFromKilobytes( $kilobytes  )

Convert Kilobytes to a human readable format (ie: KB, MB, GB)

Parameters:
   $kilobytes: 

API Tags:
Return:  GalleryStatus a status code string user's quota in human readable format string the unit of measurement for the user's quota (ie: KB, MB, GB)


[ Top ]

Documentation generated on Fri, 08 Oct 2010 05:02:52 -0700 by phpDocumentor 1.3.0RC6