TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\IO\PharStreamWrapperInterceptor Class Reference
Inheritance diagram for TYPO3\CMS\Core\IO\PharStreamWrapperInterceptor:

Public Member Functions

 assert ($path, $command)
 

Protected Member Functions

 isAllowed ($path)
 
 normalizePath ($path)
 
 removePharPrefix ($path)
 
 determineBaseFile ($path)
 

Detailed Description

Definition at line 21 of file PharStreamWrapperInterceptor.php.

Member Function Documentation

◆ assert()

TYPO3\CMS\Core\IO\PharStreamWrapperInterceptor::assert (   $path,
  $command 
)

Asserts the given path of a Phar file is located in a valid path in typo3conf/ext/* of the local TYPO3 installation.

Parameters
string$path
string$command
Returns
bool
Exceptions
Exception

Definition at line 32 of file PharStreamWrapperInterceptor.php.

References TYPO3\CMS\Core\IO\PharStreamWrapperInterceptor\isAllowed().

◆ determineBaseFile()

TYPO3\CMS\Core\IO\PharStreamWrapperInterceptor::determineBaseFile (   $path)
protected

Determines base file that can be accessed using the regular file system. For e.g. "phar:///home/user/bundle.phar/content.txt" that would result into "/home/user/bundle.phar".

Parameters
string$path
Returns
string|null

Definition at line 102 of file PharStreamWrapperInterceptor.php.

References TYPO3\CMS\Core\IO\PharStreamWrapperInterceptor\normalizePath().

Referenced by TYPO3\CMS\Core\IO\PharStreamWrapperInterceptor\isAllowed().

◆ isAllowed()

◆ normalizePath()

TYPO3\CMS\Core\IO\PharStreamWrapperInterceptor::normalizePath (   $path)
protected

Normalizes a path, removes phar:// prefix, fixes Windows directory separators. Result is without trailing slash.

Parameters
string$path
Returns
string

Definition at line 73 of file PharStreamWrapperInterceptor.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\fixWindowsFilePath(), TYPO3\CMS\Core\Utility\PathUtility\getCanonicalPath(), and TYPO3\CMS\Core\IO\PharStreamWrapperInterceptor\removePharPrefix().

Referenced by TYPO3\CMS\Core\IO\PharStreamWrapperInterceptor\determineBaseFile().

◆ removePharPrefix()

TYPO3\CMS\Core\IO\PharStreamWrapperInterceptor::removePharPrefix (   $path)
protected
Parameters
string$path
Returns
string

Definition at line 89 of file PharStreamWrapperInterceptor.php.

Referenced by TYPO3\CMS\Core\IO\PharStreamWrapperInterceptor\normalizePath().