Elgg
Version 2.3
engine
classes
Elgg
Structs
Collection.php
Go to the documentation of this file.
1
<?php
2
namespace
Elgg\Structs;
3
4
use Countable;
5
use Iterator;
6
33
interface
Collection
extends
Countable, Iterator {
34
42
public
function
filter
(callable
$filter
);
43
51
public
function
contains
(
$item
);
52
63
public
function
map
(callable $mapper);
64
}
Elgg\Structs\Collection
A read-only interface to a (possibly mutable) group of items.
Definition:
Collection.php:33
Elgg\Structs\Collection\contains
contains($item)
Returns true iff the item is in this collection at least once.
Elgg\Structs\Collection\map
map(callable $mapper)
Take items of the collection and return a new collection with all the items having the $mapper applie...
Elgg\Structs\Collection\filter
filter(callable $filter)
Returns a new collection only containing the elements which pass the filter.
$filter
if(! $vars['title'] && $vars['title'] !==false) if(isset($vars['filter_override'])) if(!isset($vars['filter']) &&elgg_is_logged_in() && $context) $filter
Definition:
content.php:62
$item
if(! $items) $item
Definition:
delete.php:17
Generated on Fri Aug 29 2025 00:00:46 for Elgg by
1.9.1