TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AbstractNode Class Reference
Inheritance diagram for AbstractNode:
DirectoryNode FileNode LinkNode RootNode

Public Member Functions

 getName ()
 
 getAbsolutePath ()
 
 isWritable ()
 

Protected Member Functions

 getTargetPermission ()
 
 setTargetPermission ($permission)
 
 getChildren ()
 
 getParent ()
 
 exists ()
 
 fixPermission ()
 
 isPermissionCorrect ()
 
 getCurrentPermission ()
 
 isWindowsOs ()
 
 getRelativePathBelowSiteRoot ($path=null)
 

Protected Attributes

 $name = ''
 
 $targetPermission = null
 
 $parent = null
 
 $children = array()
 

Detailed Description

Abstract node implements common methods

Definition at line 22 of file install/Classes/FolderStructure/AbstractNode.php.

Member Function Documentation

exists ( )
protected
fixPermission ( )
protected
getAbsolutePath ( )
getChildren ( )
protected

Get children

Returns
array

Definition at line 86 of file install/Classes/FolderStructure/AbstractNode.php.

References AbstractNode\$children.

getCurrentPermission ( )
protected

Get current permission of node

Returns
string, eg. 2775 for dirs, 0664 for files

Definition at line 188 of file install/Classes/FolderStructure/AbstractNode.php.

References AbstractNode\getAbsolutePath().

Referenced by FileNode\getSelfStatus(), DirectoryNode\getSelfStatus(), and AbstractNode\isPermissionCorrect().

getName ( )

Get name

Returns
string Name

Definition at line 49 of file install/Classes/FolderStructure/AbstractNode.php.

References AbstractNode\$name.

getParent ( )
protected

Get parent

Returns
NULL|NodeInterface

Definition at line 96 of file install/Classes/FolderStructure/AbstractNode.php.

References AbstractNode\$parent.

Referenced by AbstractNode\getAbsolutePath(), and AbstractNode\isWritable().

getRelativePathBelowSiteRoot (   $path = null)
protected

Cut off PATH_site from given path

Parameters
string$pathGiven path
Returns
string Relative path, but beginning with /
Exceptions
Exception\InvalidArgumentException

Definition at line 214 of file install/Classes/FolderStructure/AbstractNode.php.

References AbstractNode\getAbsolutePath().

Referenced by DirectoryNode\createDirectory(), FileNode\createFile(), AbstractNode\fixPermission(), FileNode\fixSelf(), DirectoryNode\fixSelf(), FileNode\getSelfStatus(), DirectoryNode\getSelfStatus(), LinkNode\getStatus(), DirectoryNode\getStatus(), FileNode\getStatus(), and FileNode\setContent().

getTargetPermission ( )
protected

Get target permission

Make sure to call octdec on the value when passing this to chmod

Returns
string Permissions as a 4 character octal string, i.e. 2775 or 0644

Definition at line 61 of file install/Classes/FolderStructure/AbstractNode.php.

References AbstractNode\$targetPermission.

Referenced by AbstractNode\fixPermission(), FileNode\getSelfStatus(), DirectoryNode\getSelfStatus(), and AbstractNode\isPermissionCorrect().

isPermissionCorrect ( )
protected
isWindowsOs ( )
protected

Returns TRUE if OS is windows

Returns
bool TRUE on windows

Definition at line 199 of file install/Classes/FolderStructure/AbstractNode.php.

Referenced by RootNode\__construct(), LinkNode\getStatus(), and AbstractNode\isPermissionCorrect().

isWritable ( )

Current node is writable if parent is writable

Returns
bool TRUE if parent is writable

Definition at line 116 of file install/Classes/FolderStructure/AbstractNode.php.

References AbstractNode\getParent().

Referenced by FileNode\getSelfStatus().

setTargetPermission (   $permission)
protected

Set target permission

Parameters
string$permissionPermissions as a 4 character octal string, i.e. 2775 or 0644
Returns
void

Definition at line 73 of file install/Classes/FolderStructure/AbstractNode.php.

Referenced by RootNode\__construct(), DirectoryNode\__construct(), and FileNode\__construct().

Member Data Documentation

$children = array()
protected
$name = ''
protected
$parent = null
protected
$targetPermission = null
protected