AbstractNode
Abstract node implements common methods
This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.
Table of Contents
Properties
- $children : array<string|int, mixed>
- $name : string
- $parent : NodeInterface|null
- $targetPermission : string|null
Methods
- getAbsolutePath() : string
- Get absolute path of node
- getName() : string
- Get name
- isWritable() : bool
- Current node is writable if parent is writable
- exists() : bool
- Checks if node exists.
- fixPermission() : FlashMessage
- Fix permission if they are not equal to target permission
- getChildren() : array<string|int, mixed>
- Get children
- getCurrentPermission() : string
- Get current permission of node
- getParent() : NodeInterface|null
- Get parent
- getRelativePathBelowSiteRoot() : string
- Cut off project path from given path
- getTargetPermission() : string
- Get target permission
- isPermissionCorrect() : bool
- Checks if current permission are identical to target permission
- isWindowsOs() : bool
- Returns TRUE if OS is windows
- setTargetPermission() : mixed
- Set target permission
Properties
$children
protected
array<string|int, mixed>
$children
= []
Directories and root may have children, files and link always empty array
$name
protected
string
$name
= ''
Name
$parent
protected
NodeInterface|null
$parent
Parent object of this structure node
$targetPermission
protected
string|null
$targetPermission
Target permissions for unix, eg. '2775' or '0664' (4 characters string)
Methods
getAbsolutePath()
Get absolute path of node
public
getAbsolutePath() : string
Return values
stringgetName()
Get name
public
getName() : string
Return values
string —Name
isWritable()
Current node is writable if parent is writable
public
isWritable() : bool
Return values
bool —TRUE if parent is writable
exists()
Checks if node exists.
protected
exists() : bool
Returns TRUE if it is there, even if it is only a link. Does not check the type!
Return values
boolfixPermission()
Fix permission if they are not equal to target permission
protected
fixPermission() : FlashMessage
Tags
Return values
FlashMessagegetChildren()
Get children
protected
getChildren() : array<string|int, mixed>
Return values
array<string|int, mixed>getCurrentPermission()
Get current permission of node
protected
getCurrentPermission() : string
Return values
string —eg. 2775 for dirs, 0664 for files
getParent()
Get parent
protected
getParent() : NodeInterface|null
Return values
NodeInterface|nullgetRelativePathBelowSiteRoot()
Cut off project path from given path
protected
getRelativePathBelowSiteRoot([string $path = null ]) : string
Parameters
- $path : string = null
-
Given path
Tags
Return values
string —Relative path, but beginning with /
getTargetPermission()
Get target permission
protected
getTargetPermission() : string
Make sure to call octdec on the value when passing this to chmod
Return values
string —Permissions as a 4 character octal string, i.e. 2775 or 0644
isPermissionCorrect()
Checks if current permission are identical to target permission
protected
isPermissionCorrect() : bool
Return values
boolisWindowsOs()
Returns TRUE if OS is windows
protected
isWindowsOs() : bool
Return values
bool —TRUE on windows
setTargetPermission()
Set target permission
protected
setTargetPermission(string $permission) : mixed
Parameters
- $permission : string
-
Permissions as a 4 character octal string, i.e. 2775 or 0644