Hoa central
Public Member Functions | Public Attributes | List of all members
Hoa\Stream\IStream\Lockable Interface Reference
Inheritance diagram for Hoa\Stream\IStream\Lockable:

Public Member Functions

 lock ($operation)
 

Public Attributes

const LOCK_SHARED = LOCK_SH
 
const LOCK_EXCLUSIVE = LOCK_EX
 
const LOCK_RELEASE = LOCK_UN
 
const LOCK_NO_BLOCK = LOCK_NB
 

Detailed Description

Interface .

Interface for lockable input/output.

Definition at line 47 of file Lockable.php.

Member Function Documentation

Hoa\Stream\IStream\Lockable::lock (   $operation)

Portable advisory locking. Should take a look at stream_supports_lock().

Parameters
int$operationOperation, use the self::LOCK_* constants.
Returns
bool

Implemented in Hoa\File\File, and Hoa\Stringbuffer\Stringbuffer.

Member Data Documentation

const Hoa\Stream\IStream\Lockable::LOCK_EXCLUSIVE = LOCK_EX

Acquire an exclusive lock (writer).

int

Definition at line 61 of file Lockable.php.

const Hoa\Stream\IStream\Lockable::LOCK_NO_BLOCK = LOCK_NB

If we do not want $this->lock() to block while locking.

int

Definition at line 75 of file Lockable.php.

const Hoa\Stream\IStream\Lockable::LOCK_RELEASE = LOCK_UN

Release a lock (shared or exclusive).

int

Definition at line 68 of file Lockable.php.

const Hoa\Stream\IStream\Lockable::LOCK_SHARED = LOCK_SH

Acquire a shared lock (reader).

int

Definition at line 54 of file Lockable.php.


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