CSERDuser Class Reference
[CSERD Model Objects]

Model class for user entity. More...

Inheritance diagram for CSERDuser:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($constraints=null)
 Constructs new CSERDuser object.
 addcomment ($review, $comment= '', $timestamp= '')
 Add new CSERDcomment object connected to this object.
 addreview ($active=null, $type, $cserdId=null, $solicited=null, $state= '', $created= '', $modified= '0000-00-00 00:00:00', $cache= '', $project= '')
 Add new CSERDreview object connected to this object.
 adduserDetail ($detail, $data=null)
 Add new CSERDuserDetail object connected to this object.
 adduserLoginLog ($loginTime= '')
 Add new CSERDuserLoginLog object connected to this object.
 adduserPageviewLog ($URL=null, $pageviewTime= '')
 Add new CSERDuserPageviewLog object connected to this object.
 clearSessionData ($key=null)
 Clear session data for a given key, or all session data.
 getSessionData ($key)
 Fetch additional data stored in this user object (with a key).
 issetSessionData ($key)
 Check to see if session data is set for a certain key.
 listcomments ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of children CSERDcomment objects.
 listcommentsMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of children CSERDcomment objects using joins.
 listreviews ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of children CSERDreview objects.
 listreviewsMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of children CSERDreview objects using joins.
 listuserDetails ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of children CSERDuserDetail objects.
 listuserDetailsMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of children CSERDuserDetail objects using joins.
 listuserLoginLogs ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of children CSERDuserLoginLog objects.
 listuserLoginLogsMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of children CSERDuserLoginLog objects using joins.
 listuserPageviewLogs ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of children CSERDuserPageviewLog objects.
 listuserPageviewLogsMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of children CSERDuserPageviewLog objects using joins.

Static Public Member Functions

static exists ($constraints=array())
 Checks to see if object exists according to constraints.
static getAttributesStatic ()
 Retrieves attributes and information about them.
static getList ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of CSERDuser objects.
static getTableNameStatic ()
 Retrieves name of table represented by this class.
static retrieve ($constraints=array(), $checkOnly=false)
 Retrieves a single object of this type, given the constraints.

Static Public Attributes

static $ATTRIBUTES
 Attributes for this entity and information about them.

Protected Attributes

 $sessionData
 Misc session data stored for this user by web app controllers.


Detailed Description

Model class for user entity.

INSERT DESCRIPTION HERE

Definition at line 12 of file CSERDuser.php5.


Constructor & Destructor Documentation

CSERDuser::__construct ( constraints = null  ) 

Constructs new CSERDuser object.

This method will only populate the object if a constraints array is passed in, to use for selecting the information for the object from the database (see Guide to Database Constraints).

Parameters:
$constraints [array]: constraints array for populating

Definition at line 92 of file CSERDuser.php5.

References SDatabaseModel::populate(), SModel2::registerAttributes(), SDatabaseModel::registerPrimaryKey(), and SDatabaseModel::registerTableName().


Member Function Documentation

CSERDuser::addcomment ( review,
comment = '',
timestamp = '' 
)

Add new CSERDcomment object connected to this object.

This method creates a new CSERDcomment and makes sure that relevant foreign keys in that object point to this object and any other necessary objects as passed in as parameters to this method. For parameters that request another model object, you may either pass in the model object itself, or the id value for that object, as would be used in the foreign key of the new CSERDcomment object. For example, if the new object needs to point to both this object and, say, a user object, then you can either pass in a user object, or a user ID.

Parameters:
$review [CSERDreview]: Can also be foreign key value. INSERT DESCRIPTION HERE
$comment [string]: INSERT DESCRIPTION HERE
$timestamp [time]: INSERT DESCRIPTION HERE
Returns:
[CSERDcomment]: new object (already committed) or null on failure

Definition at line 309 of file CSERDuser.php5.

References SDatabaseModel::commit().

CSERDuser::addreview ( active = null,
type,
cserdId = null,
solicited = null,
state = '',
created = '',
modified = '0000-00-00 00:00:00',
cache = '',
project = '' 
)

