PHP Class Owl\Services\SearchService

Inheritance: extends Service
Afficher le fichier Open project: owl/owl

Protected Properties

Свойство Type Description
$itemFtsRepo
$tagFtsRepo

Méthodes publiques

Méthode Description
__construct ( Owl\Repositories\ItemFtsRepositoryInterface $itemFtsRepo, Owl\Repositories\TagFtsRepositoryInterface $tagFtsRepo )
itemCreate ( integer $item_id, string $title, text $body ) : Illuminate\Database\Eloquent\Model Create a item fts.
itemDelete ( $item_id ) : boolean Delete a item fts.
itemMatch ( string $str, integer $limit = 10, integer $offset ) : array item match
itemMatchCount ( string $str ) : array item matchCount
tagFirstOrCreateByIdAndWords ( integer $tag_id, string $words ) : Illuminate\Database\Eloquent\Model get a tagFts data or Create a tagFts data by ID and Words.
tagMatch ( $str, integer $limit = 10, integer $offset ) : array get tags data by string for FullTextSearch.

Method Details

__construct() public méthode

public __construct ( Owl\Repositories\ItemFtsRepositoryInterface $itemFtsRepo, Owl\Repositories\TagFtsRepositoryInterface $tagFtsRepo )
$itemFtsRepo Owl\Repositories\ItemFtsRepositoryInterface
$tagFtsRepo Owl\Repositories\TagFtsRepositoryInterface

itemCreate() public méthode

Create a item fts.
public itemCreate ( integer $item_id, string $title, text $body ) : Illuminate\Database\Eloquent\Model
$item_id integer
$title string
$body text
Résultat Illuminate\Database\Eloquent\Model

itemDelete() public méthode

Delete a item fts.
public itemDelete ( $item_id ) : boolean
$item_id int
Résultat boolean

itemMatch() public méthode

item match
public itemMatch ( string $str, integer $limit = 10, integer $offset ) : array
$str string
$limit integer
$offset integer
Résultat array

itemMatchCount() public méthode

item matchCount
public itemMatchCount ( string $str ) : array
$str string
Résultat array

tagFirstOrCreateByIdAndWords() public méthode

get a tagFts data or Create a tagFts data by ID and Words.
public tagFirstOrCreateByIdAndWords ( integer $tag_id, string $words ) : Illuminate\Database\Eloquent\Model
$tag_id integer
$words string
Résultat Illuminate\Database\Eloquent\Model

tagMatch() public méthode

get tags data by string for FullTextSearch.
public tagMatch ( $str, integer $limit = 10, integer $offset ) : array
$limit integer
$offset integer
Résultat array

Property Details

$itemFtsRepo protected_oe property

protected $itemFtsRepo

$tagFtsRepo protected_oe property

protected $tagFtsRepo