PHP Class Doctrine\Search\Query

Afficher le fichier Open project: doctrine/search Class Usage Examples

Protected Properties

Свойство Type Description
$cacheLifetime integer
$count integer
$entityClasses array
$facets array
$hydrationMode integer
$hydrationParameter string
$hydrationQuery object
$query object
$sm Doctrine\Search\SearchManager
$useResultCache boolean

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
getHydrationQuery ( ) : object Return a provided hydration query
getSearchManager ( )

Method Details

__call() public méthode

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 méthode

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

addFrom() public méthode

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

count() public méthode

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

from() public méthode

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

getFacets() public méthode

public getFacets ( ) : array
Résultat array

getHydrationQuery() protected méthode

Return a provided hydration query
protected getHydrationQuery ( ) : object
Résultat object

getResult() public méthode

Execute search and hydrate results if required.
public getResult ( integer $hydrationMode = null ) : mixed
$hydrationMode integer
Résultat mixed

getSearchManager() protected méthode

protected getSearchManager ( )

getSingleResult() public méthode

Execute search for single result and hydrate results if required.
public getSingleResult ( integer $hydrationMode = null ) : mixed
$hydrationMode integer
Résultat mixed

hydrateWith() public méthode

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() public méthode

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

setHydrationMode() public méthode

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() public méthode

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

Property Details

$cacheLifetime protected_oe property

protected int $cacheLifetime
Résultat integer

$count protected_oe property

protected int $count
Résultat integer

$entityClasses protected_oe property

protected array $entityClasses
Résultat array

$facets protected_oe property

protected array $facets
Résultat array

$hydrationMode protected_oe property

protected int $hydrationMode
Résultat integer

$hydrationParameter protected_oe property

protected string $hydrationParameter
Résultat string

$hydrationQuery protected_oe property

protected object $hydrationQuery
Résultat object

$query protected_oe property

protected object $query
Résultat object

$sm protected_oe property

protected SearchManager,Doctrine\Search $sm
Résultat Doctrine\Search\SearchManager

$useResultCache protected_oe property

protected bool $useResultCache
Résultat boolean