Heratio Framework API Reference

SfResponseAdapter
in package

Standalone sfWebResponse adapter for when Symfony is not loaded.

Captures setTitle, setContentType, setHttpHeader, setStatusCode, etc. so that action classes written for sfWebResponse work seamlessly in standalone mode (heratio.php). The captured state is converted into an Illuminate\Http\Response at the end of the dispatch cycle.

Table of Contents

Methods

addJavascript()  : void
addMeta()  : void
addStylesheet()  : void
getContent()  : string
getContentType()  : string
getHttpHeader()  : mixed
getHttpHeaders()  : array<string|int, mixed>
getMetas()  : array<string|int, mixed>
getStatusCode()  : int
getTitle()  : string
hasContent()  : bool
Check if content has been set.
setContent()  : void
setContentType()  : void
setHttpHeader()  : void
setStatusCode()  : void
setTitle()  : void
toIlluminateResponse()  : Response
Convert captured state into an Illuminate Response.

Methods

addJavascript()

public addJavascript(string $file[, string $position = '' ][, array<string|int, mixed> $options = [] ]) : void
Parameters
$file : string
$position : string = ''
$options : array<string|int, mixed> = []

addMeta()

public addMeta(string $key, string $value[, bool $replace = true ][, bool $escape = true ]) : void
Parameters
$key : string
$value : string
$replace : bool = true
$escape : bool = true

addStylesheet()

public addStylesheet(string $file[, string $position = '' ][, array<string|int, mixed> $options = [] ]) : void
Parameters
$file : string
$position : string = ''
$options : array<string|int, mixed> = []

getHttpHeader()

public getHttpHeader(string $name[, mixed $default = null ]) : mixed
Parameters
$name : string
$default : mixed = null

getHttpHeaders()

public getHttpHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>

getMetas()

public getMetas() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasContent()

Check if content has been set.

public hasContent() : bool
Return values
bool

setContent()

public setContent(string $content) : void
Parameters
$content : string

setContentType()

public setContentType(string $contentType) : void
Parameters
$contentType : string

setHttpHeader()

public setHttpHeader(string $name, string $value[, bool $replace = true ]) : void
Parameters
$name : string
$value : string
$replace : bool = true

setStatusCode()

public setStatusCode(int $code) : void
Parameters
$code : int

setTitle()

public setTitle(string $title) : void
Parameters
$title : string

toIlluminateResponse()

Convert captured state into an Illuminate Response.

public toIlluminateResponse() : Response
Return values
Response

        
On this page

Search results