Arikaim CMS

Request
in package

Request helpers

Table of Contents

Methods

acceptJson()  : bool
Return true if request accept json
acceptXml()  : bool
Return true if request accept xml
getBrowserName()  : string|null
Get browser name
getContentType()  : mixed
Return content type
isHtmlContentType()  : bool
Return true if content type is html
isJsonContentType()  : bool
Return true if content type is json
isXmlContentType()  : bool
Return true if content type is xml
parseAcceptHeader()  : array<string|int, mixed>
Parse accept header

Methods

acceptJson()

Return true if request accept json

public static acceptJson(ServerRequestInterface $request) : bool
Parameters
$request : ServerRequestInterface
Return values
bool

acceptXml()

Return true if request accept xml

public static acceptXml(ServerRequestInterface $request) : bool
Parameters
$request : ServerRequestInterface
Return values
bool

getBrowserName()

Get browser name

public static getBrowserName() : string|null
Return values
string|null

getContentType()

Return content type

public static getContentType(ServerRequestInterface $request[, string|null $default = 'text/html' ]) : mixed
Parameters
$request : ServerRequestInterface
$default : string|null = 'text/html'

isHtmlContentType()

Return true if content type is html

public static isHtmlContentType(ServerRequestInterface $request) : bool
Parameters
$request : ServerRequestInterface
Return values
bool

isJsonContentType()

Return true if content type is json

public static isJsonContentType(ServerRequestInterface $request) : bool
Parameters
$request : ServerRequestInterface
Return values
bool

isXmlContentType()

Return true if content type is xml

public static isXmlContentType(ServerRequestInterface $request) : bool
Parameters
$request : ServerRequestInterface
Return values
bool

parseAcceptHeader()

Parse accept header

public static parseAcceptHeader(ServerRequestInterface $request) : array<string|int, mixed>
Parameters
$request : ServerRequestInterface
Return values
array<string|int, mixed>

        
On this page

Search results