Elgg  Version 2.3
Public Member Functions | Static Public Member Functions | List of all members
Elgg\Structs\Collection\InMemory Class Reference

Uses native PHP array to implement the Collection interface. More...

Inheritance diagram for Elgg\Structs\Collection\InMemory:
Elgg\Structs\Collection

Public Member Functions

 contains ($item)
 @inheritDoc More...
 
 count ()
 @inheritDoc More...
 
 current ()
 @inheritDoc More...
 
 filter (callable $filter)
 @inheritDoc More...
 
 key ()
 @inheritDoc More...
 
 map (callable $mapper)
 @inheritDoc More...
 
 next ()
 @inheritDoc More...
 
 rewind ()
 @inheritDoc More...
 
 valid ()
 @inheritDoc More...
 

Static Public Member Functions

static fromArray (array $items)
 Factory function for converting from an array to a ton of items. More...
 

Detailed Description

Uses native PHP array to implement the Collection interface.

Since
1.10

@access private

Definition at line 13 of file InMemory.php.

Member Function Documentation

◆ contains()

Elgg\Structs\Collection\InMemory::contains (   $item)

@inheritDoc

Implements Elgg\Structs\Collection.

Definition at line 27 of file InMemory.php.

◆ count()

Elgg\Structs\Collection\InMemory::count ( )

@inheritDoc

Definition at line 32 of file InMemory.php.

◆ current()

Elgg\Structs\Collection\InMemory::current ( )

@inheritDoc

Definition at line 37 of file InMemory.php.

◆ filter()

Elgg\Structs\Collection\InMemory::filter ( callable  $filter)

@inheritDoc

Implements Elgg\Structs\Collection.

Definition at line 42 of file InMemory.php.

◆ fromArray()

static Elgg\Structs\Collection\InMemory::fromArray ( array  $items)
static

Factory function for converting from an array to a ton of items.

Parameters
array$itemsThe list of objects to include. Generics come later.
Returns
self

Definition at line 90 of file InMemory.php.

◆ key()

Elgg\Structs\Collection\InMemory::key ( )

@inheritDoc

Definition at line 55 of file InMemory.php.

◆ map()

Elgg\Structs\Collection\InMemory::map ( callable  $mapper)

@inheritDoc

Implements Elgg\Structs\Collection.

Definition at line 60 of file InMemory.php.

◆ next()

Elgg\Structs\Collection\InMemory::next ( )

@inheritDoc

Definition at line 69 of file InMemory.php.

◆ rewind()

Elgg\Structs\Collection\InMemory::rewind ( )

@inheritDoc

Definition at line 74 of file InMemory.php.

◆ valid()

Elgg\Structs\Collection\InMemory::valid ( )

@inheritDoc

Definition at line 79 of file InMemory.php.


The documentation for this class was generated from the following file: