2015-12-06 18:58:49 +00:00
|
|
|
<?php
|
|
|
|
|
2017-07-01 20:29:49 +00:00
|
|
|
namespace Pterodactyl\Contracts\Repository\Attributes;
|
2015-12-06 18:58:49 +00:00
|
|
|
|
2017-07-01 20:29:49 +00:00
|
|
|
interface SearchableInterface
|
2016-12-07 22:46:38 +00:00
|
|
|
{
|
2017-07-08 19:07:51 +00:00
|
|
|
/**
|
2018-01-05 04:49:50 +00:00
|
|
|
* Set the search term.
|
2017-07-08 19:07:51 +00:00
|
|
|
*
|
2018-01-05 04:49:50 +00:00
|
|
|
* @param string|null $term
|
2017-07-08 19:07:51 +00:00
|
|
|
* @return $this
|
2018-01-05 04:49:50 +00:00
|
|
|
* @deprecated
|
2017-07-08 19:07:51 +00:00
|
|
|
*/
|
2017-07-01 20:29:49 +00:00
|
|
|
public function search($term);
|
2018-01-05 04:49:50 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the search term to use when requesting all records from
|
|
|
|
* the model.
|
|
|
|
*
|
|
|
|
* @param string|null $term
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function setSearchTerm(string $term = null);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Determine if a valid search term is set on this repository.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function hasSearchTerm(): bool;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the search term.
|
|
|
|
*
|
|
|
|
* @return string|null
|
|
|
|
*/
|
|
|
|
public function getSearchTerm();
|
2015-12-06 18:58:49 +00:00
|
|
|
}
|