Some checks failed
continuous-integration/drone/push Build is failing
- 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
127 lines
2.2 KiB
PHP
127 lines
2.2 KiB
PHP
<?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;
|
|
}
|
|
}
|