VuFind API Documentation

NamedList
in package
implements Countable, Iterator

SOLR NamedList with parameter json.nl=arrarr.

A NamedList arrarr represent a NamedList as an array of two element arrays [[name1,val1], [name2, val2], [name3,val3]].

Tags
category

VuFind

author

David Maus maus@hab.de

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link
https://vufind.org
see
http://wiki.apache.org/solr/SolJSON

Interfaces, Classes, Traits and Enums

Countable
Iterator

Table of Contents

$current  : array<string|int, mixed>
The current position
$list  : array<string|int, mixed>
The named list.
__construct()  : void
Constructor.
count()  : int
Return count of elements.
current()  : mixed
Return current element value.
key()  : string
Return current element name.
next()  : void
Move to next element.
removeKey()  : void
Remove single element from list.
removeKeys()  : void
Remove elements from list.
rewind()  : void
Rewind iterator.
toArray()  : array<string|int, mixed>
Convert the named list into a standard associative array.
valid()  : bool
Return true if the iterator is at a valid position.

Properties

$current

The current position

protected array<string|int, mixed> $current = null

$list

The named list.

protected array<string|int, mixed> $list

Methods

__construct()

Constructor.

public __construct(array<string|int, mixed> $list) : void
Parameters
$list : array<string|int, mixed>

Named list

Return values
void

count()

Return count of elements.

public count() : int
Return values
int

current()

Return current element value.

public current() : mixed
Return values
mixed

key()

Return current element name.

public key() : string
Return values
string

next()

Move to next element.

public next() : void
Return values
void

removeKey()

Remove single element from list.

public removeKey(string $key) : void
Parameters
$key : string

Key to remove

Return values
void

removeKeys()

Remove elements from list.

public removeKeys(array<string|int, mixed> $keys) : void
Parameters
$keys : array<string|int, mixed>

Keys to remove

Return values
void

rewind()

Rewind iterator.

public rewind() : void
Return values
void

toArray()

Convert the named list into a standard associative array.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

valid()

Return true if the iterator is at a valid position.

public valid() : bool
Return values
bool

Search results