PHP 클래스 Jarves\Filesystem\WebFilesystem

상속: extends Filesystem
파일 보기 프로젝트 열기: jarves/jarves 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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