Stud.IP  2.1 Revision 48548
 All Data Structures Namespaces Files Functions Variables Pages
LockRule Class Reference
Inheritance diagram for LockRule:
Inheritance graph
Collaboration diagram for LockRule:
Collaboration graph

Public Member Functions

 __construct ($id=null)
 setData ($data, $reset)
 store ()
 delete ()
 getUsage ()
- Public Member Functions inherited from SimpleORMap
 setId ($id)
 getId ()
 getNewId ()
 getData ()
 toArray ()
 getValue ($field)
 setValue ($field, $value)
 __get ($field)
 __set ($field, $value)
 __isset ($field)
 offsetExists ($offset)
 offsetGet ($offset)
 offsetSet ($offset, $value)
 offsetUnset ($offset)
 getIterator ()
 count ()
 isField ($field)
 haveData ()
 isNew ()
 setNew ($is_new)
 getWhereQuery ()
 restore ()
 triggerChdate ()

Static Public Member Functions

static find ($id)
static findBySql ($where)
static findBySeminar ($seminar_id)
static findByInstitute ($institute_id)
static findByUser ($user_id)
static findAllByType ($type)
static deleteBySql ($where)
- Static Public Member Functions inherited from SimpleORMap
static expireTableScheme ()
static find ($class, $id)
static findBySQL ($class, $where)
static deleteBySQL ($class, $where)

Additional Inherited Members

- Protected Member Functions inherited from SimpleORMap
 getTableScheme ()
- Static Protected Member Functions inherited from SimpleORMap
static TableScheme ($db_table)
- Protected Attributes inherited from SimpleORMap
 $content = array()
 $is_new = true
 $db_table = ''
 $db_fields = null
 $pk = null
- Static Protected Attributes inherited from SimpleORMap
static $schemes

Detailed Description

this class represents one record of the lock_rules table the column attributes is converted to an ArrayObject and vice-versa, to allow array-like access

e.g.

$lockrule['attributes']['name'] = 1;
$lockrule->store();

Constructor & Destructor Documentation

__construct (   $id = null)

Constructor

Parameters
string$idprimary key of table lock_rules

Reimplemented from SimpleORMap.

Here is the call graph for this function:

Member Function Documentation

delete ( )

delete entry from database the object is cleared and turned to new state

Returns
boolean

Reimplemented from SimpleORMap.

Here is the call graph for this function:

static deleteBySql (   $where)
static
static find (   $id)
static

Here is the caller graph for this function:

static findAllByType (   $type)
static

returns all exisiting lockrules for a given entity type

Parameters
string$typeentity type, one of [sem,inst,user]
Returns
array of LockRule objects

Here is the call graph for this function:

Here is the caller graph for this function:

static findByInstitute (   $institute_id)
static

returns the lockrule for an institute

Parameters
string$institute_idid of an institute
Returns
LockRule

Here is the call graph for this function:

static findBySeminar (   $seminar_id)
static

returns the lockrule for a course

Parameters
string$seminar_idid of a course
Returns
LockRule

Here is the call graph for this function:

static findBySql (   $where)
static
static findByUser (   $user_id)
static

returns the lockrule for a user

Parameters
string$user_idid of a user
Returns
LockRule

Here is the call graph for this function:

getUsage ( )

returns the number of uses for this lockrule

Returns
integer

Here is the call graph for this function:

setData (   $data,
  $reset 
)

set multiple column values if second param is set, existing data in object will be discarded, else new data overrides old data

Parameters
array$dataassoc array
boolean$reset
Returns
number of columns changed

Reimplemented from SimpleORMap.

store ( )

store entry in database if data is actually changed triggerChdate() is called

Returns
number|boolean

Reimplemented from SimpleORMap.


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