downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

TokyoTyrant::getIterator> <TokyoTyrant::fwmKeys
[edit] Last updated: Fri, 17 May 2013

view this page in

TokyoTyrant::get

(PECL tokyo_tyrant >= 0.1.0)

TokyoTyrant::getThe get purpose

Beschreibung

public mixed TokyoTyrant::get ( mixed $keys )

This method is used to return a value or multiple values. This method accepts a string or an array as a value.

Parameter-Liste

keys

A string key or an array of string keys

Rückgabewerte

Returns a string or an array based on the given parameters. Throws a TokyoTyrantException on error. If string is passed null is returned if the key is not found. In case an array is given as an parameter only existing keys will be returned. It is not an error to pass a key that does not exist.

Beispiele

Beispiel #1 TokyoTyrant::get() example

<?php
$tt 
= new TokyoTyrant("localhost"1978);
$tt->put("key1""value1");
$tt->put("key2""value2");
var_dump($tt->get(array("key1""key2")));
var_dump($tt->get("key1"));
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

array(2) {
  ["key1"]=>
  string(6) "value1"
  ["key2"]=>
  string(6) "value2"
}
string(6) "value1"

Siehe auch



add a note add a note User Contributed Notes TokyoTyrant::get - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites