PHP 클래스 Search\Manager

파일 보기 프로젝트 열기: friendsofcake/search 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_collection string Active filter collection.
$_filters array Filter collection and their filters
$_repository Repository

공개 메소드들

메소드 설명
__call ( string $method, array $args ) Magic method to add filters using custom types.
__construct ( Cake\Datasource\RepositoryInterface $repository ) Constructor
add ( string $name, string $filter, array $options = [] ) Adds a new filter to the active collection.
all ( ) : array Return all configured types.
boolean ( string $name, array $config = [] ) boolean method
callback ( string $name, array $config = [] ) callback method
collection ( string | null $name = null ) : mixed Sets or gets the filter collection name.
compare ( string $name, array $config = [] ) compare method
custom ( string $name, array $config = [] ) custom method
finder ( string $name, array $config = [] ) finder method
getFilters ( string $collection = 'default' ) : array Gets all filters in a given collection.
like ( string $name, array $config = [] ) like method
loadFilter ( string $name, string $filter, array $options = [] ) : Base Loads a search filter.
remove ( string $name ) : void Removes filter from the active collection.
repository ( ) : Cake\Datasource\RepositoryInterface Return repository instance.
table ( ) : Table Return Table
value ( string $name, array $config = [] ) value method

메소드 상세

__call() 공개 메소드

Magic method to add filters using custom types.
public __call ( string $method, array $args )
$method string Method name.
$args array Arguments.

__construct() 공개 메소드

Constructor
public __construct ( Cake\Datasource\RepositoryInterface $repository )
$repository Cake\Datasource\RepositoryInterface Repository

add() 공개 메소드

Adds a new filter to the active collection.
public add ( string $name, string $filter, array $options = [] )
$name string Field name.
$filter string Filter name.
$options array Filter options.

all() 공개 메소드

Return all configured types.
public all ( ) : array
리턴 array Config

boolean() 공개 메소드

boolean method
public boolean ( string $name, array $config = [] )
$name string Name
$config array Config

callback() 공개 메소드

callback method
public callback ( string $name, array $config = [] )
$name string Name
$config array Config

collection() 공개 메소드

Sets or gets the filter collection name.
public collection ( string | null $name = null ) : mixed
$name string | null Name of the active filter collection to set.
리턴 mixed Returns $this or the name of the active collection if no $name was provided.

compare() 공개 메소드

compare method
public compare ( string $name, array $config = [] )
$name string Name
$config array Config

custom() 공개 메소드

custom method
public custom ( string $name, array $config = [] )
$name string Name
$config array Config

finder() 공개 메소드

finder method
public finder ( string $name, array $config = [] )
$name string Name
$config array Config

getFilters() 공개 메소드

Gets all filters in a given collection.
public getFilters ( string $collection = 'default' ) : array
$collection string Name of the filter collection.
리턴 array Array of filter instances.

like() 공개 메소드

like method
public like ( string $name, array $config = [] )
$name string Name
$config array Config

loadFilter() 공개 메소드

Loads a search filter.
public loadFilter ( string $name, string $filter, array $options = [] ) : Base
$name string Name of the field
$filter string Filter name
$options array Filter options.
리턴 Search\Model\Filter\Base

remove() 공개 메소드

Removes filter from the active collection.
public remove ( string $name ) : void
$name string Name of the filter to be removed.
리턴 void

repository() 공개 메소드

Return repository instance.
public repository ( ) : Cake\Datasource\RepositoryInterface
리턴 Cake\Datasource\RepositoryInterface Repository Instance

table() 공개 메소드

Return Table
사용 중단: Use repository() instead.
public table ( ) : Table
리턴 Cake\ORM\Table Table Instance

value() 공개 메소드

value method
public value ( string $name, array $config = [] )
$name string Name
$config array Config

프로퍼티 상세

$_collection 보호되어 있는 프로퍼티

Active filter collection.
protected string $_collection
리턴 string

$_filters 보호되어 있는 프로퍼티

Filter collection and their filters
protected array $_filters
리턴 array

$_repository 보호되어 있는 프로퍼티

Repository
protected $_repository