PHP Класс Doctrine\Search\Query

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$cacheLifetime integer
$count integer
$entityClasses array
$facets array
$hydrationMode integer
$hydrationParameter string
$hydrationQuery object
$query object
$sm Doctrine\Search\SearchManager
$useResultCache boolean

Открытые методы

Метод Описание
__call ( string $method, array $arguments ) Magic method to pass query building to the underlying query object, saving the need to abstract.
__construct ( Doctrine\Search\SearchManager $sm )
addFrom ( string $entityClass ) Add a searchable entity class to search against.
count ( ) Return the total hit count for the given query as provided by the search engine.
from ( mixed $entityClasses ) Specifies the searchable entity class to search against.
getFacets ( ) : array
getResult ( integer $hydrationMode = null ) : mixed Execute search and hydrate results if required.
getSingleResult ( integer $hydrationMode = null ) : mixed Execute search for single result and hydrate results if required.
hydrateWith ( object $hydrationQuery, string $parameter = null ) Set a custom Doctrine Query to execute in order to hydrate the search engine results into required entities. The assumption is made the the search engine result id is correlated to the entity id. An optional query parameter override can be specified.
searchWith ( mixed $query ) Set the query object to be executed on the search engine
setHydrationMode ( integer $mode ) Set the hydration mode from the underlying query modes or bypass and return search result directly from the client
useResultCache ( boolean $useCache, integer $cacheLifetime = null ) If hydrating with Doctrine then you can use the result cache on the default or provided query

Защищенные методы

Метод Описание
getHydrationQuery ( ) : object Return a provided hydration query
getSearchManager ( )

Описание методов

__call() публичный Метод

Magic method to pass query building to the underlying query object, saving the need to abstract.
public __call ( string $method, array $arguments )
$method string
$arguments array

__construct() публичный Метод

public __construct ( Doctrine\Search\SearchManager $sm )
$sm Doctrine\Search\SearchManager

addFrom() публичный Метод

Add a searchable entity class to search against.
public addFrom ( string $entityClass )
$entityClass string

count() публичный Метод

Return the total hit count for the given query as provided by the search engine.
public count ( )

from() публичный Метод

Specifies the searchable entity class to search against.
public from ( mixed $entityClasses )
$entityClasses mixed

getFacets() публичный Метод

public getFacets ( ) : array
Результат array

getHydrationQuery() защищенный Метод

Return a provided hydration query
protected getHydrationQuery ( ) : object
Результат object

getResult() публичный Метод

Execute search and hydrate results if required.
public getResult ( integer $hydrationMode = null ) : mixed
$hydrationMode integer
Результат mixed

getSearchManager() защищенный Метод

protected getSearchManager ( )

getSingleResult() публичный Метод

Execute search for single result and hydrate results if required.
public getSingleResult ( integer $hydrationMode = null ) : mixed
$hydrationMode integer
Результат mixed

hydrateWith() публичный Метод

Set a custom Doctrine Query to execute in order to hydrate the search engine results into required entities. The assumption is made the the search engine result id is correlated to the entity id. An optional query parameter override can be specified.
public hydrateWith ( object $hydrationQuery, string $parameter = null )
$hydrationQuery object
$parameter string

searchWith() публичный Метод

Set the query object to be executed on the search engine
public searchWith ( mixed $query )
$query mixed

setHydrationMode() публичный Метод

Set the hydration mode from the underlying query modes or bypass and return search result directly from the client
public setHydrationMode ( integer $mode )
$mode integer

useResultCache() публичный Метод

If hydrating with Doctrine then you can use the result cache on the default or provided query
public useResultCache ( boolean $useCache, integer $cacheLifetime = null )
$useCache boolean
$cacheLifetime integer

Описание свойств

$cacheLifetime защищенное свойство

protected int $cacheLifetime
Результат integer

$count защищенное свойство

protected int $count
Результат integer

$entityClasses защищенное свойство

protected array $entityClasses
Результат array

$facets защищенное свойство

protected array $facets
Результат array

$hydrationMode защищенное свойство

protected int $hydrationMode
Результат integer

$hydrationParameter защищенное свойство

protected string $hydrationParameter
Результат string

$hydrationQuery защищенное свойство

protected object $hydrationQuery
Результат object

$query защищенное свойство

protected object $query
Результат object

$sm защищенное свойство

protected SearchManager,Doctrine\Search $sm
Результат Doctrine\Search\SearchManager

$useResultCache защищенное свойство

protected bool $useResultCache
Результат boolean