\Pydio\Core\ControllerHTMLWriter

Static functions for generating HTML.

Summary

Methods
Properties
Constants
getDocFile()
internetExplorerMainDocumentHeader()
charsetHeader()
javascriptErrorHandler()
responseWithInlineHeaders()
responseWithAttachmentsHeaders()
emitInlineHeaders()
emitAttachmentsHeaders()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
encodeAttachmentName()
generateAttachmentsHeader()
generateInlineHeaders()
No private properties found
N/A

Methods

getDocFile()

getDocFile(string  $docFileName) : string

Replace the doc files keywords

Parameters

string $docFileName

Returns

string

internetExplorerMainDocumentHeader()

internetExplorerMainDocumentHeader(\Psr\Http\Message\ResponseInterface  $response = null) 

Send a simple Content-type header

Parameters

\Psr\Http\Message\ResponseInterface $response

charsetHeader()

charsetHeader(string  $type = 'text/html', string  $charset = 'UTF-8') : void

Send a simple Content-type header

Parameters

string $type
string $charset

javascriptErrorHandler()

javascriptErrorHandler(  $errorType,   $errorMessage) 

Write directly an error as a javascript instruction

Parameters

$errorType
$errorMessage

responseWithInlineHeaders()

responseWithInlineHeaders(\Psr\Http\Message\ResponseInterface  $response,   $attachName,   $fileSize,   $mimeType) : \Psr\Http\Message\ResponseInterface

Parameters

\Psr\Http\Message\ResponseInterface $response
$attachName
$fileSize
$mimeType

Returns

\Psr\Http\Message\ResponseInterface

responseWithAttachmentsHeaders()

responseWithAttachmentsHeaders(\Psr\Http\Message\ResponseInterface  $response,   $attachmentName,   $dataSize, boolean  $isFile = true, boolean  $gzip = false) : null|\Psr\Http\Message\ResponseInterface

Parameters

\Psr\Http\Message\ResponseInterface $response
$attachmentName
$dataSize
boolean $isFile
boolean $gzip

Returns

null|\Psr\Http\Message\ResponseInterface

emitInlineHeaders()

emitInlineHeaders(  $attachName,   $fileSize,   $mimeType) 

Parameters

$attachName
$fileSize
$mimeType

emitAttachmentsHeaders()

emitAttachmentsHeaders(  $attachmentName,   $dataSize, boolean  $isFile = true, boolean  $gzip = false) 

Parameters

$attachmentName
$dataSize
boolean $isFile
boolean $gzip

encodeAttachmentName()

encodeAttachmentName(string  $name) : string

Correctly encode name for attachment header

Parameters

string $name

Returns

string

generateAttachmentsHeader()

generateAttachmentsHeader(string  $attachmentName, integer  $dataSize, boolean  $isFile = true, boolean  $gzip = false, \Psr\Http\Message\ResponseInterface  $response = null) : \Psr\Http\Message\ResponseInterface|null

Parameters

string $attachmentName
integer $dataSize
boolean $isFile
boolean $gzip

If true, make sure the $dataSize is the size of the ENCODED data.

\Psr\Http\Message\ResponseInterface $response

Response to update instead of generating headers

Returns

\Psr\Http\Message\ResponseInterface|null —

Update response interface if passed by argument

generateInlineHeaders()

generateInlineHeaders(string  $attachName, integer  $fileSize, string  $mimeType, \Psr\Http\Message\ResponseInterface  $response = null) : \Psr\Http\Message\ResponseInterface

Generate correct headers

Parameters

string $attachName
integer $fileSize
string $mimeType
\Psr\Http\Message\ResponseInterface $response

Returns

\Psr\Http\Message\ResponseInterface