PHP Класс Spatie\MediaLibrary\Filesystem

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

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

Свойство Тип Описание
$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