Lockable
extends
Stream
in
Interface \Hoa\Stream\IStream\Lockable.
Interface for lockable input/output.
Tags
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
LOCK_NO_BLOCK
If we do not want $this->lock() to block while locking.
public
mixed
LOCK_NO_BLOCK
= LOCK_NB
Tags
LOCK_RELEASE
Release a lock (shared or exclusive).
public
mixed
LOCK_RELEASE
= LOCK_UN
Tags
LOCK_SHARED
Acquire a shared lock (reader).
public
mixed
LOCK_SHARED
= LOCK_SH
Tags
Methods
getStream()
Get the current stream.
public
getStream() : resource
Return values
resourcelock()
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.