PHP 클래스 Spatie\MediaLibrary\Media

상속: extends Illuminate\Database\Eloquent\Model, use trait SortableTrait
파일 보기 프로젝트 열기: spatie/laravel-medialibrary 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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() 공개 메소드

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.

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