TokyoTyrant::put
TokyoTyrant::putKeep
TokyoTyrant
PHP Manual

# TokyoTyrant::putCat

(PECL tokyo_tyrant >= Unknown)

TokyoTyrant::putCat — Concatenates to a record

### Opis

public TokyoTyrant TokyoTyrant::putCat ( mixed `$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.

### Parametry

`keys`

  A string key or an array of key-value pairs

`value`

  The value in case a string key is used

### Zwracane wartości

This method returns a reference to the current object and throws TokyoTyrantException on failure.

### Przykłady

Przykład #1 TokyoTyrant::putCat example

`<?php
/* Connect to a database on default port */
$tt = new TokyoTyrant("localhost");
/* Create a new key */
$tt->put("key", "value");
/* Concatenate single key-value pair */
$tt->putCat("key", " has more data");
/* Echo the key */
echo $tt->get("key");
?>`

Powyższy przykład wyświetli:

    value has more data

### Zobacz też:

- TokyoTyrant::put - Puts values
- TokyoTyrant::putKeep - Puts a record

TokyoTyrant::put
TokyoTyrant::putKeep
TokyoTyrant
PHP Manual