- WIP on SearchAttributes supporting Request's attributes
This commit is contained in:
1 parent
bd9078230d
commit
bbfd7c02b4
6 files changed
+70
-9
No files matched your search
@@ -5,8 +5,16 @@ namespace Ulmus\SearchRequest\Attribute;
|
||||
use Ulmus\SearchRequest\SearchMethodEnum;
|
||||
|
||||
#[\Attribute(\Attribute::TARGET_PROPERTY)]
|
||||
class SearchParameter
|
||||
{
|
||||
abstract class SearchParameter {
|
||||
|
||||
public PropertyValueSource|array $source = PropertyValueSource::QueryParams;
|
||||
|
||||
public null|string|\Stringable|array $field = null;
|
||||
|
||||
public string $description = "";
|
||||
|
||||
public function getSources() : array
|
||||
{
|
||||
return is_array($this->source) ? $this->source : [ $this->source ];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user