BaseJsonPage
extends BasePage
in package
Base for pages rendering a JSON response
Table of Contents
Properties
- $translators : array<string|int, mixed>
- $container : ContainerInterface
- $request : Request|null
- $response : Response
- $route_info : RouteInfo|null
Methods
- __call() : mixed
- {@inheritdoc}
- __construct() : mixed
- BasePage constructor.
- __toString() : string
- toString magic method
- canBeFPC() : bool
- specifies if this controller is eligible for full page cache
- containerCall() : mixed
- call method through container
- containerMake() : mixed
- create object through container
- getApp() : App
- gets app object
- getAppRouteInfo() : RouteInfo|null
- gets route info
- getAppWebsite() : Website|null
- gets current website
- getAssets() : Manager
- gets assets manager
- getCache() : Manager
- get cache manager
- getContainer() : ContainerInterface
- gets container object
- getControllerUrl() : string
- gets current controller url
- getCrudRouter() : Crud
- gets crud service
- getDb() : Database
- gets db object
- getDebugbar() : StandardDebugBar
- gets debugbar object
- getDestParam() : string
- gets the destination param
- getEnv() : mixed
- gets env variable
- getEventManager() : SharedEventEmitter
- gets events manager service
- getGoogleAuthenticator() : PHPGangsta_GoogleAuthenticator
- gets google authenticator service
- getGuzzle() : Client
- gets guzzle service
- getHtmlRenderer() : HtmlPartsRenderer
- gets html renderer service
- getIcons() : Icons
- gets icons service
- getImagine() : Imagine
- gets imagine service
- getLog() : Logger
- gets log object
- getMailer() : Mailer
- gets mailer service
- getPageRouteName() : string
- gets controller route name
- getPdo() : PDO
- gets PDO object
- getRedis() : Manager
- gets redis service
- getRequest() : Request
- get request object
- getRouteInfo() : RouteInfo|null
- get route_info
- getRouteName() : string
- gets current route name
- getRouters() : array<string|int, mixed>
- gets routers
- getSchema() : Schema
- gets schema object
- getSearch() : Manager
- gets search service
- getSesMailer() : SesClient
- gets SES mailer service
- getSiteData() : SiteData
- gets site data service
- getSmtpMailer() : Swift_Mailer
- gets SMTP mailer service
- getTemplates() : Engine
- gets plates engine object
- getTranslator() : Translator
- gets translator
- getUrl() : string
- gets url by route_name and params
- getUtils() : Globals
- gets global utils service
- getWebhooksRouter() : Webhooks
- gets webhooks service
- getWebRouter() : Web
- gets routing service
- getZip() : Zip
- gets zip service
- isEnabled() : bool
- determines if route is available for router
- process() : Response
- controller action
- renderPage() : Response|self
- controller entrypoint
- requestUrl() : string|bool
- executes an http request
- setRouteInfo() : BasePage
- set route info
- beforeRender() : Response|self
- before render hook
- doRedirect() : RedirectResponse
- returns a redirect object
- getJsonData() : mixed
- gets JSON data
- getResponse() : Response
- get response object
- getRouteData() : mixed
- gets route data
- getService() : mixed
- gets registered service
Properties
$translators
public
static array<string|int, mixed>
$translators
= []
translators
$container
protected
ContainerInterface
$container
$request
protected
Request|null
$request
= null
$response
protected
Response
$response
response object
$route_info
protected
RouteInfo|null
$route_info
= null
Methods
__call()
{@inheritdoc}
public
__call(string $name, mixed $arguments) : mixed
Parameters
- $name : string
- $arguments : mixed
Tags
__construct()
BasePage constructor.
public
__construct(ContainerInterface $container[, Request $request = null ][, RouteInfo $route_info = null ]) : mixed
Parameters
- $container : ContainerInterface
- $request : Request = null
- $route_info : RouteInfo = null
Tags
__toString()
toString magic method
public
__toString() : string
Return values
string —the form html
canBeFPC()
specifies if this controller is eligible for full page cache
public
canBeFPC() : bool
Return values
boolcontainerCall()
call method through container
public
containerCall(callable $callable[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
- $callable : callable
- $arguments : array<string|int, mixed> = []
containerMake()
create object through container
public
containerMake(string $className[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
- $className : string
- $arguments : array<string|int, mixed> = []
getApp()
gets app object
public
getApp() : App
Tags
Return values
AppgetAppRouteInfo()
gets route info
public
getAppRouteInfo() : RouteInfo|null
Return values
RouteInfo|nullgetAppWebsite()
gets current website
public
getAppWebsite() : Website|null
Return values
Website|nullgetAssets()
gets assets manager
public
getAssets() : Manager
Tags
Return values
ManagergetCache()
get cache manager
public
getCache() : Manager
Tags
Return values
ManagergetContainer()
gets container object
public
getContainer() : ContainerInterface
Return values
ContainerInterfacegetControllerUrl()
gets current controller url
public
getControllerUrl() : string
Tags
Return values
stringgetCrudRouter()
gets crud service
public
getCrudRouter() : Crud
Tags
Return values
CrudgetDb()
gets db object
public
getDb() : Database
Tags
Return values
DatabasegetDebugbar()
gets debugbar object
public
getDebugbar() : StandardDebugBar
Tags
Return values
StandardDebugBargetDestParam()
gets the destination param
public
getDestParam([null $destination_url = null ]) : string
Parameters
- $destination_url : null = null
Tags
Return values
stringgetEnv()
gets env variable
public
getEnv(string $variable[, mixed $default = null ]) : mixed
Parameters
- $variable : string
- $default : mixed = null
Tags
getEventManager()
gets events manager service
public
getEventManager() : SharedEventEmitter
Tags
Return values
SharedEventEmittergetGoogleAuthenticator()
gets google authenticator service
public
getGoogleAuthenticator() : PHPGangsta_GoogleAuthenticator
Tags
Return values
PHPGangsta_GoogleAuthenticatorgetGuzzle()
gets guzzle service
public
getGuzzle() : Client
Tags
Return values
ClientgetHtmlRenderer()
gets html renderer service
public
getHtmlRenderer() : HtmlPartsRenderer
Tags
Return values
HtmlPartsRenderergetIcons()
gets icons service
public
getIcons() : Icons
Tags
Return values
IconsgetImagine()
gets imagine service
public
getImagine() : Imagine
Tags
Return values
ImaginegetLog()
gets log object
public
getLog() : Logger
Tags
Return values
LoggergetMailer()
gets mailer service
public
getMailer() : Mailer
Tags
Return values
MailergetPageRouteName()
gets controller route name
public
static getPageRouteName() : string
Return values
stringgetPdo()
gets PDO object
public
getPdo() : PDO
Tags
Return values
PDOgetRedis()
gets redis service
public
getRedis() : Manager
Tags
Return values
ManagergetRequest()
get request object
public
getRequest() : Request
Return values
RequestgetRouteInfo()
get route_info
public
getRouteInfo() : RouteInfo|null
Return values
RouteInfo|nullgetRouteName()
gets current route name
public
getRouteName() : string
Return values
stringgetRouters()
gets routers
public
getRouters() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getSchema()
gets schema object
public
getSchema() : Schema
Tags
Return values
SchemagetSearch()
gets search service
public
getSearch() : Manager
Tags
Return values
ManagergetSesMailer()
gets SES mailer service
public
getSesMailer() : SesClient
Tags
Return values
SesClientgetSiteData()
gets site data service
public
getSiteData() : SiteData
Tags
Return values
SiteDatagetSmtpMailer()
gets SMTP mailer service
public
getSmtpMailer() : Swift_Mailer
Tags
Return values
Swift_MailergetTemplates()
gets plates engine object
public
getTemplates() : Engine
Tags
Return values
EnginegetTranslator()
gets translator
public
getTranslator([string|null $locale_code = null ]) : Translator
Parameters
- $locale_code : string|null = null
Tags
Return values
TranslatorgetUrl()
gets url by route_name and params
public
getUrl(string $route_name[, array<string|int, mixed> $route_params = [] ]) : string
Parameters
- $route_name : string
- $route_params : array<string|int, mixed> = []
Tags
Return values
stringgetUtils()
gets global utils service
public
getUtils() : Globals
Tags
Return values
GlobalsgetWebhooksRouter()
gets webhooks service
public
getWebhooksRouter() : Webhooks
Tags
Return values
WebhooksgetWebRouter()
gets routing service
public
getWebRouter() : Web
Tags
Return values
WebgetZip()
gets zip service
public
getZip() : Zip
Tags
Return values
ZipisEnabled()
determines if route is available for router
public
static isEnabled() : bool
Return values
boolprocess()
controller action
public
process([RouteInfo|null $route_info = null ][, array<string|int, mixed> $route_data = [] ]) : Response
Parameters
- $route_info : RouteInfo|null = null
- $route_data : array<string|int, mixed> = []
Tags
Return values
ResponserenderPage()
controller entrypoint
public
renderPage([RouteInfo|null $route_info = null ][, array<string|int, mixed> $route_data = [] ]) : Response|self
Parameters
- $route_info : RouteInfo|null = null
- $route_data : array<string|int, mixed> = []
Tags
Return values
Response|selfrequestUrl()
executes an http request
public
requestUrl(string $url[, string $method = 'GET' ][, array<string|int, mixed> $options = [] ]) : string|bool
Parameters
- $url : string
- $method : string = 'GET'
- $options : array<string|int, mixed> = []
Tags
Return values
string|boolsetRouteInfo()
set route info
public
setRouteInfo(RouteInfo $routeInfo) : BasePage
Parameters
- $routeInfo : RouteInfo
Return values
BasePagebeforeRender()
before render hook
protected
beforeRender() : Response|self
Tags
Return values
Response|selfdoRedirect()
returns a redirect object
protected
doRedirect(mixed $url[, array<string|int, mixed> $additional_headers = [] ]) : RedirectResponse
Parameters
- $url : mixed
- $additional_headers : array<string|int, mixed> = []
Return values
RedirectResponsegetJsonData()
gets JSON data
protected
abstract getJsonData() : mixed
getResponse()
get response object
protected
getResponse() : Response
Return values
ResponsegetRouteData()
gets route data
protected
getRouteData([null $var_name = null ]) : mixed
Parameters
- $var_name : null = null
getService()
gets registered service
protected
getService(string $service_key) : mixed
Parameters
- $service_key : string