AbstractStorage
    
            
            in package
            
        
    
            
            implements
                            StorageInterface                    
    
    
AbstractYes
Storage abstract class
Tags
Table of Contents
Interfaces
- StorageInterface
 - Storage interface
 
Properties
- $adapter : AbstractAdapter|null
 - Storage adapter
 
Methods
- __construct() : mixed
 - Constructor
 - adapter() : AbstractAdapter|null
 - Get adapter (alias)
 - chdir() : void
 - Change directory
 - copyFile() : void
 - Copy file
 - copyFileFromExternal() : void
 - Copy file from a location external to the current location
 - copyFileToExternal() : void
 - Copy file to a location external to the current location
 - deleteFile() : void
 - Delete file
 - fetchFile() : mixed
 - Fetch file contents
 - fetchFileInfo() : array<string|int, mixed>
 - Fetch file info
 - fileExists() : bool
 - File exists
 - getAdapter() : AbstractAdapter|null
 - Get adapter
 - getBaseDir() : string|null
 - Get base directory
 - getCurrentDir() : string|null
 - Get current directory
 - getFileMTime() : int|string|bool
 - Get file modified time
 - getFileSize() : int|bool
 - Get file size
 - getFileType() : string|bool
 - Get file type
 - isDir() : bool
 - Check if is a dir
 - isFile() : bool
 - Check if is a file
 - listAll() : array<string|int, mixed>
 - List all
 - listDirs() : array<string|int, mixed>
 - List directories
 - listFiles() : array<string|int, mixed>
 - List files
 - md5File() : string|bool
 - Create MD5 checksum of the file
 - mkdir() : void
 - Make directory
 - moveFileFromExternal() : void
 - Move file from a location external to the current location
 - moveFileToExternal() : void
 - Move file to a location external to the current location
 - putFile() : void
 - Put file
 - putFileContents() : void
 - Put file contents
 - renameFile() : void
 - Rename file
 - replaceFileContents() : void
 - Replace file
 - rmdir() : void
 - Remove a directory
 - setAdapter() : AbstractStorage
 - Set adapter
 - setBaseDir() : void
 - Set base directory
 - uploadFile() : void
 - Upload file from server request $_FILES['file']
 
Properties
$adapter
Storage adapter
    protected
        AbstractAdapter|null
    $adapter
     = null
    
    
    
Methods
__construct()
Constructor
    public
                    __construct(AbstractAdapter $adapter) : mixed
    Parameters
- $adapter : AbstractAdapter
 
adapter()
Get adapter (alias)
    public
                    adapter() : AbstractAdapter|null
    Return values
AbstractAdapter|nullchdir()
Change directory
    public
    abstract                chdir([string|null $directory = null ]) : void
    Parameters
- $directory : string|null = null
 
copyFile()
Copy file
    public
    abstract                copyFile(string $sourceFile, string $destFile) : void
    Parameters
- $sourceFile : string
 - $destFile : string
 
copyFileFromExternal()
Copy file from a location external to the current location
    public
    abstract                copyFileFromExternal(string $externalFile, string $destFile) : void
    Parameters
- $externalFile : string
 - $destFile : string
 
copyFileToExternal()
Copy file to a location external to the current location
    public
    abstract                copyFileToExternal(string $sourceFile, string $externalFile) : void
    Parameters
- $sourceFile : string
 - $externalFile : string
 
deleteFile()
Delete file
    public
    abstract                deleteFile(string $filename) : void
    Parameters
- $filename : string
 
fetchFile()
Fetch file contents
    public
    abstract                fetchFile(string $filename) : mixed
    Parameters
- $filename : string
 
fetchFileInfo()
Fetch file info
    public
    abstract                fetchFileInfo(string $filename) : array<string|int, mixed>
    Parameters
- $filename : string
 
Return values
array<string|int, mixed>fileExists()
File exists
    public
    abstract                fileExists(string $filename) : bool
    Parameters
- $filename : string
 
Return values
boolgetAdapter()
Get adapter
    public
                    getAdapter() : AbstractAdapter|null
    Return values
AbstractAdapter|nullgetBaseDir()
Get base directory
    public
    abstract                getBaseDir() : string|null
    Return values
string|nullgetCurrentDir()
Get current directory
    public
    abstract                getCurrentDir() : string|null
    Return values
string|nullgetFileMTime()
Get file modified time
    public
    abstract                getFileMTime(string $filename) : int|string|bool
    Parameters
- $filename : string
 
Return values
int|string|boolgetFileSize()
Get file size
    public
    abstract                getFileSize(string $filename) : int|bool
    Parameters
- $filename : string
 
Return values
int|boolgetFileType()
Get file type
    public
    abstract                getFileType(string $filename) : string|bool
    Parameters
- $filename : string
 
Return values
string|boolisDir()
Check if is a dir
    public
    abstract                isDir(string $directory) : bool
    Parameters
- $directory : string
 
Return values
boolisFile()
Check if is a file
    public
    abstract                isFile(string $filename) : bool
    Parameters
- $filename : string
 
Return values
boollistAll()
List all
    public
    abstract                listAll([string|null $search = null ]) : array<string|int, mixed>
    Parameters
- $search : string|null = null
 
Return values
array<string|int, mixed>listDirs()
List directories
    public
    abstract                listDirs([string|null $search = null ]) : array<string|int, mixed>
    Parameters
- $search : string|null = null
 
Return values
array<string|int, mixed>listFiles()
List files
    public
    abstract                listFiles([string|null $search = null ]) : array<string|int, mixed>
    Parameters
- $search : string|null = null
 
Return values
array<string|int, mixed>md5File()
Create MD5 checksum of the file
    public
    abstract                md5File(string $filename) : string|bool
    Parameters
- $filename : string
 
Return values
string|boolmkdir()
Make directory
    public
    abstract                mkdir(string $directory) : void
    Parameters
- $directory : string
 
moveFileFromExternal()
Move file from a location external to the current location
    public
    abstract                moveFileFromExternal(string $externalFile, string $destFile) : void
    Parameters
- $externalFile : string
 - $destFile : string
 
moveFileToExternal()
Move file to a location external to the current location
    public
    abstract                moveFileToExternal(string $sourceFile, string $externalFile) : void
    Parameters
- $sourceFile : string
 - $externalFile : string
 
putFile()
Put file
    public
    abstract                putFile(string $fileFrom[, bool $copy = true ]) : void
    Parameters
- $fileFrom : string
 - $copy : bool = true
 
putFileContents()
Put file contents
    public
    abstract                putFileContents(string $filename, string $fileContents) : void
    Parameters
- $filename : string
 - $fileContents : string
 
renameFile()
Rename file
    public
    abstract                renameFile(string $oldFile, string $newFile) : void
    Parameters
- $oldFile : string
 - $newFile : string
 
replaceFileContents()
Replace file
    public
    abstract                replaceFileContents(string $filename, string $fileContents) : void
    Parameters
- $filename : string
 - $fileContents : string
 
rmdir()
Remove a directory
    public
    abstract                rmdir(string $directory) : void
    Parameters
- $directory : string
 
setAdapter()
Set adapter
    public
                    setAdapter(AbstractAdapter $adapter) : AbstractStorage
    Parameters
- $adapter : AbstractAdapter
 
Return values
AbstractStoragesetBaseDir()
Set base directory
    public
    abstract                setBaseDir([string|null $directory = null ]) : void
    Parameters
- $directory : string|null = null
 
uploadFile()
Upload file from server request $_FILES['file']
    public
    abstract                uploadFile(array<string|int, mixed> $file) : void
    Parameters
- $file : array<string|int, mixed>