PHP Class Jackalope\Query\Row

The \Traversable interface enables the implementation to be addressed with foreach. Rows have to implement either \RecursiveIterator or \Iterator. The iterator is similar to getValues() with keys being the column names and the values the corresponding entry in that column for this row.
Inheritance: implements Iterator, implements PHPCR\Query\RowInterface
Exibir arquivo Open project: jackalope/jackalope Class Usage Examples

Protected Properties

Property Type Description
$columns array Columns of this result row: array of array with fields dcr:name and dcr:value
$defaultSelectorName string The default selector name
$factory Jackalope\FactoryInterface
$objectManager Jackalope\ObjectManager
$path The path to the node for each selector
$position integer Which column we are on when iterating over the columns
$score The score this row has for each selector
$values array Cached list of values extracted from columns to avoid double work.

Public Methods

Method Description
__construct ( Jackalope\FactoryInterface $factory, ObjectManager $objectManager, array $columns ) Create new Row instance.
current ( ) Implement Iterator
getNode ( $selectorName = null ) {@inheritDoc}
getPath ( $selectorName = null ) {@inheritDoc}
getScore ( $selectorName = null ) {@inheritDoc}
getValue ( $columnName ) {@inheritDoc}
getValues ( ) {@inheritDoc}
key ( ) Implement Iterator
next ( ) Implement Iterator
rewind ( ) Implement Iterator
valid ( ) : boolean Implement Iterator

Method Details

__construct() public method

Create new Row instance.
public __construct ( Jackalope\FactoryInterface $factory, ObjectManager $objectManager, array $columns )
$factory Jackalope\FactoryInterface the object factory
$objectManager Jackalope\ObjectManager
$columns array array of array with fields dcr:name and dcr:value

current() public method

Implement Iterator
public current ( )

getNode() public method

{@inheritDoc}
public getNode ( $selectorName = null )

getPath() public method

{@inheritDoc}
public getPath ( $selectorName = null )

getScore() public method

{@inheritDoc}
public getScore ( $selectorName = null )

getValue() public method

{@inheritDoc}
public getValue ( $columnName )

getValues() public method

{@inheritDoc}
public getValues ( )

key() public method

Implement Iterator
public key ( )

next() public method

Implement Iterator
public next ( )

rewind() public method

Implement Iterator
public rewind ( )

valid() public method

Implement Iterator
public valid ( ) : boolean
return boolean whether the current position is valid

Property Details

$columns protected_oe property

Columns of this result row: array of array with fields dcr:name and dcr:value
protected array $columns
return array

$defaultSelectorName protected_oe property

The default selector name
protected string $defaultSelectorName
return string

$factory protected_oe property

protected FactoryInterface,Jackalope $factory
return Jackalope\FactoryInterface

$objectManager protected_oe property

protected ObjectManager,Jackalope $objectManager
return Jackalope\ObjectManager

$path protected_oe property

The path to the node for each selector
protected $path

$position protected_oe property

Which column we are on when iterating over the columns
protected int $position
return integer

$score protected_oe property

The score this row has for each selector
protected $score

$values protected_oe property

Cached list of values extracted from columns to avoid double work.
See also: Row::getValues()
protected array $values
return array