Documentation

Lockable extends Stream

Interface \Hoa\Stream\IStream\Lockable.

Interface for lockable input/output.

Tags
copyright

Copyright © 2007-2017 Hoa community

license

New BSD License

Table of Contents

Constants

LOCK_EXCLUSIVE  = LOCK_EX
Acquire an exclusive lock (writer).
LOCK_NO_BLOCK  = LOCK_NB
If we do not want $this->lock() to block while locking.
LOCK_RELEASE  = LOCK_UN
Release a lock (shared or exclusive).
LOCK_SHARED  = LOCK_SH
Acquire a shared lock (reader).

Methods

getStream()  : resource
Get the current stream.
lock()  : bool
Portable advisory locking.

Constants

LOCK_EXCLUSIVE

Acquire an exclusive lock (writer).

public mixed LOCK_EXCLUSIVE = LOCK_EX
Tags
const

int

LOCK_NO_BLOCK

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

public mixed LOCK_NO_BLOCK = LOCK_NB
Tags
const

int

LOCK_RELEASE

Release a lock (shared or exclusive).

public mixed LOCK_RELEASE = LOCK_UN
Tags
const

int

LOCK_SHARED

Acquire a shared lock (reader).

public mixed LOCK_SHARED = LOCK_SH
Tags
const

int

Methods

getStream()

Get the current stream.

public getStream() : resource
Return values
resource

lock()

Portable advisory locking.

public lock(int $operation) : bool

Should take a look at stream_supports_lock().

Parameters
$operation : int

Operation, use the self::LOCK_* constants.

Return values
bool

        
On this page

Search results