PHP Класс Spatie\MediaLibrary\Media

Наследование: extends Illuminate\Database\Eloquent\Model, use trait SortableTrait
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$casts array The attributes that should be casted to native types.
$guarded

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

Метод Описание
getCustomProperty ( string $propertyName, mixed $default = null ) : mixed Get if the value of custom property with the given name.
getDiskDriverName ( ) : string
getExtensionAttribute ( ) : string
getHumanReadableSizeAttribute ( ) : string
getImageGenerators ( ) : Collection Collection of all ImageGenerator drivers.
getMediaConversionNames ( ) : array * Get all the names of the registered media conversions.
getMimeAttribute ( ) : string
getPath ( string $conversionName = '' ) : string Get the original path to a media-file.
getTypeAttribute ( ) : string Determine the type of a file.
getTypeFromExtensionAttribute ( ) : string Determine the type of a file from its file extension.
getTypeFromMimeAttribute ( ) : string * Determine the type of a file from its mime type
getUrl ( string $conversionName = '' ) : string Get the original Url to a media-file.
hasCustomProperty ( string $propertyName ) : boolean * Determine if the media item has a custom property with the given name.
model ( ) : Illuminate\Database\Eloquent\Relations\MorphTo Create the polymorphic relation.
removeCustomProperty ( string $name )
setCustomProperty ( string $name, mixed $value )

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

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

Get if the value of custom property with the given name.
public getCustomProperty ( string $propertyName, mixed $default = null ) : mixed
$propertyName string
$default mixed
Результат mixed

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

public getDiskDriverName ( ) : string
Результат string

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

public getExtensionAttribute ( ) : string
Результат string

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

public getHumanReadableSizeAttribute ( ) : string
Результат string

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

Collection of all ImageGenerator drivers.
public getImageGenerators ( ) : Collection
Результат Illuminate\Support\Collection

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

* Get all the names of the registered media conversions.
public getMediaConversionNames ( ) : array
Результат array

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

public getMimeAttribute ( ) : string
Результат string

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

Get the original path to a media-file.
public getPath ( string $conversionName = '' ) : string
$conversionName string
Результат string

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

Determine the type of a file.
public getTypeAttribute ( ) : string
Результат string

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

Determine the type of a file from its file extension.
public getTypeFromExtensionAttribute ( ) : string
Результат string

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

* Determine the type of a file from its mime type
public getTypeFromMimeAttribute ( ) : string
Результат string

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

Get the original Url to a media-file.
public getUrl ( string $conversionName = '' ) : string
$conversionName string
Результат string

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

* Determine if the media item has a custom property with the given name.
public hasCustomProperty ( string $propertyName ) : boolean
$propertyName string
Результат boolean

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

Create the polymorphic relation.
public model ( ) : Illuminate\Database\Eloquent\Relations\MorphTo
Результат Illuminate\Database\Eloquent\Relations\MorphTo

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

public removeCustomProperty ( string $name )
$name string

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

public setCustomProperty ( string $name, mixed $value )
$name string
$value mixed

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

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

The attributes that should be casted to native types.
protected array $casts
Результат array

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

protected $guarded