K2hdkc::keyQueueGet
Gets a pair of the key/value from the queue
Description
public function keyQueueGet(
string $prefix,
bool $is_fifo = true,
string $password = null): array|false {}
Gets a pair of the key/value from the queue.
Parameters
- prefix
Specify the prefix of queue name - is_fifo
Specifytrue
if the order of the queue is FIFO(First-In-First-Out), otherwisefalse
. - password
Specify the passphrase for encrypting the value.
Return Values
Returns an array on success or null
on failure.
Examples
- Example 1 - Gets a key/value from the queue
$ php -r '
$k2hdkc = new K2hdkc("./tests/slave.ini");
$k2hdkc->keyQueuePut("test", "key", "value");
var_dump($k2hdkc->keyQueueGet("test"));
'
The above example will output:
array(1) {
["key"]=>
string(5) "value"
}
See Also
- K2hdkc::keyQueuePut - Puts a key/value on the queue