RedirectRepository

Class for accessing redirect records from the database

Internal

Table of Contents

Methods

__construct()  : mixed
countActiveRedirects()  : int
countRedirectsByDemand()  : int
findCreationTypes()  : array<string|int, mixed>
Get all used creation types
findCreators()  : array<int, array<string, mixed>>
Get the backend users, which created at least one redirect, as a map of their uid and their be_users record. Redirects without a tracked creator are mapped to the "0" key. Deleted backend users are not resolved, so an empty record means the user is either untracked or gone, leaving it to the consumer to label those cases.
findHostsOfRedirects()  : array<string|int, mixed>
Get all used hosts
findIntegrityStatusCodes()  : array<string|int, mixed>
Get all used integrity status codes
findRedirectsByDemand()  : array<string|int, mixed>
Used within the backend module, which also includes the hidden records, but never deleted records.
findRedirectTypes()  : array<string|int, mixed>
Get all available redirect_types
findStatusCodesOfRedirects()  : array<string|int, mixed>
Get all used status codes
removeByDemand()  : void
addSourceHostConstraint()  : void
Adds source host constraint to query for non-admin users This significantly reduces the dataset before PHP filtering
getBackendUser()  : BackendUserAuthentication
getGroupedRows()  : array<int, array<string, scalar|null>>
getQueryBuilder()  : QueryBuilder
getQueryBuilderForDemand()  : QueryBuilder
Prepares the QueryBuilder with Constraints from the Demand
sortOutInaccessibleRedirects()  : array<int, array<string|int, mixed>>

Methods

countActiveRedirects()

public countActiveRedirects() : int
Return values
int

countRedirectsByDemand()

public countRedirectsByDemand(Demand $demand) : int
Parameters
$demand : Demand
Return values
int

findCreationTypes()

Get all used creation types

public findCreationTypes([string|null $type = null ]) : array<string|int, mixed>
Parameters
$type : string|null = null
Return values
array<string|int, mixed>

findCreators()

Get the backend users, which created at least one redirect, as a map of their uid and their be_users record. Redirects without a tracked creator are mapped to the "0" key. Deleted backend users are not resolved, so an empty record means the user is either untracked or gone, leaving it to the consumer to label those cases.

public findCreators([string|null $type = null ]) : array<int, array<string, mixed>>
Parameters
$type : string|null = null
Return values
array<int, array<string, mixed>>

findHostsOfRedirects()

Get all used hosts

public findHostsOfRedirects([string|null $type = null ]) : array<string|int, mixed>
Parameters
$type : string|null = null
Return values
array<string|int, mixed>

findIntegrityStatusCodes()

Get all used integrity status codes

public findIntegrityStatusCodes([string|null $type = null ]) : array<string|int, mixed>
Parameters
$type : string|null = null
Return values
array<string|int, mixed>

findRedirectsByDemand()

Used within the backend module, which also includes the hidden records, but never deleted records.

public findRedirectsByDemand(Demand $demand) : array<string|int, mixed>
Parameters
$demand : Demand
Return values
array<string|int, mixed>

findRedirectTypes()

Get all available redirect_types

public findRedirectTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

findStatusCodesOfRedirects()

Get all used status codes

public findStatusCodesOfRedirects([string|null $type = null ]) : array<string|int, mixed>
Parameters
$type : string|null = null
Return values
array<string|int, mixed>

addSourceHostConstraint()

Adds source host constraint to query for non-admin users This significantly reduces the dataset before PHP filtering

protected addSourceHostConstraint(QueryBuilder $queryBuilder) : void
Parameters
$queryBuilder : QueryBuilder
Tags
throws
StopQueryException

getGroupedRows()

protected getGroupedRows(string $field, string $as[, string|null $type = 'default' ]) : array<int, array<string, scalar|null>>
Parameters
$field : string
$as : string
$type : string|null = 'default'
Return values
array<int, array<string, scalar|null>>

getQueryBuilderForDemand()

Prepares the QueryBuilder with Constraints from the Demand

protected getQueryBuilderForDemand(Demand $demand[, bool $createCountQuery = false ]) : QueryBuilder
Parameters
$demand : Demand
$createCountQuery : bool = false
Return values
QueryBuilder

sortOutInaccessibleRedirects()

protected sortOutInaccessibleRedirects(array<int, array<string|int, mixed>> $redirects) : array<int, array<string|int, mixed>>
Parameters
$redirects : array<int, array<string|int, mixed>>
Return values
array<int, array<string|int, mixed>>
On this page

Search results