initial commit
This commit is contained in:
27
app/Data/Intent/Contact/SearchContactIntent.php
Normal file
27
app/Data/Intent/Contact/SearchContactIntent.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Data\Intent\Contact;
|
||||
|
||||
final class SearchContactIntent
|
||||
{
|
||||
private const QUERY_ALL = '*';
|
||||
|
||||
public readonly string $query;
|
||||
public readonly int $resultsPerPage;
|
||||
|
||||
public function __construct(
|
||||
string $query,
|
||||
) {
|
||||
$this->query = strtolower($query);
|
||||
$this->resultsPerPage = 20;
|
||||
}
|
||||
|
||||
public static function queryAll(): SearchContactIntent
|
||||
{
|
||||
return new SearchContactIntent(
|
||||
self::QUERY_ALL
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user