Add new CSERDreview object connected to this object.

This method creates a new CSERDreview and makes sure that relevant foreign keys in that object point to this object and any other necessary objects as passed in as parameters to this method. For parameters that request another model object, you may either pass in the model object itself, or the id value for that object, as would be used in the foreign key of the new CSERDreview object. For example, if the new object needs to point to both this object and, say, a user object, then you can either pass in a user object, or a user ID.

Parameters:
$active [int]: INSERT DESCRIPTION HERE
$type [string]: INSERT DESCRIPTION HERE
$cserdId [int]: INSERT DESCRIPTION HERE
$solicited [int]: INSERT DESCRIPTION HERE
$state [string]: INSERT DESCRIPTION HERE
$created [time]: INSERT DESCRIPTION HERE
$modified [time]: INSERT DESCRIPTION HERE
$cache [string]: INSERT DESCRIPTION HERE
$project [string]: INSERT DESCRIPTION HERE
Returns:
[CSERDreview]: new object (already committed) or null on failure

Definition at line 396 of file CSERDuser.php5.

References SDatabaseModel::commit().

CSERDuser::adduserDetail ( detail,
data = null 
)

Add new CSERDuserDetail object connected to this object.

This method creates a new CSERDuserDetail and makes sure that relevant foreign keys in that object point to this object and any other necessary objects as passed in as parameters to this method. For parameters that request another model object, you may either pass in the model object itself, or the id value for that object, as would be used in the foreign key of the new CSERDuserDetail object. For example, if the new object needs to point to both this object and, say, a user object, then you can either pass in a user object, or a user ID.

Parameters:
$detail [CSERDdetail]: Can also be foreign key value. INSERT DESCRIPTION HERE
$data [string]: INSERT DESCRIPTION HERE
Returns:
[CSERDuserDetail]: new object (already committed) or null on failure

Definition at line 484 of file CSERDuser.php5.

References SDatabaseModel::commit().

CSERDuser::adduserLoginLog ( loginTime = ''  ) 

Add new CSERDuserLoginLog object connected to this object.

This method creates a new CSERDuserLoginLog and makes sure that relevant foreign keys in that object point to this object and any other necessary objects as passed in as parameters to this method. For parameters that request another model object, you may either pass in the model object itself, or the id value for that object, as would be used in the foreign key of the new CSERDuserLoginLog object. For example, if the new object needs to point to both this object and, say, a user object, then you can either pass in a user object, or a user ID.

Parameters:
$loginTime [time]: INSERT DESCRIPTION HERE
Returns:
[CSERDuserLoginLog]: new object (already committed) or null on failure

Definition at line 235 of file CSERDuser.php5.

References SDatabaseModel::commit().

CSERDuser::adduserPageviewLog ( URL = null,
pageviewTime = '' 
)

Add new CSERDuserPageviewLog object connected to this object.

This method creates a new CSERDuserPageviewLog and makes sure that relevant foreign keys in that object point to this object and any other necessary objects as passed in as parameters to this method. For parameters that request another model object, you may either pass in the model object itself, or the id value for that object, as would be used in the foreign key of the new CSERDuserPageviewLog object. For example, if the new object needs to point to both this object and, say, a user object, then you can either pass in a user object, or a user ID.

Parameters:
$URL [string]: INSERT DESCRIPTION HERE
$pageviewTime [time]: INSERT DESCRIPTION HERE
Returns:
[CSERDuserPageviewLog]: new object (already committed) or null on failure

Definition at line 562 of file CSERDuser.php5.

References SDatabaseModel::commit().

CSERDuser::clearSessionData ( key = null  ) 

Clear session data for a given key, or all session data.

If a key is passed, clear session data that has previously been stored for that key using setSessionData(). If no key is passed, clear all session data stored for this user.

Parameters:
$key [string]: The name of session data to clear, or blank if all session data should be cleared.
Returns:
[mixed]: False if a key is specified but not found

Definition at line 625 of file CSERDuser.php5.

References SObject::setPrettyWarning().

static CSERDuser::exists ( constraints = array()  )  [static]

