SchedulerController
in package
Scheduler Controller for handling HTTP endpoints
Table of Contents
Properties
- $grav : Grav
- $scheduler : ModernScheduler
Methods
- __construct() : mixed
- SchedulerController constructor
- adminStatus() : ResponseInterface
- Handle admin AJAX requests for scheduler status
- health() : ResponseInterface
- Handle health check endpoint
- statistics() : ResponseInterface
- Handle statistics endpoint
- webhook() : ResponseInterface
- Handle webhook trigger endpoint
- formatHealthStatus() : string
- Format health status for display
- formatTriggers() : string
- Format triggers for display
- jsonResponse() : ResponseInterface
- Create JSON response
Properties
$grav
protected
Grav
$grav
$scheduler
protected
ModernScheduler
$scheduler
Methods
__construct()
SchedulerController constructor
public
__construct(Grav $grav) : mixed
Parameters
- $grav : Grav
adminStatus()
Handle admin AJAX requests for scheduler status
public
adminStatus(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacehealth()
Handle health check endpoint
public
health(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacestatistics()
Handle statistics endpoint
public
statistics(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacewebhook()
Handle webhook trigger endpoint
public
webhook(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfaceformatHealthStatus()
Format health status for display
protected
formatHealthStatus(array<string|int, mixed> $health) : string
Parameters
- $health : array<string|int, mixed>
Return values
stringformatTriggers()
Format triggers for display
protected
formatTriggers(array<string|int, mixed> $triggers) : string
Parameters
- $triggers : array<string|int, mixed>
Return values
stringjsonResponse()
Create JSON response
protected
jsonResponse(array<string|int, mixed> $data[, int $statusCode = 200 ]) : ResponseInterface
Parameters
- $data : array<string|int, mixed>
- $statusCode : int = 200