phpDocumentor KuoteObjects
User
[ class tree: KuoteObjects ] [ index: KuoteObjects ] [ all elements ]

Class: KuoteObjects_User

Source Location: /classes/KuoteObjects/User.php

Class KuoteObjects_User

Class Overview

Implements interfaces:

KuoteObjects User

The KuoteObjects User represents a student or instructor in the Kuote system. It must implement the interfaces KuoteInterfaces_Object, and KuoteInterfaces_Enrollment

Located in /classes/KuoteObjects/User.php [line 19]



		
				Author(s):
		
  • Kyle Hall
Information Tags:
Copyright:  2006

Properties

Methods

[ Top ]
Property Summary
mixed   $user   Private variable to contain a DB_DataObjects object derived from MySQL or another DB.

[ Top ]
Method Summary
KuoteObjects_User   __construct()   Constructor instantiates $enrollment as a DataObjects_Enrollment object.
boolean   delete()   Removes the object from the datastore based on it's Id
boolean   get()   Loads the object from the data store by its unique identifier.
string   getEmail()   Returns the email of the user.
integer   getId()   Returns the unique id of the object
string   getLogin()   Returns the login name of the user.
string   getNameFirst()   Returns the first name of the user.
string   getNameLast()   Returns the last name of the user.
string   getNameLastFirst()   Returns a string of the format "Lastname, Firstname".
string   getPassword()   Returns the hashed password of the user.
string   getType()   Returns the type of the user.
boolean   insert()   Takes the currently set properties of the object and inserts them into the data store as a new instance with its own unique id.
boolean   setEmail()   Sets the email of the user.
boolean   setLogin()   Sets the login name of the user.
boolean   setNameFirst()   Sets the first name of the user.
boolean   setNameLast()   Sets the last name of the user.
boolean   setPassword()   Sets the password of the user.
boolean   setType()   Sets the type of the user.
boolean   update()   Updates the datastore to reflect the currently set properties of the object.
void   verify()   Tests whether the given userlogin and password match those in the datastore.

[ Top ]
Properties
mixed   $user [line 24]

Private variable to contain a DB_DataObjects object derived from MySQL or another DB.

API Tags:
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 30]

  KuoteObjects_User __construct( )

Constructor instantiates $enrollment as a DataObjects_Enrollment object.


API Tags:
Access:  public

Information Tags:
Link:  http://pear.php.net/package/DB_DataObject/

[ Top ]
delete  [line 69]

  boolean delete( )

Removes the object from the datastore based on it's Id


API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
get  [line 40]

  boolean get( $userId, integer $id  )

Loads the object from the data store by its unique identifier.

Parameters:
integer   $id:  Unique identifier of a course in the data store.
   $userId: 

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
getEmail  [line 153]

  string getEmail( )

Returns the email of the user.


API Tags:
Return:  Email
Access:  public


[ Top ]
getId  [line 78]

  integer getId( )

Returns the unique id of the object


API Tags:
Return:  The objects's unique id
Access:  public


[ Top ]
getLogin  [line 188]

  string getLogin( )

Returns the login name of the user.


API Tags:
Return:  Password Hash
Access:  public


[ Top ]
getNameFirst  [line 119]

  string getNameFirst( )

Returns the first name of the user.


API Tags:
Return:  First Name
Access:  public


[ Top ]
getNameLast  [line 136]

  string getNameLast( )

Returns the last name of the user.


API Tags:
Return:  Last Name
Access:  public


[ Top ]
getNameLastFirst  [line 111]

  string getNameLastFirst( )

Returns a string of the format "Lastname, Firstname".


API Tags:
Return:  String of format "Lastname, Firstname".
Access:  public


[ Top ]
getPassword  [line 170]

  string getPassword( )

Returns the hashed password of the user.


API Tags:
Return:  Password Hash
Access:  public


[ Top ]
getType  [line 206]

  string getType( )

Returns the type of the user.

Type may be either 'student' or 'instructor'


API Tags:
Return:  User Type
Access:  public


[ Top ]
insert  [line 50]

  boolean insert( )

Takes the currently set properties of the object and inserts them into the data store as a new instance with its own unique id.


API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
setEmail  [line 162]

  boolean setEmail( string $email  )

Sets the email of the user.

Parameters:
string   $email:  Email

API Tags:
Return:  True on successful set, False otherwise.
Access:  public


[ Top ]
setLogin  [line 197]

  boolean setLogin( string $login  )

Sets the login name of the user.

Parameters:
string   $login:  User Login

API Tags:
Return:  True on successful set, False otherwise.
Access:  public


[ Top ]
setNameFirst  [line 128]

  boolean setNameFirst( string $firstname  )

Sets the first name of the user.

Parameters:
string   $firstname:  First Name

API Tags:
Return:  True on successful set, False otherwise.
Access:  public


[ Top ]
setNameLast  [line 145]

  boolean setNameLast( string $lastname  )

Sets the last name of the user.

Parameters:
string   $lastname:  Last Name

API Tags:
Return:  True on successful set, False otherwise.
Access:  public


[ Top ]
setPassword  [line 180]

  boolean setPassword( string $password  )

Sets the password of the user.

Pass the password in plaintext, the method will hash it.

Parameters:
string   $password:  Plaintext Password

API Tags:
Return:  True on successful set, False otherwise.
Access:  public


[ Top ]
setType  [line 216]

  boolean setType( string $type  )

Sets the type of the user.

Type must be either 'student' or 'instructor'

Parameters:
string   $type:  User Type

API Tags:
Return:  True on successful set, False otherwise.
Access:  public


[ Top ]
update  [line 60]

  boolean update( )

Updates the datastore to reflect the currently set properties of the object.

Updates by the current Id.


API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
verify  [line 89]

  void verify( string $userLogin, string $userPassword  )

Tests whether the given userlogin and password match those in the datastore.

If a match is found, the user for the given username is loaded into the User object.

Parameters:
string   $userLogin:  The user's login name
string   $userPassword:  The password submitted for authentication.

API Tags:
Access:  public


[ Top ]

Documentation generated on Fri, 15 Dec 2006 11:18:47 -0500 by phpDocumentor 1.3.0