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

    Package: Default
    This interface encapsulates methods for the management of search queries.

    Provides methods for the creation and retrieval of search queries.

    Api
     

    Methods

    methodpubliccreateQuery(string $statement, string $language) : \PHPCR\Query\QueryInterface

    Creates a new query by specifying the query statement itself and the language in which the query is stated.

    The $language must be a string from among those returned by QueryManagerInterface::getSupportedQueryLanguages().

    Parameters
    NameTypeDescription
    $statementstring

    The query statement to be executed.

    $languagestring

    The language of the query to be created.

    Returns
    TypeDescription
    \PHPCR\Query\QueryInterfacea Query object
    Throws
    ExceptionDescription
    \PHPCR\Query\InvalidQueryExceptionif the query statement is syntactically invalid or the specified language is not supported
    \PHPCR\RepositoryExceptionif another error occurs
    Details
    Api
     
    methodpublicgetQOMFactory() : \PHPCR\Query\QOM\QueryObjectModelFactoryInterface

    Returns a QueryObjectModelFactory with which a JCR-JQOM query can be built programmatically.

    Returns
    TypeDescription
    \PHPCR\Query\QOM\QueryObjectModelFactoryInterfacea QueryObjectModelFactory object
    Details
    Api
     
    methodpublicgetQuery(\PHPCR\NodeInterface $node) : \PHPCR\Query\QueryInterface

    Retrieves an existing persistent query.

    Persistent queries are created by first using QueryManagerInterface::createQuery() to create a Query object and then calling QueryInterface::save() to persist the query to a location in the workspace.

    Parameters
    NameTypeDescription
    $node\PHPCR\NodeInterface

    a persisted query (that is, a node of type nt:query).

    Returns
    TypeDescription
    \PHPCR\Query\QueryInterfacea Query object.
    Throws
    ExceptionDescription
    \PHPCR\Query\InvalidQueryExceptionIf node is not a valid persisted query (that is, a node of type nt:query).
    \PHPCR\RepositoryExceptionif another error occurs
    Details
    Api
     
    methodpublicgetSupportedQueryLanguages() : array

    Returns an array of strings representing all query languages supported by this repository.

    This set must include at least the strings represented by the constants QueryInterface::JCR_SQL2 and QueryInterface::JCR_JQOM. An implementation may also support other languages including the deprecated languages of JCR 1.0: QueryInterface::XPATH and QueryInterface::SQL.

    Returns
    TypeDescription
    arrayA list of supported languages by the query.
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionif an error occurs.
    Details
    Api
     
    Documentation was generated by phpDocumentor 2.0.0a12.