MediaAsset constructor
MediaAsset
__construct
(string $path, boolean $is_dir, [array $properties = array()], [ $icon = NULL])
-
string
$path: The path of the asset
-
boolean
$is_dir: true if the asset is a directory
-
array
$properties: An associative array of property values
-
$icon
Load the asset data from a file
void
load
(string $file)
-
string
$file: The filename to load
Shortcut for putting an asset into the correct silo based on its path
boolean
put
()
Save the asset data to a file
boolean
save
(string $file)
-
string
$file: The destination filename
Load the asset data from an upload
void
upload
(array $files)
-
array
$files: The $_FILES array created when a file is uploaded
Return the content of the asset
mixed
_get
()
Set the content of this asset
void
_set
(mixed $content)
-
mixed
$content: The asset content
Retrieve attributes about this asset
mixed
__get
(string $name)
-
string
$name: The name of the property to retrieve
Set attributes about this asset
void
__set
(string $name, mixed $value)
-
string
$name: The name of the property to set
-
mixed
$value: The value to set