TYPO3  7.6
Public Member Functions | Protected Member Functions | List of all members
InaccessibleFolder Class Reference
Inheritance diagram for InaccessibleFolder:
Folder FolderInterface ResourceInterface

Public Member Functions

 setName ($name)
 
 getPublicUrl ($relativeToCurrentScript=false)
 
 getFiles ($start=0, $numberOfItems=0, $filterMode=self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS, $recursive=false)
 
 getFileCount (array $filterMethods=array(), $recursive=false)
 
 getSubfolder ($name)
 
 getSubfolders ($start=0, $numberOfItems=0, $filterMode=self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS)
 
 addFile ($localFilePath, $fileName=null, $conflictMode=DuplicationBehavior::CANCEL)
 
 addUploadedFile (array $uploadedFileData, $conflictMode=DuplicationBehavior::CANCEL)
 
 rename ($newName)
 
 delete ($deleteRecursively=true)
 
 createFile ($fileName)
 
 createFolder ($folderName)
 
 copyTo (Folder $targetFolder, $targetFolderName=null, $conflictMode=DuplicationBehavior::RENAME)
 
 moveTo (Folder $targetFolder, $targetFolderName=null, $conflictMode=DuplicationBehavior::RENAME)
 
 hasFile ($name)
 
 hasFolder ($name)
 
 updateProperties (array $properties)
 
 setFileAndFolderNameFilters (array $filters)
 
- Public Member Functions inherited from Folder
 __construct (ResourceStorage $storage, $identifier, $name)
 
 getName ()
 
 getReadablePath ($rootId=null)
 
 setName ($name)
 
 getStorage ()
 
 getIdentifier ()
 
 getHashedIdentifier ()
 
 getCombinedIdentifier ()
 
 getPublicUrl ($relativeToCurrentScript=false)
 
 getFiles ($start=0, $numberOfItems=0, $filterMode=self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS, $recursive=false, $sort= '', $sortRev=false)
 
 getFileCount (array $filterMethods=array(), $recursive=false)
 
 getSubfolder ($name)
 
 getSubfolders ($start=0, $numberOfItems=0, $filterMode=self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS, $recursive=false)
 
 addFile ($localFilePath, $fileName=null, $conflictMode=DuplicationBehavior::CANCEL)
 
 addUploadedFile (array $uploadedFileData, $conflictMode=DuplicationBehavior::CANCEL)
 
 rename ($newName)
 
 delete ($deleteRecursively=true)
 
 createFile ($fileName)
 
 createFolder ($folderName)
 
 copyTo (Folder $targetFolder, $targetFolderName=null, $conflictMode=DuplicationBehavior::RENAME)
 
 moveTo (Folder $targetFolder, $targetFolderName=null, $conflictMode=DuplicationBehavior::RENAME)
 
 hasFile ($name)
 
 hasFolder ($name)
 
 checkActionPermission ($action)
 
 updateProperties (array $properties)
 
 setFileAndFolderNameFilters (array $filters)
 
 getRole ()
 
 getParentFolder ()
 
- Public Member Functions inherited from FolderInterface
 getSubfolders ()
 
 delete ()
 

Protected Member Functions

 throwInaccessibleException ()
 
- Protected Member Functions inherited from Folder
 prepareFiltersInStorage ($filterMode)
 
 restoreBackedUpFiltersInStorage ($backedUpFilters)
 

Additional Inherited Members

- Public Attributes inherited from Folder
const FILTER_MODE_NO_FILTERS = 0
 
const FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS = 1
 
const FILTER_MODE_USE_STORAGE_FILTERS = 2
 
const FILTER_MODE_USE_OWN_FILTERS = 3
 
- Protected Attributes inherited from Folder
 $storage
 
 $identifier
 
 $name
 
 $fileAndFolderNameFilters = array()
 

Detailed Description

A representation for an inaccessible folder.

If a folder has execution rights you can list it's contents despite the access rights on the subfolders. If a subfolder has no rights it has to be shown anyhow, but marked as inaccessible.

Definition at line 25 of file InaccessibleFolder.php.

Member Function Documentation

addFile (   $localFilePath,
  $fileName = null,
  $conflictMode = DuplicationBehavior::CANCEL 
)

Adds a file from the local server disk. If the file already exists and overwriting is disabled,

Parameters
string$localFilePath
string$fileName
string$conflictModea value of the enumeration
Returns
File The file object

Definition at line 136 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

