GenericTermIterator
in package
implements
TermIteratorInterface
Wrapper making almost anything (e.g. array, generator or a single QuadInterface object) a QuadIteratorInterface.
Tags
Table of Contents
Interfaces
Properties
- $intersect : GenericTermIterator
- $iter : Iterator<string|int, TermInterface>
- $skip : GenericTermIterator
Methods
- __construct() : mixed
- contains() : bool
- current() : TermInterface|null
- getValues() : array<string|int, string>
- Extracts values of all terms and returns them as an array.
- intersect() : self
- key() : mixed
- next() : void
- rewind() : void
- skip() : self
- valid() : bool
- valid2() : bool
Properties
$intersect
private
GenericTermIterator
$intersect
$iter
private
Iterator<string|int, TermInterface>
$iter
$skip
private
GenericTermIterator
$skip
Methods
__construct()
public
__construct(array<string|int, TermInterface>|Iterator<string|int, TermInterface>|IteratorAggregate<string|int, TermInterface>|TermInterface $iter) : mixed
Parameters
- $iter : array<string|int, TermInterface>|Iterator<string|int, TermInterface>|IteratorAggregate<string|int, TermInterface>|TermInterface
contains()
public
contains(TermCompareInterface $term) : bool
Parameters
- $term : TermCompareInterface
Return values
boolcurrent()
public
current() : TermInterface|null
Return values
TermInterface|nullgetValues()
Extracts values of all terms and returns them as an array.
public
getValues() : array<string|int, string>
Return values
array<string|int, string>intersect()
public
intersect(array<string|int, TermInterface>|Iterator<string|int, TermInterface>|IteratorAggregate<string|int, TermInterface>|TermInterface $terms) : self
Parameters
- $terms : array<string|int, TermInterface>|Iterator<string|int, TermInterface>|IteratorAggregate<string|int, TermInterface>|TermInterface
Return values
selfkey()
public
key() : mixed
next()
public
next() : void
rewind()
public
rewind() : void
skip()
public
skip(array<string|int, TermInterface>|Iterator<string|int, TermInterface>|IteratorAggregate<string|int, TermInterface>|TermInterface $terms) : self
Parameters
- $terms : array<string|int, TermInterface>|Iterator<string|int, TermInterface>|IteratorAggregate<string|int, TermInterface>|TermInterface
Return values
selfvalid()
public
valid() : bool
Return values
boolvalid2()
private
valid2() : bool