Default cache control.
public array $__defaultCacheControlDirectives = array (
'public' => false,
'max-age' => 300,
)
Public with max age is 5 minutes
Charset map.
private array $charsetMap = array (
'utf-8' => 'EFBBBF',
'utf-16' => 'FEFF',
'utf-16be' => 'FEFF',
'utf-16le' => 'FFFE',
'utf-32' => '0000FEFF',
'utf-32be' => '0000FEFF',
'utf-32le' => 'FFFE0000',
)
This is a map of charsets to their respective byte-order-marks.
\Hazaar\File Constructor.
public __construct(string $file, ?Manager $manager): void
Parameter | Type | Description |
---|
$file | string | either a string filename to use or a \Hazaar\File object |
$manager | Manager | |
public initialiseCacheControl(): bool
public load(string $file, ?Manager $manager): bool
Parameter | Type | Description |
---|
$file | string | |
$manager | Manager | |
public setContent(mixed $data, ?string $contentType): void
Parameter | Type | Description |
---|
$data | mixed | |
$contentType | string | |
public getContent(): string
public getContentLength(): int
public hasContent(): bool
public setUnmodified(DateTime $ifModifiedSince): bool
Parameter | Type | Description |
---|
$ifModifiedSince | DateTime | |
public setLastModified(int $fmtime): void
Parameter | Type | Description |
---|
$fmtime | int | |
public getLastModified(): string
public (string $pattern, ?array $matches, int $flags = 0, int $offset = 0): int
Parameter | Type | Description |
---|
$pattern | string | |
$matches | array | |
$flags | int | |
$offset | int | |
public replace(string $pattern, string $replacement, int $limit = -1, ?int $count): void
Parameter | Type | Description |
---|
$pattern | string | |
$replacement | string | |
$limit | int | |
$count | int | |
public setDownloadable(bool $toggle = true, ?string $filename): void
Parameter | Type | Description |
---|
$toggle | bool | |
$filename | string | |
public setContentType(?string $type): void
Parameter | Type | Description |
---|
$type | string | |
public getContentType(): string
public getFile(): FileObject
public fileExists(): bool
Generated by Hazaar API Doc Generator