class StatisticsController extends Controller

Traits

AuthorizesRequests
ValidatesRequests

Methods

bool
isAutomatedRequest(Request|null $request = null)

Determines if the request was done by an automated script (with API token or ajax).

RedirectResponse
fuzzyRedirect()

Redirects to the _redirect URL, to a route or else back.

array
getAnnotationStatistics(string $type, callable $restrict)

Compute the annotation statistics of image or video volumes.

Collection
index(int $id)

Provides the statistics-data for a specific Volume.

Details

in Controller at line 21
bool isAutomatedRequest(Request|null $request = null)

Determines if the request was done by an automated script (with API token or ajax).

Parameters

Request|null $request

Return Value

bool

in Controller at line 15
protected RedirectResponse fuzzyRedirect()

Redirects to the _redirect URL, to a route or else back.

Return Value

RedirectResponse

protected array getAnnotationStatistics(string $type, callable $restrict)

Compute the annotation statistics of image or video volumes.

The statistics are derived from the same join of annotations, annotation labels and files. The join is computed only once (as materialized CTE) and all statistics are fetched with a single query.

Parameters

string $type

'image' or 'video'

callable $restrict

Receives the base query and restricts it to the volumes of the statistics (e.g. with a where on "{$type}s.volume_id").

Return Value

array

at line 28
Collection index(int $id)

Provides the statistics-data for a specific Volume.

Parameters

int $id

Return Value

Collection