# The TokyoTyrantIterator class

(PECL tokyo_tyrant >= 0.2.0)

## Introduction

Provides an iterator for TokyoTyrant and TokyoTyrantTable objects. The iterator iterates over all keys and values in the database. TokyoTyrantIterator was added in version 0.2.0.

## Class synopsis

TokyoTyrantIterator implements Iterator {
/* Methods */
public __construct ( mixed `$object` )
public current ( ) : mixed
public key ( ) : mixed
public next ( ) : mixed
public rewind ( ) : void
public valid ( ) : bool
/* Inherited methods */
public TokyoTyrant::add ( string `$key` , int|float `$increment` [, int `$type` = 0 ] ) : int|float
public TokyoTyrant::connect ( string `$host` [, int `$port` = TokyoTyrant::RDBDEF_PORT [, array `$options` ]] ) : TokyoTyrant
public TokyoTyrant::connectUri ( string `$uri` ) : TokyoTyrant
public TokyoTyrant::__construct ([ string `$host` [, int `$port` = TokyoTyrant::RDBDEF_PORT [, array `$options` ]]] )
public TokyoTyrant::copy ( string `$path` ) : TokyoTyrant
public TokyoTyrant::ext ( string `$name` , int `$options` , string `$key` , string `$value` ) : string
public TokyoTyrant::fwmKeys ( string `$prefix` , int `$max_recs` ) : array
public TokyoTyrant::get ( mixed `$keys` ) : mixed
public TokyoTyrant::getIterator ( ) : TokyoTyrantIterator
public TokyoTyrant::num ( ) : int
public TokyoTyrant::out ( mixed `$keys` ) : TokyoTyrant
public TokyoTyrant::put ( mixed `$keys` [, string `$value` = NULL ] ) : TokyoTyrant
public TokyoTyrant::putCat ( mixed `$keys` [, string `$value` ] ) : TokyoTyrant
public TokyoTyrant::putKeep ( mixed `$keys` [, string `$value` ] ) : TokyoTyrant
public TokyoTyrant::putNr ( mixed `$keys` [, string `$value` = NULL ] ) : TokyoTyrant
public TokyoTyrant::putShl ( string `$key` , string `$value` , int `$width` ) : mixed
public TokyoTyrant::restore ( string `$log_dir` , int `$timestamp` [, bool `$check_consistency` = `TRUE` ] ) : mixed
public TokyoTyrant::setMaster ( string `$host` , int `$port` , int `$timestamp` [, bool `$check_consistency` = `TRUE` ] ) : mixed
public TokyoTyrant::size ( string `$key` ) : int
public TokyoTyrant::stat ( ) : array
public TokyoTyrant::sync ( ) : mixed
public TokyoTyrant::tune ( float `$timeout` [, int `$options` = TokyoTyrant::RDBT_RECON ] ) : TokyoTyrant
public TokyoTyrant::vanish ( ) : mixed
}

## Table of Contents

- TokyoTyrantIterator::__construct — Construct an iterator
- TokyoTyrantIterator::current — Get the current value
- TokyoTyrantIterator::key — Returns the current key
- TokyoTyrantIterator::next — Move to next key
- TokyoTyrantIterator::rewind — Rewinds the iterator
- TokyoTyrantIterator::valid — Rewinds the iterator