TableNameService
class TableNameService (View source)
Applies the pdns_db_name prefix to PowerDNS table names and validates ORDER BY, LIMIT and OFFSET inputs.
Methods
Get table name with prefix using enum (preferred method)
Get multiple table names at once using enums
Only ever returns a value present in $allowedColumns, so the result is safe to interpolate into ORDER BY.
Only ever returns 'ASC' or 'DESC', so the result is safe to interpolate.
No description
No description
Details
__construct(ConfigurationInterface $config)
No description
string
getTable(PdnsTable $table)
Get table name with prefix using enum (preferred method)
array
getTables(PdnsTable ...$tables)
Get multiple table names at once using enums
string
validateOrderBy(string $column, array $allowedColumns)
Only ever returns a value present in $allowedColumns, so the result is safe to interpolate into ORDER BY.
string
validateDirection(string $direction)
Only ever returns 'ASC' or 'DESC', so the result is safe to interpolate.
int
validateLimit(int $limit, int $maxLimit = 10000)
No description
int
validateOffset(int $offset)
No description