Public Member Functions | Private Attributes
c_comdef_users Class Reference

A class to hold a collection of c_comdef_users objects. More...

List of all members.

Public Member Functions

 __construct ($in_parent_object, $in_user_object_array)
 SetParentObj ($in_parent_obj)
 Set the parent object of this instance.
 GetParentObj ()
 Return a reference to the parent object of this instance.
GetUsersArray ()
 Accessor -Get the user object array.
GetUserByID ($in_user_id)
 Accessor -Get the user object for one user, given an ID.
GetEncryptedPW ($in_login, $in_password)
 Given a login and password, looks up the user, and returns an encrypted password for that user.
GetUserByLoginCredentials ($in_login, $in_password)
 Given a login and password, looks up the user, and returns a reference to that user object.
GetServerAdminObj ()
 Accessor -Get the user object for the Server Admin (User ID 1).
 AddUser (&$in_user)
 Add a user object to the end of the array.

Private Attributes

 $_local_id_parent_obj = null
 This is the parent (container) object that holds this instance.
 $_local_copy_of_array = null

Detailed Description

A class to hold a collection of c_comdef_users objects.


Constructor & Destructor Documentation

c_comdef_users::__construct ( in_parent_object,
in_user_object_array 
)
Parameters:
in_parent_objectA reference to the object that "owns" this instance.
in_user_object_arrayAn array of references to c_comdef_user objects, to be stored as local references.

Member Function Documentation

c_comdef_users::AddUser ( &$  in_user)

Add a user object to the end of the array.

Parameters:
in_userA reference to the user to be added.
& c_comdef_users::GetEncryptedPW ( in_login,
in_password 
)

Given a login and password, looks up the user, and returns an encrypted password for that user.

Returns:
a string, with the encrypted password. Null if none.
Parameters:
in_loginA string. The login ID.
in_passwordA string. the UNENCRYPTED password for the user.
c_comdef_users::GetParentObj ( )

Return a reference to the parent object of this instance.

Returns:
a reference to the parent instance of the object.

Implements i_comdef_has_parent.

& c_comdef_users::GetServerAdminObj ( )

Accessor -Get the user object for the Server Admin (User ID 1).

Returns:
a reference to a c_comdef_user object for the server admin.
& c_comdef_users::GetUserByID ( in_user_id)

Accessor -Get the user object for one user, given an ID.

Returns:
a reference to a c_comdef_user object. Null if none.
Parameters:
in_user_idAn integer -The ID of the user.
& c_comdef_users::GetUserByLoginCredentials ( in_login,
in_password 
)

Given a login and password, looks up the user, and returns a reference to that user object.

Returns:
a reference to a c_comdef_user object. Null if none.
Parameters:
in_loginA string. The login ID.
in_passwordA string. the ENCRYPTED password for the user.
& c_comdef_users::GetUsersArray ( )

Accessor -Get the user object array.

Returns:
a reference to an array of c_comdef_user objects.
c_comdef_users::SetParentObj ( in_parent_obj)

Set the parent object of this instance.

Parameters:
in_parent_objA reference to the parent object.

Implements i_comdef_has_parent.


Member Data Documentation

c_comdef_users::$_local_copy_of_array = null [private]

We keep a local copy of the simple array, because we can instantly access it, as opposed to having to instantiate iterators.

c_comdef_users::$_local_id_parent_obj = null [private]

This is the parent (container) object that holds this instance.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations