PHP Класс Elgg\Application\CacheHandler

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$extensions
$utf8_content_types

Открытые методы

Метод Описание
__construct ( Application $app, Config $config, array $server_vars ) Constructor
handleRequest ( array $path ) : void Handle a request for a cached view
parsePath ( string $path ) : array Parse a request

Защищенные методы

Метод Описание
getContentType ( string $view ) : string | null Get the content type
getProcessedView ( string $view, string $viewtype ) : string Get the contents of a view for caching
handle304 ( string $etag ) : void Send a 304 and exit() if the ETag matches the request
isCacheableView ( string $view ) : boolean Is the view cacheable. Language views are handled specially.
renderView ( string $view, string $viewtype ) : string Render a view for caching. Language views are handled specially.
send403 ( string $msg = 'Cache error: bad request' ) : void Send an error message to requestor
sendCacheHeaders ( string $etag ) : void Send cache headers
sendRevalidateHeaders ( string $etag ) : void Send revalidate cache headers
setupSimplecache ( ) : void Do a minimal engine load

Приватные методы

Метод Описание
getViewFileType ( string $view ) : string Returns the type of output expected from the view.

Описание методов

__construct() публичный метод

Constructor
public __construct ( Application $app, Config $config, array $server_vars )
$app Elgg\Application Elgg Application
$config Elgg\Config Elgg configuration
$server_vars array Server vars

getContentType() защищенный метод

Get the content type
protected getContentType ( string $view ) : string | null
$view string The view name
Результат string | null

getProcessedView() защищенный метод

Get the contents of a view for caching
См. также: CacheHandler::renderView()
protected getProcessedView ( string $view, string $viewtype ) : string
$view string The view name
$viewtype string The viewtype
Результат string

handle304() защищенный метод

Send a 304 and exit() if the ETag matches the request
protected handle304 ( string $etag ) : void
$etag string ETag value
Результат void

handleRequest() публичный метод

Handle a request for a cached view
public handleRequest ( array $path ) : void
$path array URL path
Результат void

isCacheableView() защищенный метод

Is the view cacheable. Language views are handled specially.
protected isCacheableView ( string $view ) : boolean
$view string View name
Результат boolean

parsePath() публичный метод

Parse a request
public parsePath ( string $path ) : array
$path string Request URL path
Результат array Cache parameters (empty array if failure)

renderView() защищенный метод

Render a view for caching. Language views are handled specially.
protected renderView ( string $view, string $viewtype ) : string
$view string The view name
$viewtype string The viewtype
Результат string

send403() защищенный метод

Send an error message to requestor
protected send403 ( string $msg = 'Cache error: bad request' ) : void
$msg string Optional message text
Результат void

sendCacheHeaders() защищенный метод

Send cache headers
protected sendCacheHeaders ( string $etag ) : void
$etag string ETag value
Результат void

sendRevalidateHeaders() защищенный метод

Send revalidate cache headers
protected sendRevalidateHeaders ( string $etag ) : void
$etag string ETag value
Результат void

setupSimplecache() защищенный метод

Do a minimal engine load
protected setupSimplecache ( ) : void
Результат void

Описание свойств

$extensions публичное статическое свойство

public static $extensions

$utf8_content_types публичное статическое свойство

public static $utf8_content_types