PHP Class Elgg\Application\CacheHandler

Afficher le fichier Open project: elgg/elgg

Méthodes publiques

Свойство Type Description
$extensions
$utf8_content_types

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
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

Private Methods

Méthode Description
getViewFileType ( string $view ) : string Returns the type of output expected from the view.

Method Details

__construct() public méthode

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() protected méthode

Get the content type
protected getContentType ( string $view ) : string | null
$view string The view name
Résultat string | null

getProcessedView() protected méthode

Get the contents of a view for caching
See also: CacheHandler::renderView()
protected getProcessedView ( string $view, string $viewtype ) : string
$view string The view name
$viewtype string The viewtype
Résultat string

handle304() protected méthode

Send a 304 and exit() if the ETag matches the request
protected handle304 ( string $etag ) : void
$etag string ETag value
Résultat void

handleRequest() public méthode

Handle a request for a cached view
public handleRequest ( array $path ) : void
$path array URL path
Résultat void

isCacheableView() protected méthode

Is the view cacheable. Language views are handled specially.
protected isCacheableView ( string $view ) : boolean
$view string View name
Résultat boolean

parsePath() public méthode

Parse a request
public parsePath ( string $path ) : array
$path string Request URL path
Résultat array Cache parameters (empty array if failure)

renderView() protected méthode

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
Résultat string

send403() protected méthode

Send an error message to requestor
protected send403 ( string $msg = 'Cache error: bad request' ) : void
$msg string Optional message text
Résultat void

sendCacheHeaders() protected méthode

Send cache headers
protected sendCacheHeaders ( string $etag ) : void
$etag string ETag value
Résultat void

sendRevalidateHeaders() protected méthode

Send revalidate cache headers
protected sendRevalidateHeaders ( string $etag ) : void
$etag string ETag value
Résultat void

setupSimplecache() protected méthode

Do a minimal engine load
protected setupSimplecache ( ) : void
Résultat void

Property Details

$extensions public_oe static_oe property

public static $extensions

$utf8_content_types public_oe static_oe property

public static $utf8_content_types