‪TYPO3CMS  ‪main
TYPO3\CMS\Install\FolderStructure\FileNode Class Reference
Inheritance diagram for TYPO3\CMS\Install\FolderStructure\FileNode:
TYPO3\CMS\Install\FolderStructure\AbstractNode TYPO3\CMS\Install\FolderStructure\NodeInterface

Public Member Functions

 __construct (array $structure, NodeInterface $parent=null)
 
FlashMessage[] getStatus ()
 
FlashMessage[] fix ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Install\FolderStructure\AbstractNode
string getName ()
 
string getAbsolutePath ()
 
bool isWritable ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Install\FolderStructure\NodeInterface
string getName ()
 
string getAbsolutePath ()
 
bool isWritable ()
 

Protected Member Functions

FlashMessage[] fixSelf ()
 
 createFile ()
 
FlashMessage[] getSelfStatus ()
 
bool isContentCorrect ()
 
 setContent ()
 
bool isFile ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Install\FolderStructure\AbstractNode
string getTargetPermission ()
 
 setTargetPermission ($permission)
 
array getChildren ()
 
NodeInterface null getParent ()
 
bool exists ()
 
 fixPermission ()
 
bool isPermissionCorrect ()
 
string getCurrentPermission ()
 
bool isWindowsOs ()
 
string getRelativePathBelowSiteRoot ($path=null)
 

Protected Attributes

string $targetPermission = '0664'
 
string null $targetContent
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Install\FolderStructure\AbstractNode
string $name = ''
 
string null $targetPermission
 
NodeInterface null $parent
 
array $children = array( )
 

Detailed Description

A file

This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.

Definition at line 26 of file FileNode.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Install\FolderStructure\FileNode::__construct ( array  $structure,
NodeInterface  $parent = null 
)

Implement constructor

Parameters
array$structure‪Structure array
NodeInterface$parent‪Parent object
Exceptions
Exception

Implements TYPO3\CMS\Install\FolderStructure\NodeInterface.

Definition at line 43 of file FileNode.php.

References TYPO3\CMS\Install\FolderStructure\AbstractNode\$parent, and TYPO3\CMS\Install\FolderStructure\AbstractNode\setTargetPermission().

Member Function Documentation

◆ createFile()

◆ fix()

FlashMessage [] TYPO3\CMS\Install\FolderStructure\FileNode::fix ( )

Fix structure

If there is nothing to fix, returns an empty array

Returns
‪FlashMessage[]

Implements TYPO3\CMS\Install\FolderStructure\NodeInterface.

Definition at line 123 of file FileNode.php.

References TYPO3\CMS\Install\FolderStructure\FileNode\fixSelf().

◆ fixSelf()

◆ getSelfStatus()

◆ getStatus()

FlashMessage [] TYPO3\CMS\Install\FolderStructure\FileNode::getStatus ( )

Get own status Returns warning if file not exists Returns error if file exists but content is not as expected (can / shouldn't be fixed)

Returns
‪FlashMessage[]

Implements TYPO3\CMS\Install\FolderStructure\NodeInterface.

Definition at line 101 of file FileNode.php.

References TYPO3\CMS\Install\FolderStructure\AbstractNode\exists(), TYPO3\CMS\Install\FolderStructure\AbstractNode\getRelativePathBelowSiteRoot(), and TYPO3\CMS\Install\FolderStructure\FileNode\getSelfStatus().

◆ isContentCorrect()

bool TYPO3\CMS\Install\FolderStructure\FileNode::isContentCorrect ( )
protected

Compare current file content with target file content

Exceptions
Exception‪If file does not exist
Returns
‪bool TRUE if current and target file content are identical

Definition at line 251 of file FileNode.php.

References TYPO3\CMS\Install\FolderStructure\AbstractNode\getAbsolutePath().

Referenced by TYPO3\CMS\Install\FolderStructure\FileNode\getSelfStatus().

◆ isFile()

bool TYPO3\CMS\Install\FolderStructure\FileNode::isFile ( )
protected

◆ setContent()

TYPO3\CMS\Install\FolderStructure\FileNode::setContent ( )
protected

Member Data Documentation

◆ $targetContent

string null TYPO3\CMS\Install\FolderStructure\FileNode::$targetContent
protected

Target content of file. If NULL, target content is ignored

Definition at line 34 of file FileNode.php.

◆ $targetPermission

string TYPO3\CMS\Install\FolderStructure\FileNode::$targetPermission = '0664'
protected

Default for files is octal 0664 == decimal 436

Definition at line 30 of file FileNode.php.