©
This document uses PHP Chinese website manual Release
(PECL tokyo_tyrant >= 0.1.0)
TokyoTyrant::putCat — Concatenates to a record
$keys
[, string $value
] )
Appends a value into existing key or multiple values if keys
is an array.
The second parameter is mandatory if keys
is a string. If the record does
not exist a new record is created.
keys
A string key or an array of key-value pairs
value
The value in case a string key is used
This method returns a reference to the current object and throws TokyoTyrantException on failure.
Example #1 TokyoTyrant::putCat() example
<?php
$tt = new TokyoTyrant ( "localhost" );
$tt -> put ( "key" , "value" );
$tt -> putCat ( "key" , " has more data" );
echo $tt -> get ( "key" );
?>
以上例程会输出:
value has more data