WICOM
 All Data Structures Namespaces Files Functions Variables Pages
Public Member Functions | Protected Attributes
User Class Reference

Public Member Functions

 __construct ($name, $pass=null)
 
 check_password ($pass)
 
 get_model ($name)
 
Getters
 get_name ()
 
 get_model_list ()
 

Protected Attributes

 $name = null
 
 $pass = null
 
 $model_list = []
 

Database related

 save ()
 
 retrieve_model_list ()
 
static retrieve ($name)
 

Detailed Description

User Representation

Constructor & Destructor Documentation

__construct (   $name,
  $pass = null 
)

Member Function Documentation

check_password (   $pass)

Is the given password the same as the user's one?

Parameters
$passa String
Returns
true or false.
get_model (   $name)

Retrieve the user's model by its name.

Returns
A Model instance. null if it doesn't exists.
get_model_list ( )

Retrieve all model list from the DB.

Returns
Array of strings.
get_name ( )
static retrieve (   $name)
static

Search for the given user on the DB.

Parameters
$nameThe user's name to search.
Returns
a User instance if exists, null otherwise.
retrieve_model_list ( )
protected

Search on the model table of the DB for the user's tables.

Returns
An array of strings with the model's names. false if there was problems.
save ( )

Save or update the DB information regarded to this instance.

Returns
true if saving or update was successful.

Field Documentation

$model_list = []
protected

A string list of model names that the user owns.

$name = null
protected
$pass = null
protected

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