File
extends Base
in package
implements
Document
Send a file from the filesystem.
An MVC style implementation of the render_file() function.
Supports HTTP headers: "If-Modified-Since" and "If-None-Match".
Interfaces, Classes, Traits and Enums
- Document
- A Document is a standalone component, that can't be wrapped inside another component.
Table of Contents
- $headers : mixed
- $error : mixed
- $etag : mixed
- $fileContents : mixed
- $filename : mixed
- $notModified : mixed
- __call() : mixed
- Report that the $method doesn't exist.
- __callStatic() : mixed
- Report that the $method doesn't exist.
- __construct() : mixed
- __get() : mixed
- Report that $property doesn't exist.
- __set() : mixed
- Report that $property doesn't exist and set the property to the given $value.
- __toString() : string
- The object is used as an string.
- getHeaders() : array<string|int, mixed>
- The headers for this type of document.
- isDocument() : bool
- Determines if the component is a Document.
- render() : mixed
Properties
$headers
public
mixed
$headers
= []
$error
private
mixed
$error
= false
$etag
private
mixed
$etag
$fileContents
private
mixed
$fileContents
$filename
private
mixed
$filename
$notModified
private
mixed
$notModified
= false
Methods
__call()
Report that the $method doesn't exist.
public
__call(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>
Return values
mixed —__callStatic()
Report that the $method doesn't exist.
public
static __callStatic(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>
Return values
mixed —__construct()
public
__construct(mixed $filename[, array<string|int, mixed> $options = ['etag' => false] ]) : mixed
Parameters
- $filename : mixed
- $options : array<string|int, mixed> = ['etag' => false]
-
['etag'=> bool, 'file_get_contents' => bool]
Return values
mixed —__get()
Report that $property doesn't exist.
public
__get(string $property) : mixed
Parameters
- $property : string
Return values
mixed —__set()
Report that $property doesn't exist and set the property to the given $value.
public
__set(string $property, mixed $value) : mixed
Parameters
- $property : string
- $value : mixed
Return values
mixed —__toString()
The object is used as an string.
public
__toString() : string
Return values
string —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
Return values
bool —render()
public
render() : mixed