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

Class: AJAX_Locking_Driver

Source Location: /Driver/Driver.php

Class Overview


This class implements a base class for AJAX_Locking drivers.


Variables

Methods


Child classes:

AJAX_Locking_Driver_File
A driver that use plain filesystem as data store
AJAX_Locking_Driver_MDB2
A driver that use MDB2 as data store
AJAX_Locking_Driver_SharedMemory
A driver that use System_SharedMemory as data store

Class Details

[line 13]
This class implements a base class for AJAX_Locking drivers.



[ Top ]


Class Variables

$timeout =  3600

[line 15]


Type:   mixed


[ Top ]



Class Methods


constructor AJAX_Locking_Driver [line 22]

AJAX_Locking_Driver AJAX_Locking_Driver( [mixed $timeout = 3600])

Constructor



[ Top ]

method delete [line 85]

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

Administrately delete lock



Tags:

return:  if the lock is deleted successfully, false otherwise


Overridden in child classes as:

AJAX_Locking_Driver_File::delete()
Administrately delete lock
AJAX_Locking_Driver_MDB2::delete()
Administrately delete lock

Parameters:

string   $type  
mixed   $id   

[ Top ]

method getLocks [line 72]

array getLocks( )

Returns the list of all active locks for administration purpose



Tags:

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


Overridden in child classes as:

AJAX_Locking_Driver_File::getLocks()
Returns the list of all active locks for administration purpose
AJAX_Locking_Driver_MDB2::getLocks()
Returns the list of all active locks for administration purpose

[ Top ]

method lock [line 36]

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

Locks an object



Tags:

return:  true if the lock was successfull or the user is the owner false otherwise


Overridden in child classes as:

AJAX_Locking_Driver_File::lock()
Locks an object
AJAX_Locking_Driver_MDB2::lock()
Locks an object
AJAX_Locking_Driver_SharedMemory::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 62]

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


Overridden in child classes as:

AJAX_Locking_Driver_File::status()
Returns the status of the object (lock or unlocked)
AJAX_Locking_Driver_MDB2::status()
Returns the status of the object (lock or unlocked)
AJAX_Locking_Driver_SharedMemory::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 49]

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

Unlocks an object



Tags:

return:  true if the unlock was successfull, false otherwise


Overridden in child classes as:

AJAX_Locking_Driver_File::unlock()
Unlocks an object
AJAX_Locking_Driver_MDB2::unlock()
Unlocks an object
AJAX_Locking_Driver_SharedMemory::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:44 +0100 by phpDocumentor 1.3.0RC3