PHP Класс Jarves\Filesystem\WebFilesystem

Наследование: extends Filesystem
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$adapterInstances array
$jarves Jarves\Jarves

Открытые методы

Метод Описание
__construct ( Jarves $jarves, JarvesConfig $jarvesConfig, Symfony\Component\DependencyInjection\ContainerInterface $container, Filesystem $cacheFilesystem )
copy ( $source, $target )
copyFolder ( $from, $to )
createTempFolder ( string $prefix = '', boolean $fullPath = true ) : string Creates a temp folder and returns its path.
downloadFolder ( $path, $to = null )
getAdapter ( string $path = null ) : Jarves\Filesystem\Adapter\AdapterInterface
getFile ( $path ) : Jarves\File\FileInfoInterface | Jarves\File\FileInfoInterface[] | File
getFiles ( string $path ) : File[]
getPath ( integer | string $id ) : string Translates the internal id to the real path.
move ( $source, $target )
newAdapter ( string $serviceId, string $mountPath, array $params ) : Jarves\Filesystem\Adapter\AdapterInterface
paste ( array | string $source, string $target, string $action = 'move' ) : boolean Copies or moves files to a destination.
wrap ( Jarves\File\FileInfoInterface | Jarves\File\FileInfoInterface[] $fileInfo ) : Jarves\File\FileInfoInterface | Jarves\File\FileInfoInterface[] | File Returns a File object. If the file behind the file's 'path' does not exists in the database, it will be created.

Описание методов

__construct() публичный Метод

public __construct ( Jarves $jarves, JarvesConfig $jarvesConfig, Symfony\Component\DependencyInjection\ContainerInterface $container, Filesystem $cacheFilesystem )
$jarves Jarves\Jarves
$jarvesConfig Jarves\JarvesConfig
$container Symfony\Component\DependencyInjection\ContainerInterface
$cacheFilesystem Filesystem

copy() публичный Метод

public copy ( $source, $target )

copyFolder() публичный Метод

public copyFolder ( $from, $to )

createTempFolder() публичный Метод

Please use TempFile::createFolder() class instead.
public createTempFolder ( string $prefix = '', boolean $fullPath = true ) : string
$prefix string
$fullPath boolean Returns the full path on true and the relative to the current TempFolder on false.
Результат string Path with trailing slash

downloadFolder() публичный Метод

public downloadFolder ( $path, $to = null )

getAdapter() публичный Метод

public getAdapter ( string $path = null ) : Jarves\Filesystem\Adapter\AdapterInterface
$path string
Результат Jarves\Filesystem\Adapter\AdapterInterface

getFile() публичный Метод

public getFile ( $path ) : Jarves\File\FileInfoInterface | Jarves\File\FileInfoInterface[] | File
Результат Jarves\File\FileInfoInterface | Jarves\File\FileInfoInterface[] | Jarves\Model\File

getFiles() публичный Метод

public getFiles ( string $path ) : File[]
$path string
Результат Jarves\Model\File[]

getPath() публичный Метод

Example: getPath(45) => '/myImageFolder/Picture1.png'
public getPath ( integer | string $id ) : string
$id integer | string String for backward compatibility
Результат string

move() публичный Метод

public move ( $source, $target )

newAdapter() публичный Метод

public newAdapter ( string $serviceId, string $mountPath, array $params ) : Jarves\Filesystem\Adapter\AdapterInterface
$serviceId string
$mountPath string
$params array
Результат Jarves\Filesystem\Adapter\AdapterInterface

paste() публичный Метод

If the source is a folder, it copies recursively.
public paste ( array | string $source, string $target, string $action = 'move' ) : boolean
$source array | string
$target string
$action string move|copy
Результат boolean

wrap() публичный Метод

This maintains the file references. Jarves does not store the actual path in references but an ID. This ID is related to the path. If a file path is changed we need only to change one place (system_file table) instead of all references.
public wrap ( Jarves\File\FileInfoInterface | Jarves\File\FileInfoInterface[] $fileInfo ) : Jarves\File\FileInfoInterface | Jarves\File\FileInfoInterface[] | File
$fileInfo Jarves\File\FileInfoInterface | Jarves\File\FileInfoInterface[]
Результат Jarves\File\FileInfoInterface | Jarves\File\FileInfoInterface[] | Jarves\Model\File

Описание свойств

$adapterInstances защищенное свойство

protected array $adapterInstances
Результат array

$jarves защищенное свойство

protected Jarves,Jarves $jarves
Результат Jarves\Jarves