Checks to see if object exists according to constraints.

This is simply an alias for retrieve($constraints, true);

Parameters:
$constraints [array]: constraints used to check for existence of object
Returns:
[boolean]: whether object exists in DB

Definition at line 131 of file CSERDuser.php5.

static CSERDuser::getAttributesStatic (  )  [static]

Retrieves attributes and information about them.

This method is needed because there is no generic way to get at the $ATTRIBUTES static member variable without this kind of method. If you do not need to generically grab the attributes of a model class, just use ModelClass::$ATTRIBUTES or $obj->getAttributes().

Returns:
[array]: contents of static $ATTRIBUTES array

Definition at line 161 of file CSERDuser.php5.

static CSERDuser::getList ( constraints = array(),
limit = array(),
order = array(),
count = false 
) [static]

Retrieves list of CSERDuser objects.

See Guide to Database Constraints for more on how to construct constraint and other arrays for this method.

Parameters:
$constraints [array]: limit results by criteria
$limit [array]: limit results by count
$order [array]: change ordering of results
$count [boolean]: if true, return the number of objects that would have been returned, rather than the objects themselves
Returns:
[array of CSERDuser]: list of objects matching the criteria, if any, or null on error

Definition at line 148 of file CSERDuser.php5.

CSERDuser::getSessionData ( key  ) 

Fetch additional data stored in this user object (with a key).

Retrieve additional data stored in the user object using setSessionData().

Parameters:
$key [string]: The name of the stored session data (i.e., scope.attribute)
Returns:
[mixed]: The stored value, or null if there is no matching key

Definition at line 607 of file CSERDuser.php5.

References SObject::setPrettyWarning().

static CSERDuser::getTableNameStatic (  )  [static]

Retrieves name of table represented by this class.

Returns:
[string]: table name

Definition at line 170 of file CSERDuser.php5.

CSERDuser::issetSessionData ( key  ) 

Check to see if session data is set for a certain key.

Parameters:
$key [string]: A key to check for stored session data (i.e., scope.attribute)
Returns:
[bool]: True if there is data set at that key, false if not

Definition at line 644 of file CSERDuser.php5.

CSERDuser::listcomments ( constraints = array(),
limit = array(),
order = array(),
count = false 
)

Retrieves list of children CSERDcomment objects.

This method retrieves objects of type CSERDcomment which have their authorId field equal to the value of this object's userId field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
Returns:
[CSERDcomment]: array of child objects, or an integer if $count is true, or null on error

Definition at line 263 of file CSERDuser.php5.

CSERDuser::listcommentsMulti ( constraints = array(),
limit = array(),
order = array(),
count = false,
depth = 1 
)

Retrieves list of children CSERDcomment objects using joins.

This method retrieves objects of type CSERDcomment which have their authorId field equal to the value of this object's userId field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2. Unlike listcomments(), this method joins the child objects with their parent objects.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
$depth [int]: how deep to traverse dependencies when doing joins
Returns:
[CSERDcomment]: array of child objects, or an integer if $count is true, or null on error

Definition at line 287 of file CSERDuser.php5.

CSERDuser::listreviews ( constraints = array(),
limit = array(),
order = array(),
count = false 
)

Retrieves list of children CSERDreview objects.

This method retrieves objects of type CSERDreview which have their ownerId field equal to the value of this object's userId field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
Returns:
[CSERDreview]: array of child objects, or an integer if $count is true, or null on error

Definition at line 344 of file CSERDuser.php5.

CSERDuser::listreviewsMulti ( constraints = array(),
limit = array(),
order = array(),
count = false,
depth = 1 
)

Retrieves list of children CSERDreview objects using joins.

This method retrieves objects of type CSERDreview which have their ownerId field equal to the value of this object's userId field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2. Unlike listreviews(), this method joins the child objects with their parent objects.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
$depth [int]: how deep to traverse dependencies when doing joins
Returns:
[CSERDreview]: array of child objects, or an integer if $count is true, or null on error

Definition at line 368 of file CSERDuser.php5.