addUploadedFile ( array  $uploadedFileData,
  $conflictMode = DuplicationBehavior::CANCEL 
)

Adds an uploaded file into the Storage.

Parameters
array$uploadedFileDatacontains information about the uploaded file given by $_FILES['file1']
string$conflictModea value of the enumeration
Returns
File The file object

Definition at line 148 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

copyTo ( Folder  $targetFolder,
  $targetFolderName = null,
  $conflictMode = DuplicationBehavior::RENAME 
)

Copies folder to a target folder

Parameters
Folder$targetFolderTarget folder to copy to.
string$targetFolderNamean optional destination fileName
string$conflictModea value of the enumeration
Returns
Folder New (copied) folder object.

Definition at line 205 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

createFile (   $fileName)

Creates a new blank file

Parameters
string$fileName
Returns
File The new file object

Definition at line 181 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

createFolder (   $folderName)

Creates a new folder

Parameters
string$folderName
Returns
Folder The new folder object

Definition at line 192 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

delete (   $deleteRecursively = true)

Deletes this folder from its storage. This also means that this object becomes useless.

Parameters
bool$deleteRecursively
Returns
bool TRUE if deletion succeeded

Definition at line 170 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

getFileCount ( array  $filterMethods = array(),
  $recursive = false 
)

Returns amount of all files within this folder, optionally filtered by the given pattern

Parameters
array$filterMethods
bool$recursive
Returns
int

Definition at line 96 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

getFiles (   $start = 0,
  $numberOfItems = 0,
  $filterMode = self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS,
  $recursive = false 
)

Returns a list of files in this folder, optionally filtered. There are several filter modes available, see the FILTER_MODE_* constants for more information.

For performance reasons the returned items can also be limited to a given range

Parameters
int$startThe item to start at
int$numberOfItemsThe number of items to return
int$filterModeThe filter mode to use for the filelist.
bool$recursive
Returns
[]

Definition at line 82 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

getPublicUrl (   $relativeToCurrentScript = false)

Returns a publicly accessible URL for this folder

WARNING: Access to the folder may be restricted by further means, e.g. some web-based authentication. You have to take care of this yourself.

Parameters
bool$relativeToCurrentScriptDetermines whether the URL returned should be relative to the current script, in case it is relative at all (only for the LocalDriver)
Returns
string

Definition at line 65 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

getSubfolder (   $name)

Returns the object for a subfolder of the current folder, if it exists.

Parameters
string$nameName of the subfolder
Exceptions
\InvalidArgumentException
Returns
Folder

Implements FolderInterface.

Definition at line 109 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

getSubfolders (   $start = 0,
  $numberOfItems = 0,
  $filterMode = self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS 
)

Returns a list of subfolders

Parameters
int$startThe item to start at
int$numberOfItemsThe number of items to return
int$filterModeThe filter mode to use for the filelist.
Returns
Folder[]

Definition at line 122 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

hasFile (   $name)

Checks if a file exists in this folder

Parameters
string$name
Returns
bool

Implements FolderInterface.

Definition at line 229 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

hasFolder (   $name)

Checks if a folder exists in this folder.

Parameters
string$name
Returns
bool

Implements FolderInterface.

Definition at line 240 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

moveTo ( Folder  $targetFolder,
  $targetFolderName = null,
  $conflictMode = DuplicationBehavior::RENAME 
)

Moves folder to a target folder

Parameters
Folder$targetFolderTarget folder to move to.
string$targetFolderNamean optional destination fileName
string$conflictModea value of the enumeration
Returns
Folder New (copied) folder object.

Definition at line 218 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

rename (   $newName)

Renames this folder.

Parameters
string$newName
Returns
Folder

Implements FolderInterface.

Definition at line 159 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

setFileAndFolderNameFilters ( array  $filters)

Sets the filters to use when listing files. These are only used if the filter mode is one of FILTER_MODE_USE_OWN_FILTERS and FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS

Parameters
array$filters

Definition at line 267 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

setName (   $name)

Sets a new name of the folder currently this does not trigger the "renaming process" as the name is more seen as a label

Parameters
string$nameThe new name
Returns
void

Definition at line 50 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().

throwInaccessibleException ( )
protected
updateProperties ( array  $properties)

Updates the properties of this folder, e.g. after re-indexing or moving it.

NOTE: This method should not be called from outside the File Abstraction Layer (FAL)!

Parameters
array$properties
Returns
void

Definition at line 255 of file InaccessibleFolder.php.

References InaccessibleFolder\throwInaccessibleException().