class MediaManager extends MediaLibrary

deprecated replaced with \Main\Libraries\MediaLibrary

MediaManager Class

Traits

Singleton trait.

Properties

static protected $instance from  Singleton
static protected $cacheKey from  MediaLibrary
protected $storageDisk from  MediaLibrary
protected $storagePath from  MediaLibrary
protected $storageFolder from  MediaLibrary
protected $ignoreNames from  MediaLibrary
protected $ignorePatterns from  MediaLibrary
protected $storageFolderNameLength from  MediaLibrary
protected $config from  MediaLibrary

Methods

static 
instance()

Create a new instance of this singleton.

static 
forgetInstance()

Forget this singleton's instance if it exists

__construct()

Constructor.

initialize()

Initialize the singleton free from constructor parameters.

__clone()

No description

__wakeup()

No description

listFolderContents($fullPath, $methodName, $recursive = FALSE)

No description

listAllFolders($path = null, array $exclude = [])

No description

listFolders($path = null, array $exclude = [], $recursive = FALSE)

No description

fetchFiles($path, $sortBy = [], $options = null)

No description

get($path, $stream = FALSE)

No description

put($path, $contents)

No description

makeFolder($name)

No description

copyFile($srcPath, $destPath)

No description

moveFile($path, $newPath)

No description

rename($path, $newPath)

No description

deleteFiles($paths)

No description

deleteFolder($path)

No description

exists($path)

No description

validatePath($path, $stripTrailingSlash = FALSE)

No description

getMediaUrl($path)

No description

getMediaPath($path)

No description

getMediaThumb($path, $options)

No description

getDefaultThumbPath($thumbPath, $default = null)

No description

getMediaRelativePath($path)

No description

getConfig($key = null, $default = null)

No description

getAllowedExtensions()

No description

isAllowedExtension($filename)

No description

resetCache()

No description

folderSize($path)

No description

scanFolderContents($fullPath, $methodName, $recursive = FALSE)

No description

isVisible($path)

No description

sortFiles($files, $sortBy)

No description

filterFiles($files, $filterBy)

No description

searchFiles($files, $filter)

No description

getThumbDirectory()

No description

getStorageDisk()

No description

initMediaItem($path, $itemType)

No description

pathMatchesSearch($path, $words)

No description

getMediaThumbFile($filePath, $options)

No description

ensureDirectoryExists($path)

No description

Details

in Singleton at line 18
final static instance()

Create a new instance of this singleton.

in Singleton at line 28
final static forgetInstance()

Forget this singleton's instance if it exists

at line 17
__construct()

Constructor.

in Singleton at line 44
protected initialize()

Initialize the singleton free from constructor parameters.

in Singleton at line 48
__clone()

No description

in Singleton at line 53
__wakeup()

No description

in MediaLibrary at line 55
listFolderContents($fullPath, $methodName, $recursive = FALSE)

No description

Parameters

$fullPath
$methodName
$recursive

in MediaLibrary at line 84
listAllFolders($path = null, array $exclude = [])

No description

Parameters

$path
array $exclude

in MediaLibrary at line 89
listFolders($path = null, array $exclude = [], $recursive = FALSE)

No description

Parameters

$path
array $exclude
$recursive

in MediaLibrary at line 119
fetchFiles($path, $sortBy = [], $options = null)

No description

Parameters

$path
$sortBy
$options

in MediaLibrary at line 139
get($path, $stream = FALSE)

No description

Parameters

$path
$stream

in MediaLibrary at line 151
put($path, $contents)

No description

Parameters

$path
$contents

in MediaLibrary at line 159
makeFolder($name)

No description

Parameters

$name

in MediaLibrary at line 168
copyFile($srcPath, $destPath)

No description

Parameters

$srcPath
$destPath

in MediaLibrary at line 179
moveFile($path, $newPath)

No description

Parameters

$path
$newPath

in MediaLibrary at line 190
rename($path, $newPath)

No description

Parameters

$path
$newPath

in MediaLibrary at line 201
deleteFiles($paths)

No description

Parameters

$paths

in MediaLibrary at line 212
deleteFolder($path)

No description

Parameters

$path

in MediaLibrary at line 221
exists($path)

No description

Parameters

$path

in MediaLibrary at line 229
validatePath($path, $stripTrailingSlash = FALSE)

No description

Parameters

$path
$stripTrailingSlash

in MediaLibrary at line 237
getMediaUrl($path)

No description

Parameters

$path

in MediaLibrary at line 244
getMediaPath($path)

No description

Parameters

$path

in MediaLibrary at line 252
getMediaThumb($path, $options)

No description

Parameters

$path
$options

in MediaLibrary at line 294
getDefaultThumbPath($thumbPath, $default = null)

No description

Parameters

$thumbPath
$default

in MediaLibrary at line 304
getMediaRelativePath($path)

No description

Parameters

$path

in MediaLibrary at line 314
getConfig($key = null, $default = null)

No description

Parameters

$key
$default

in MediaLibrary at line 322
getAllowedExtensions()

No description

in MediaLibrary at line 327
isAllowedExtension($filename)

No description

Parameters

$filename

in MediaLibrary at line 338
resetCache()

No description

in MediaLibrary at line 343
folderSize($path)

No description

Parameters

$path

in MediaLibrary at line 358
protected scanFolderContents($fullPath, $methodName, $recursive = FALSE)

No description

Parameters

$fullPath
$methodName
$recursive

in MediaLibrary at line 377
protected isVisible($path)

No description

Parameters

$path

in MediaLibrary at line 392
protected sortFiles($files, $sortBy)

No description

Parameters

$files
$sortBy

in MediaLibrary at line 418
protected filterFiles($files, $filterBy)

No description

Parameters

$files
$filterBy

in MediaLibrary at line 434
protected searchFiles($files, $filter)

No description

Parameters

$files
$filter

in MediaLibrary at line 448
protected getThumbDirectory()

No description

in MediaLibrary at line 453
protected getStorageDisk()

No description

in MediaLibrary at line 463
protected initMediaItem($path, $itemType)

No description

Parameters

$path
$itemType

in MediaLibrary at line 483
protected pathMatchesSearch($path, $words)

No description

Parameters

$path
$words

in MediaLibrary at line 499
protected getMediaThumbFile($filePath, $options)

No description

Parameters

$filePath
$options

in MediaLibrary at line 514
protected ensureDirectoryExists($path)

No description

Parameters

$path