CSERDuser::listuserDetails ( constraints = array(),
limit = array(),
order = array(),
count = false 
)

Retrieves list of children CSERDuserDetail objects.

This method retrieves objects of type CSERDuserDetail which have their userId field equal to the value of this object's userId field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
Returns:
[CSERDuserDetail]: array of child objects, or an integer if $count is true, or null on error

Definition at line 439 of file CSERDuser.php5.

CSERDuser::listuserDetailsMulti ( constraints = array(),
limit = array(),
order = array(),
count = false,
depth = 1 
)

Retrieves list of children CSERDuserDetail objects using joins.

This method retrieves objects of type CSERDuserDetail which have their userId field equal to the value of this object's userId field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2. Unlike listuserDetails(), this method joins the child objects with their parent objects.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
$depth [int]: how deep to traverse dependencies when doing joins
Returns:
[CSERDuserDetail]: array of child objects, or an integer if $count is true, or null on error

Definition at line 463 of file CSERDuser.php5.

CSERDuser::listuserLoginLogs ( constraints = array(),
limit = array(),
order = array(),
count = false 
)

Retrieves list of children CSERDuserLoginLog objects.

This method retrieves objects of type CSERDuserLoginLog which have their userId field equal to the value of this object's userId field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
Returns:
[CSERDuserLoginLog]: array of child objects, or an integer if $count is true, or null on error

Definition at line 191 of file CSERDuser.php5.

CSERDuser::listuserLoginLogsMulti ( constraints = array(),
limit = array(),
order = array(),
count = false,
depth = 1 
)

Retrieves list of children CSERDuserLoginLog objects using joins.

This method retrieves objects of type CSERDuserLoginLog which have their userId field equal to the value of this object's userId field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2. Unlike listuserLoginLogs(), this method joins the child objects with their parent objects.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
$depth [int]: how deep to traverse dependencies when doing joins
Returns:
[CSERDuserLoginLog]: array of child objects, or an integer if $count is true, or null on error

Definition at line 215 of file CSERDuser.php5.

CSERDuser::listuserPageviewLogs ( constraints = array(),
limit = array(),
order = array(),
count = false 
)

Retrieves list of children CSERDuserPageviewLog objects.

This method retrieves objects of type CSERDuserPageviewLog which have their userId field equal to the value of this object's userId field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
Returns:
[CSERDuserPageviewLog]: array of child objects, or an integer if $count is true, or null on error

Definition at line 517 of file CSERDuser.php5.

CSERDuser::listuserPageviewLogsMulti ( constraints = array(),
limit = array(),
order = array(),
count = false,
depth = 1 
)

Retrieves list of children CSERDuserPageviewLog objects using joins.

This method retrieves objects of type CSERDuserPageviewLog which have their userId field equal to the value of this object's userId field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2. Unlike listuserPageviewLogs(), this method joins the child objects with their parent objects.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
$depth [int]: how deep to traverse dependencies when doing joins
Returns:
[CSERDuserPageviewLog]: array of child objects, or an integer if $count is true, or null on error

Definition at line 541 of file CSERDuser.php5.

static CSERDuser::retrieve ( constraints = array(),
checkOnly = false 
) [static]

Retrieves a single object of this type, given the constraints.

Use this method instead of the constructor since the constructor cannot return error conditions properly.

Parameters:
$constraints [array]: constraints to use when retrieving object
$checkOnly [boolean]: if true, just return whether the row exists in the DB
Returns:
[CSERDuser]: retrieved object, or null on error or object does not exist (or true/false if $checkOnly is true, to indicate whether the row exists in the DB)

Definition at line 113 of file CSERDuser.php5.

Referenced by CSERDreview::getParentAuthor(), CSERDcomment::getParentAuthor(), CSERDreview::getParentOwner(), CSERDcomment::getParentOwner(), CSERDuserPageviewLog::getParentUser(), CSERDuserLoginLog::getParentUser(), and CSERDuserDetail::getParentUser().


The documentation for this class was generated from the following file:

Generated on Wed Nov 24 02:05:49 2010 for Common by  doxygen 1.5.6