MediaManager
class MediaManager
Class MediaManager
Properties
protected Storage | $storage | Storage instance | |
protected CommandFactory | $factory | CommandFactory instance | |
protected array | $config | config data | |
protected MediaHandler[] | $handlers | media handlers |
Methods
getHandler(string $type)
Returns handler
string|null
void
void
Collection|Image[]
Collection|Media[]
void
MediaHandler|null
__call(string $name, array|null $arguments)
__call
Details
at line 75
__construct(Storage $storage, CommandFactory $factory, array $config)
Constructor
at line 89
MediaHandler
getHandler(string $type)
Returns handler
at line 105
MediaHandler
getHandlerByFile(File $file)
Returns handler by storage File instance
at line 120
string|null
getFileType(File $file)
파일이 특정 미디어 타입과 매칭된다며 해당 타입 반환
at line 137
MediaHandler
getHandlerByMedia(Media $media)
Returns handler by storage Media instance
at line 171
bool
is(File $file)
파일이 미디어 파일인지 확인
at line 188
bool
delete(Media $media)
미디어 삭제
at line 203
bool
remove(Media $media)
미디어 삭제
at line 214
void
metaDelete(Media $media)
Meta data 삭제
at line 229
void
metaRemove(Media $media)
Meta data 삭제
at line 242
Collection|Image[]
createThumbnails(Media $media, string|null $type = null, array $dimensions = null)
섬네일 생성
at line 298
void
extend(string $type, MediaHandler $handler)
미디어 핸들러를 추가, 변경하여 기능 확장
is() method 를 통해 파일이 미디어 인지 판별할 수 있어야 하므로 각각의 handler 들은 활성화된 상태로 전달 받도록 함
at line 310
MediaHandler|null
__call(string $name, array|null $arguments)
__call