Pionia Core

BaseApiServiceSwitch
in package
implements BaseSwitchContract Uses CachedEndpoints

AbstractYes

This is the base class for the API service switch. It is used to switch between different services based on the request data.

The child class must implement the registerServices method to return an array of services. It requires the request to define the SERVICE key in the request data and the ACTION key to define the action to be performed.

The SERVICE is the class that will be called when the SERVICE_NAME is called. The ACTION is the method that will be called on the SERVICE.

Tags
author

Jet - ezrajet9@gmail.com

see
BaseResponse

for the response returned by this swicher's processServices method

Table of Contents

Interfaces

BaseSwitchContract

Properties

$app  : PioniaApplication
This is the application object

Methods

cacheResponse()  : BaseResponse|bool
ping()  : BaseResponse
This is just for checking the api status
processor()  : BaseResponse
This is the sole action to be called in the routes file. It processes the request and returns the response
processServices()  : BaseResponse
This method checks the request data for the `SERVICE` key and processes the service based on it

Properties

Methods


        
On this page

Search results