phpcr/src/PHPCR/Query/QueryResultInterface.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\QueryResultInterface

    Package: Default
    A QueryResult object.

    Returned by Query->execute().

    The \Traversable interface enables the implementation to be addressed with foreach. QueryResults have to implement either \RecursiveIterator or \Iterator. The iterator is equivalent to getRows() returning a list of the rows. The iterator keys have no significant meaning. Note: We use getRows and not getNodes as this is more generic. If you have a single selector, you can either do foreach on getNodes or call getNode on the rows.

    Parent(s)
    \Traversable
    Api
     

    Methods

    methodpublicgetColumnNames() : array

    Returns an array of all the column names in the table view of this result set.

    Returns
    TypeDescription
    arrayA list holding the column names.
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionif an error occurs.
    Details
    Api
     
    methodpublicgetNodes(bool | int $prefetch = false) : \Iterator

    Returns an iterator over all nodes that match the query.

    The nodes are returned according to the ordering specified in the query.

    Parameters
    NameTypeDescription
    $prefetchbool | int

    Whether to prefetch or not. int < 0/true means all, 0/false means none, int > 0 means the prefetch chunk size or none

    Returns
    TypeDescription
    \Iteratorimplementing <b>SeekableIterator</b> and <b>Countable</b>. Keys are the paths, Values the given Node instances.
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionif the query contains more than one selector, if this call is the second time either getRows() or getNodes() has been called on the same QueryResult object or if another error occurs.
    Details
    Api
     
    methodpublicgetRows() : \Iterator

    Returns an iterator over the Rows of the result table.

    The rows are returned according to the ordering specified in the query.

    Returns
    TypeDescription
    \Iteratorimplementing <b>SeekableIterator</b> and <b>Countable</b>. Keys are the row position in this result set, Values are the RowInterface instances.
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionif this call is the second time either getRows() or getNodes() has been called on the same QueryResult object or if another error occurs.
    Details
    Api
     
    methodpublicgetSelectorNames() : array

    Returns an array of all the selector names that were used in the query that created this result.

    If the query did not have a selector name then an empty array is returned.

    Returns
    TypeDescription
    arrayA String array holding the selector names.
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionif an error occurs.
    Details
    Api
     
    Documentation was generated by phpDocumentor 2.0.0a12.