quota
[ class tree: quota ] [ index: quota ] [ all elements ]

Class: LibertyQuota

Source Location: d:\website\PhpDocumentor\/quota/LibertyQuota.php

Class Overview

BitBase
   |
   --LibertyBase
      |
      --LibertyQuota

Quota class to illustrate best practices when creating a new bitweaver package that builds on core bitweaver functionality, such as the Liberty CMS engine


Author(s):

Version:

  • $Revision: 1.12 $ $Date: 2006/09/05 21:12:59 $ $Author: spiderr $

Variables

Methods


Inherited Variables

Inherited Methods

Class: LibertyBase

LibertyBase::LibertyBase()
Constructor building on BitBase object
LibertyBase::getLibertyObject()
Given a content_id, this will return and object of the proper type

Class: BitBase

BitBase::BitBase()
During initialisation, we assign a name which is used by the class.
BitBase::debug()
Switch debug level in database
BitBase::display()
This method should be THE method used to display a template. php files should not access $gBitSmarty directly.
BitBase::getDb()
Return pointer to current Database
BitBase::getField()
Returns entry from the mInfo hash if field exists
BitBase::isDatabaseValid()
Determines if there is a valide database connection
BitBase::prepGetList()
Prepares parameters with default values for any getList function
BitBase::setDatabase()
Sets database mechanism for the instance
BitBase::verifyId()
Determines if any given variable exists and is a number

Class Details

[line 33]
Quota class to illustrate best practices when creating a new bitweaver package that builds on core bitweaver functionality, such as the Liberty CMS engine



Tags:

version:  $Revision: 1.12 $ $Date: 2006/09/05 21:12:59 $ $Author: spiderr $
author:  spider <spider@steelsun.com>


[ Top ]


Class Variables

$mQuotaId =

[line 38]

Primary key for our mythical Quota class object & table



Tags:

public:  

Type:   mixed


[ Top ]



Class Methods


constructor LibertyQuota [line 43]

LibertyQuota LibertyQuota( [ $pQuotaId = NULL], [ $pContentId = NULL])

During initialisation, be sure to call our base constructors



Parameters:

   $pQuotaId  
   $pContentId  

[ Top ]

method assignQuotaToGroup [line 155]

void assignQuotaToGroup( $pQuotaId, $pGroupId)



Parameters:

   $pQuotaId  
   $pGroupId  

[ Top ]

method getDisplayUrl [line 233]

the getDisplayUrl( pExistsHash 0)

Generates the URL to the quota page



Tags:

return:  link to display the page.


Parameters:

pExistsHash   0   the hash that was returned by LibertyContent::pageExists

[ Top ]

method getList [line 125]

void getList( )



[ Top ]

method getQuotaGroups [line 142]

void getQuotaGroups( )



[ Top ]

method getQuotaMenu [line 134]

void getQuotaMenu( [ $pName = 'quota_menu'], [ $pSelectId = NULL])



Parameters:

   $pName  
   $pSelectId  

[ Top ]

method getUserQuota [line 201]

an getUserQuota( pUserId $pUserId)

Given a user_id, this will return the max quota for the given user. If the user belongs to more than one group, it will chose the max values



Tags:

return:  integer of the total bytes used


Parameters:

pUserId   $pUserId   user_id of the user for usage to be calculated for

[ Top ]

method getUserUsage [line 220]

an getUserUsage( pUserId $pUserId)

Given a user_id, this will return this disk space used for the given user



Tags:

return:  integer of the total bytes used


Parameters:

pUserId   $pUserId   user_id of the user for usage to be calculated for

[ Top ]

method isUserUnderQuota [line 175]

void isUserUnderQuota( $pUserId)

returns the quota and consumption if a user is under usage level



Parameters:

   $pUserId  

[ Top ]

method isValid [line 241]

void isValid( )



[ Top ]

method load [line 105]

void load( pParamHash 0)

Load the data from the database



Parameters:

pParamHash   0   be sure to pass by reference in case we need to make modifcations to the hash

[ Top ]

method store [line 53]

void store( pParamHash &$pParamHash)

Any method named Store inherently implies data will be written to the database



Parameters:

pParamHash   &$pParamHash   be sure to pass by reference in case we need to make modifcations to the hash

[ Top ]

method verify [line 74]

void verify( pParamHash &$pParamHash)

Make sure the data is safe to store



Parameters:

pParamHash   &$pParamHash   be sure to pass by reference in case we need to make modifcations to the hash

[ Top ]


Documentation generated on Thu, 15 Feb 2007 20:42:30 +0000 by phpDocumentor 1.3.0