AJAX_Locking
[ class tree: AJAX_Locking ] [ index: AJAX_Locking ] [ all elements ]

Class: AJAX_Locking_Driver_MDB2

Source Location: /Driver/MDB2.php

Class Overview

AJAX_Locking_Driver
   |
   --AJAX_Locking_Driver_MDB2

A driver that use MDB2 as data store


Variables

Methods


Inherited Variables

Inherited Methods

Class: AJAX_Locking_Driver

AJAX_Locking_Driver::AJAX_Locking_Driver()
Constructor
AJAX_Locking_Driver::delete()
Administrately delete lock
AJAX_Locking_Driver::getLocks()
Returns the list of all active locks for administration purpose
AJAX_Locking_Driver::lock()
Locks an object
AJAX_Locking_Driver::status()
Returns the status of the object (lock or unlocked)
AJAX_Locking_Driver::unlock()
Unlocks an object

Class Details

[line 8]
A driver that use MDB2 as data store



[ Top ]


Class Variables

$mdb2 =

[line 15]

Instance of a MDB2 connection



Tags:

var:  connection

Type:   MBD2


[ Top ]

$names = array(
      'table' => 'ajax_locks',
      'columns' => array(
          'type' => 'type',
          'id' => 'id',
          'user' => '[user]',
          'time' => '[time]'
      ))

[line 22]

Default table and columns names


Type:   array


[ Top ]



Class Methods


constructor AJAX_Locking_Driver_MDB2 [line 40]

AJAX_Locking_Driver AJAX_Locking_Driver_MDB2( [mixed $dsn = false], [array $names = false], [int $timeout = false])

Constructor



Parameters:

mixed   $dsn   DSN for MDB2 connection
array   $names   names of table and its columns where store data
int   $timeout   session timeout

[ Top ]

method delete [line 234]

true delete( string $type, mixed $id, mixed $id )

Administrately delete lock



Tags:

return:  if the lock is deleted successfully, false otherwise


Overrides AJAX_Locking_Driver::delete() (Administrately delete lock)

Parameters:

string   $type  
mixed   $id   

[ Top ]

method getLocks [line 202]

array getLocks( )

Returns the list of all active locks for administration purpose



Tags:

return:  of locks (owner, type, id), false if not implemented


Overrides AJAX_Locking_Driver::getLocks() (Returns the list of all active locks for administration purpose)

[ Top ]

method lock [line 64]

boolean lock( mixed $user, string $type, mixed $id)

Locks an object



Tags:

return:  true if the unlock was successfull, false otherwise


Overrides AJAX_Locking_Driver::lock() (Locks an object)

Parameters:

mixed   $user   id of the user who wants to lock
string   $type   type/classname of the object
mixed   $id   id of the object

[ Top ]

method status [line 152]

string status( mixed $user, string $type, mixed $id)

Returns the status of the object (lock or unlocked)



Tags:

return:  the status and the owner of the object


Overrides AJAX_Locking_Driver::status() (Returns the status of the object (lock or unlocked))

Parameters:

mixed   $user   id of the user who wants to know the object's status
string   $type   type/classname of the object
mixed   $id   id of the object

[ Top ]

method unlock [line 112]

boolean unlock( mixed $user, string $type, mixed $id)

Unlocks an object



Tags:

return:  true if the unlock was successfull, false otherwise


Overrides AJAX_Locking_Driver::unlock() (Unlocks an object)

Parameters:

mixed   $user   id of the user who wants to unlock
string   $type   type/classname of the object
mixed   $id   id of the object

[ Top ]


Documentation generated on Tue, 13 Feb 2007 21:42:45 +0100 by phpDocumentor 1.3.0RC3