‪TYPO3CMS  10.4
TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration Class Reference

Public Member Functions

 __construct (FileLocation $fileLocation, string $fileName, bool $fail=false)
 
 buildContent ()
 
 matches (ResponseInterface $response)
 
StatusMessage[] getMismatches (ResponseInterface $response)
 
 withExpectedContentType (string $contentType)
 
 withUnexpectedContentType (string $contentType)
 
 withExpectedContent (string $content)
 
 withUnexpectedContent (string $content)
 
 withHandler (\Closure $handler)
 
 withBuildFlags (int $buildFlags)
 
FileLocation getFileLocation ()
 
string getFileName ()
 
string getUrl ()
 
bool shallFail ()
 
string null getExpectedContentType ()
 
string null getUnexpectedContentType ()
 
string null getExpectedContent ()
 
string null getUnexpectedContent ()
 

Public Attributes

const FLAG_BUILD_HTML = 1
 
const FLAG_BUILD_PHP = 2
 
const FLAG_BUILD_SVG = 4
 
const FLAG_BUILD_HTML_DOCUMENT = 64
 
const FLAG_BUILD_SVG_DOCUMENT = 128
 

Protected Attributes

FileLocation $fileLocation
 
string $fileName
 
bool $fail
 
string null $expectedContentType
 
string null $unexpectedContentType
 
string null $expectedContent
 
string null $unexpectedContent
 
Closure $handler
 
int $buildFlags = self::FLAG_BUILD_HTML | self::FLAG_BUILD_HTML_DOCUMENT
 

Detailed Description

Declares contents on server response expectations on a static file.

should only be used from within TYPO3 Core

Definition at line 27 of file FileDeclaration.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::__construct ( FileLocation  $fileLocation,
string  $fileName,
bool  $fail = false 
)

Member Function Documentation

◆ buildContent()

TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::buildContent ( )

Definition at line 78 of file FileDeclaration.php.

◆ getExpectedContent()

string null TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::getExpectedContent ( )

◆ getExpectedContentType()

string null TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::getExpectedContentType ( )

◆ getFileLocation()

FileLocation TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::getFileLocation ( )

◆ getFileName()

string TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::getFileName ( )

◆ getMismatches()

StatusMessage [] TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::getMismatches ( ResponseInterface  $response)

◆ getUnexpectedContent()

string null TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::getUnexpectedContent ( )

◆ getUnexpectedContentType()

string null TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::getUnexpectedContentType ( )

◆ getUrl()

string TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::getUrl ( )

◆ matches()

TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::matches ( ResponseInterface  $response)

◆ shallFail()

bool TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::shallFail ( )

◆ withBuildFlags()

TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::withBuildFlags ( int  $buildFlags)

◆ withExpectedContent()

TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::withExpectedContent ( string  $content)

Definition at line 172 of file FileDeclaration.php.

◆ withExpectedContentType()

TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::withExpectedContentType ( string  $contentType)

Definition at line 158 of file FileDeclaration.php.

◆ withHandler()

TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::withHandler ( \Closure  $handler)

◆ withUnexpectedContent()

TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::withUnexpectedContent ( string  $content)

Definition at line 179 of file FileDeclaration.php.

◆ withUnexpectedContentType()

TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::withUnexpectedContentType ( string  $contentType)

Definition at line 165 of file FileDeclaration.php.

Member Data Documentation

◆ $buildFlags

int TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::$buildFlags = self::FLAG_BUILD_HTML | self::FLAG_BUILD_HTML_DOCUMENT
protected

◆ $expectedContent

string null TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::$expectedContent
protected

◆ $expectedContentType

string null TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::$expectedContentType
protected

◆ $fail

bool TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::$fail
protected

◆ $fileLocation

FileLocation TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::$fileLocation
protected

◆ $fileName

◆ $handler

Closure TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::$handler
protected

◆ $unexpectedContent

string null TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::$unexpectedContent
protected

◆ $unexpectedContentType

string null TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::$unexpectedContentType
protected

◆ FLAG_BUILD_HTML

const TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::FLAG_BUILD_HTML = 1

Definition at line 29 of file FileDeclaration.php.

◆ FLAG_BUILD_HTML_DOCUMENT

const TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::FLAG_BUILD_HTML_DOCUMENT = 64

◆ FLAG_BUILD_PHP

const TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::FLAG_BUILD_PHP = 2

◆ FLAG_BUILD_SVG

const TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::FLAG_BUILD_SVG = 4

◆ FLAG_BUILD_SVG_DOCUMENT

const TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileDeclaration::FLAG_BUILD_SVG_DOCUMENT = 128