Moodle  2.2.1
http://www.collinsharper.com
lesson_base Class Reference
Inheritance diagram for lesson_base:

Public Member Functions

 __construct ($properties)
 __set ($key, $value)
 __get ($key)
 __isset ($key)
 properties ()

Static Public Member Functions

static create ()
static load ()

Protected Attributes

 $properties

Detailed Description

Abstract class to provide a core functions to the all lesson classes

This class should be abstracted by ALL classes with the lesson module to ensure that all classes within this module can be interacted with in the same way.

This class provides the user with a basic properties array that can be fetched or set via magic methods, or alternatively by defining methods get_blah() or set_blah() within the extending object.

Definition at line 1560 of file locallib.php.


Constructor & Destructor Documentation

__construct ( properties)

The constructor

Parameters:
stdClass$properties

Definition at line 1572 of file locallib.php.

Here is the call graph for this function:


Member Function Documentation

__get ( key)

Magic get method

Attempts to call a get_$key method to return the property and ralls over to return the raw property

Parameters:
str$key
Returns:
mixed

Definition at line 1601 of file locallib.php.

__isset ( key)

Stupid PHP needs an isset magic method if you use the get magic method and still want empty calls to work.... blah ~!

Parameters:
string$key
Returns:
bool

Definition at line 1615 of file locallib.php.

__set ( key,
value 
)

Magic property method

Attempts to call a set_$key method if one exists otherwise falls back to simply set the property

Parameters:
string$key
mixed$value

Definition at line 1585 of file locallib.php.

Here is the call graph for this function:

static create ( ) [static]

If overridden should create a new instance, save it in the DB and return it

Definition at line 1626 of file locallib.php.

static load ( ) [static]

If overridden should load an instance from the DB and return it

Definition at line 1630 of file locallib.php.

Here is the caller graph for this function:

Fetches all of the properties of the object

Returns:
stdClass

Reimplemented in lesson_page.

Definition at line 1635 of file locallib.php.

Here is the caller graph for this function:


Field Documentation

$properties [protected]

Definition at line 1566 of file locallib.php.


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