PHP 클래스 Spatie\MediaLibrary\Filesystem

파일 보기 프로젝트 열기: spatie/laravel-medialibrary 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$config Illuminate\Contracts\Config\Repository
$filesystem Illuminate\Contracts\Filesystem\Factory

공개 메소드들

메소드 설명
__construct ( Illuminate\Contracts\Filesystem\Factory $filesystems, Illuminate\Contracts\Config\Repository $config )
add ( string $file, Media $media, string $targetFileName = '' ) * Add a file to the mediaLibrary for the given media.
copyFromMediaLibrary ( Media $media, string $targetFile ) * Copy a file from the medialibrary to the given targetFile.
copyToMediaLibrary ( string $file, Media $media, boolean $conversions = false, string $targetFileName = '' ) * Copy a file to the medialibrary for the given $media.
getConversionDirectory ( Media $media ) : string * Return the directory where all conversions of the given media are stored.
getMediaDirectory ( Media $media, boolean $conversion = false ) : string * Return the directory where all files of the given media are stored.
getRemoteHeadersForFile ( string $file ) : array * Get the headers to be used when copying the given file to a remote filesytem.
removeFiles ( Media $media ) * Remove all files for the given media.
renameFile ( Media $media, string $oldName ) * Rename a file for the given media.

메소드 상세

__construct() 공개 메소드

public __construct ( Illuminate\Contracts\Filesystem\Factory $filesystems, Illuminate\Contracts\Config\Repository $config )
$filesystems Illuminate\Contracts\Filesystem\Factory
$config Illuminate\Contracts\Config\Repository

add() 공개 메소드

* Add a file to the mediaLibrary for the given media.
public add ( string $file, Media $media, string $targetFileName = '' )
$file string
$media Media
$targetFileName string

copyFromMediaLibrary() 공개 메소드

* Copy a file from the medialibrary to the given targetFile.
public copyFromMediaLibrary ( Media $media, string $targetFile )
$media Media
$targetFile string

copyToMediaLibrary() 공개 메소드

* Copy a file to the medialibrary for the given $media.
public copyToMediaLibrary ( string $file, Media $media, boolean $conversions = false, string $targetFileName = '' )
$file string
$media Media
$conversions boolean
$targetFileName string

getConversionDirectory() 공개 메소드

* Return the directory where all conversions of the given media are stored.
public getConversionDirectory ( Media $media ) : string
$media Media
리턴 string

getMediaDirectory() 공개 메소드

* Return the directory where all files of the given media are stored.
public getMediaDirectory ( Media $media, boolean $conversion = false ) : string
$media Media
$conversion boolean
리턴 string

getRemoteHeadersForFile() 공개 메소드

* Get the headers to be used when copying the given file to a remote filesytem.
public getRemoteHeadersForFile ( string $file ) : array
$file string
리턴 array

removeFiles() 공개 메소드

* Remove all files for the given media.
public removeFiles ( Media $media )
$media Media

renameFile() 공개 메소드

* Rename a file for the given media.
public renameFile ( Media $media, string $oldName )
$media Media
$oldName string

프로퍼티 상세

$config 보호되어 있는 프로퍼티

protected Repository,Illuminate\Contracts\Config $config
리턴 Illuminate\Contracts\Config\Repository

$filesystem 보호되어 있는 프로퍼티

protected Factory,Illuminate\Contracts\Filesystem $filesystem
리턴 Illuminate\Contracts\Filesystem\Factory