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

Public Member Functions

 __construct ($name, $owner)
 
 set_json ($json)
 
Getters
 get_name ()
 
 get_owner ()
 
 get_json ()
 

Protected Attributes

 $name = null
 
 $owner = null
 
 $json = null
 

Database related

 save ()
 
 update ()
 
static retrieve ($name, $owner_name)
 

Detailed Description

A user Model.

Todo:
For now a UML model, however it should have subclass for each type of graphical language.

Constructor & Destructor Documentation

__construct (   $name,
  $owner 
)
Parameters
$ownera User instance.
$namea String instance

Member Function Documentation

get_json ( )
get_name ( )
get_owner ( )
static retrieve (   $name,
  $owner_name 
)
static

Retrieve from the database the Model given by the name and its owner.

Parameters
$namea String.
$owner_namea String.
Returns
a Model instance or null if it doesn't exists.
save ( )

Save into the DB.

set_json (   $json)
update ( )

Update the json from the DB.

Field Documentation

$json = null
protected

JSON that represent the model for the user interface.

$name = null
protected

Name of the model.

$owner = null
protected

Owner of the model. A User instance.


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