PHP Class Isswp101\Persimmon\ElasticsearchModel

Inheritance: extends Model, use trait Isswp101\Persimmon\Traits\Elasticsearchable, use trait Isswp101\Persimmon\Traits\Paginationable, use trait Isswp101\Persimmon\Traits\Relationshipable
Afficher le fichier Open project: isswp101/elasticsearch-eloquent Class Usage Examples

Méthodes publiques

Свойство Type Description
$_dal Isswp101\Persimmon\DAL\ElasticsearchDAL

Méthodes publiques

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

Méthodes protégées

Méthode Description
belongsTo ( $class )
hasMany ( $class )

Method Details

__construct() public méthode

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

all() public static méthode

Execute the query and get all items.
public static all ( QueryBuilder | array $query = [] ) : Collection | static[]
$query Isswp101\Persimmon\QueryBuilder\QueryBuilder | array
Résultat Illuminate\Support\Collection | static[]

belongsTo() protected méthode

protected belongsTo ( $class )

findWithParentId() public static méthode

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

first() public static méthode

Execute the query and get the first result.
public static first ( QueryBuilder | array $query = [] ) : static
$query Isswp101\Persimmon\QueryBuilder\QueryBuilder | array
Résultat static

firstOrFail() public static méthode

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
Résultat static

hasMany() protected méthode

protected hasMany ( $class )

map() public static méthode

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
Résultat integer hits.total

Property Details

$_dal public_oe property

public ElasticsearchDAL,Isswp101\Persimmon\DAL $_dal
Résultat Isswp101\Persimmon\DAL\ElasticsearchDAL