Sledgehammer Framework

Document extends Component

A Document is a standalone component, that can't be wrapped inside another component.

Example documents are: Sledgehammer\Core\Json, Sledgehammer\Mvc\Document\File, Sledgehammer\Graphics\Image and Sledgehammer\Mvc\Document\Page.

Table of Contents

getHeaders()  : array<string|int, mixed>
The headers for this type of document.
isDocument()  : bool
Determines if the component is a Document.
render()  : mixed
Render the view to the client (echo statements).

Methods

getHeaders()

The headers for this type of document.

public getHeaders() : array<string|int, mixed>

Must include 'http' headers.

Return values
array<string|int, mixed>

isDocument()

Determines if the component is a Document.

public isDocument() : bool

This allows errors to be wrapped in a layout.

Return values
bool

render()

Render the view to the client (echo statements).

public render() : mixed
Return values
mixed

Search results