PHP Класс Isswp101\Persimmon\ElasticsearchModel

Наследование: extends Model, use trait Isswp101\Persimmon\Traits\Elasticsearchable, use trait Isswp101\Persimmon\Traits\Paginationable, use trait Isswp101\Persimmon\Traits\Relationshipable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$_dal Isswp101\Persimmon\DAL\ElasticsearchDAL

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

Метод Описание
__construct ( Isswp101\Persimmon\DAL\IDAL $dal, array $attributes = [] )
all ( QueryBuilder | array $query = [] ) : Collection | static[] Execute the query and get all items.
findWithParentId ( $id, $parent, array $columns = ['*'] )
first ( QueryBuilder | array $query = [] ) : static Execute the query and get the first result.
firstOrFail ( QueryBuilder | array $query = [] ) : static Execute the query and get the first result or throw an exception.
map ( QueryBuilder | array $query = [], callable $callback = null, integer $limit ) : integer Apply the callback to the documents of the given query.
search ( QueryBuilder | array $query = [] ) : ElasticsearchCollection | static[] Execute the query and get the result.

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

Метод Описание
belongsTo ( $class )
hasMany ( $class )

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

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

public __construct ( Isswp101\Persimmon\DAL\IDAL $dal, array $attributes = [] )
$dal Isswp101\Persimmon\DAL\IDAL
$attributes array

all() публичный статический Метод

Execute the query and get all items.
public static all ( QueryBuilder | array $query = [] ) : Collection | static[]
$query Isswp101\Persimmon\QueryBuilder\QueryBuilder | array
Результат Illuminate\Support\Collection | static[]

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

protected belongsTo ( $class )

findWithParentId() публичный статический Метод

public static findWithParentId ( $id, $parent, array $columns = ['*'] )
$columns array

first() публичный статический Метод

Execute the query and get the first result.
public static first ( QueryBuilder | array $query = [] ) : static
$query Isswp101\Persimmon\QueryBuilder\QueryBuilder | array
Результат static

firstOrFail() публичный статический Метод

Execute the query and get the first result or throw an exception.
public static firstOrFail ( QueryBuilder | array $query = [] ) : static
$query Isswp101\Persimmon\QueryBuilder\QueryBuilder | array
Результат static

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

protected hasMany ( $class )

map() публичный статический Метод

Apply the callback to the documents of the given query.
public static map ( QueryBuilder | array $query = [], callable $callback = null, integer $limit ) : integer
$query Isswp101\Persimmon\QueryBuilder\QueryBuilder | array
$callback callable
$limit integer
Результат integer hits.total

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

$_dal публичное свойство

public ElasticsearchDAL,Isswp101\Persimmon\DAL $_dal
Результат Isswp101\Persimmon\DAL\ElasticsearchDAL