PHP Class Jarves\Filesystem\WebFilesystem

Inheritance: extends Filesystem
Afficher le fichier Open project: jarves/jarves Class Usage Examples

Protected Properties

Свойство Type Description
$adapterInstances array
$jarves Jarves\Jarves

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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 méthode

public copy ( $source, $target )

copyFolder() public méthode

public copyFolder ( $from, $to )

createTempFolder() public méthode

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.
Résultat string Path with trailing slash

downloadFolder() public méthode

public downloadFolder ( $path, $to = null )

getAdapter() public méthode

public getAdapter ( string $path = null ) : Jarves\Filesystem\Adapter\AdapterInterface
$path string
Résultat Jarves\Filesystem\Adapter\AdapterInterface

getFile() public méthode

public getFile ( $path ) : Jarves\File\FileInfoInterface | Jarves\File\FileInfoInterface[] | File
Résultat Jarves\File\FileInfoInterface | Jarves\File\FileInfoInterface[] | Jarves\Model\File

getFiles() public méthode

public getFiles ( string $path ) : File[]
$path string
Résultat Jarves\Model\File[]

getPath() public méthode

Example: getPath(45) => '/myImageFolder/Picture1.png'
public getPath ( integer | string $id ) : string
$id integer | string String for backward compatibility
Résultat string

move() public méthode

public move ( $source, $target )

newAdapter() public méthode

public newAdapter ( string $serviceId, string $mountPath, array $params ) : Jarves\Filesystem\Adapter\AdapterInterface
$serviceId string
$mountPath string
$params array
Résultat Jarves\Filesystem\Adapter\AdapterInterface

paste() public méthode

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
Résultat boolean

wrap() public méthode

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[]
Résultat Jarves\File\FileInfoInterface | Jarves\File\FileInfoInterface[] | Jarves\Model\File

Property Details

$adapterInstances protected_oe property

protected array $adapterInstances
Résultat array

$jarves protected_oe property

protected Jarves,Jarves $jarves
Résultat Jarves\Jarves