- Complete GGZ Ecademy Laravel backend application - RESTful API for learning products, members, filters - Authentication and authorization system - Database migrations and seeders - Custom CRUD generator commands - Email notification system - Integration with frontend applications
This commit is contained in:
126
app/Repositories/QueryBuilder/Config.php
Normal file
126
app/Repositories/QueryBuilder/Config.php
Normal file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repositories\QueryBuilder;
|
||||
|
||||
class Config
|
||||
{
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private array $allowedAppends = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private array $allowedFields = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private array $allowedFilters = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private array $allowedIncludes = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private array $allowedSorts = [];
|
||||
|
||||
/**
|
||||
* @param string[] $allowedAppends
|
||||
* @return self
|
||||
*/
|
||||
public function setAllowedAppends(array $allowedAppends): self
|
||||
{
|
||||
$this->allowedAppends = $allowedAppends;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAllowedAppends(): array
|
||||
{
|
||||
return $this->allowedAppends;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $allowedFields
|
||||
* @return self
|
||||
*/
|
||||
public function setAllowedFields(array $allowedFields): self
|
||||
{
|
||||
$this->allowedFields = $allowedFields;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAllowedFields(): array
|
||||
{
|
||||
return $this->allowedFields;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $allowedFilters
|
||||
* @return self
|
||||
*/
|
||||
public function setAllowedFilters(array $allowedFilters): self
|
||||
{
|
||||
$this->allowedFilters = $allowedFilters;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAllowedFilters(): array
|
||||
{
|
||||
return $this->allowedFilters;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $allowedIncludes
|
||||
* @return self
|
||||
*/
|
||||
public function setAllowedIncludes(array $allowedIncludes): self
|
||||
{
|
||||
$this->allowedIncludes = $allowedIncludes;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAllowedIncludes(): array
|
||||
{
|
||||
return $this->allowedIncludes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $allowedSorts
|
||||
* @return self
|
||||
*/
|
||||
public function setAllowedSorts(array $allowedSorts): self
|
||||
{
|
||||
$this->allowedSorts = $allowedSorts;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAllowedSorts(): array
|
||||
{
|
||||
return $this->allowedSorts;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user