phpcr/src/PHPCR/Query/RowInterface.php

Show: PublicProtectedPrivateinherited
    Table of Contents
    This file is part of the PHPCR API and was originally ported from the Java JCR API to PHP by Karsten Dambekalns for the FLOW3 project.

    Copyright 2008-2011 Karsten Dambekalns karsten@typo3.org

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0
    

    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

    License
    Apache Software License 2.0  
    Link
    http://phpcr.github.com/  

    \PHPCR\Query\RowInterface

    Package: Default
    A row in the query result table.

    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.

    Parent(s)
    \Traversable
    Api
     

    Methods

    methodpublicgetNode(string $selectorName = null) : \PHPCR\NodeInterface

    Returns the Node corresponding to this Row and the specified selector, if given.

    Parameters
    NameTypeDescription
    $selectorNamestring

    The selector identifying a node within the current result row.

    Returns
    TypeDescription
    \PHPCR\NodeInterfacea Node
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionIf selectorName is not the alias of a selector in this query or if another error occurs.
    Details
    Api
     
    methodpublicgetPath(string $selectorName = null) : string

    Get the path of a node identified by a selector.

    Equivalent to $row->getNode($selectorName)->getPath(). However, some implementations may be able gain efficiency by not resolving the actual Node.

    Parameters
    NameTypeDescription
    $selectorNamestring

    The selector identifying a node within the current result row.

    Returns
    TypeDescription
    stringThe path representing the node identified by the given selector.
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionif selectorName is not the alias of a selector in this query or if another error occurs.
    Details
    Api
     
    methodpublicgetScore(string $selectorName = null) : float

    Returns the full text search score for this row associated with the specified selector.

    This corresponds to the score of a particular node.

    • If no selectorName is given, the default selector is used.
    • If no FullTextSearchScore AQM object is associated with the selector selectorName, this method will still return a value. However, in that case the returned value may not be meaningful or may simply reflect the minimum possible relevance level (for example, in some systems this might be a score of 0).

    Note, in JCR-SQL2 a FullTextSearchScore AQM object is represented by a SCORE() function. In JCR-JQOM it is represented by a PHP object of type \PHPCR\Query\QOM\FullTextSearchScoreInterface.

    Parameters
    NameTypeDescription
    $selectorNamestring

    The selector identifying a node within the current result row.

    Returns
    TypeDescription
    floatThe full text search score for this row.
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionif selectorName is not the alias of a selector in this query or (in case of no given selectorName) if this query has more than one selector (and therefore, this Row corresponds to more than one Node) or if another error occurs.
    Details
    Api
     
    methodpublicgetValue(string $columnName) : mixed

    Returns the value of the indicated column in this Row.

    Parameters
    NameTypeDescription
    $columnNamestring

    name of query result table column

    Returns
    TypeDescription
    mixedThe value of the given column of the current result row.
    Throws
    ExceptionDescription
    \PHPCR\ItemNotFoundExceptionif columnName s not among the column names of the query result table.
    \PHPCR\RepositoryExceptionif another error occurs.
    Details
    Api
     
    methodpublicgetValues() : array

    Returns an array of all the values in the same order as the column names returned by QueryResultInterface::getColumnNames().

    Returns
    TypeDescription
    arrayHashmap of column name to value of each column of the current result row.
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionif an error occurs
    Details
    Api
     
    Documentation was generated by phpDocumentor 2.0.0a12.