Public Member Functions | |
| __construct ($path, $is_dir, $properties=array(), $icon=null) | |
| get_props () | |
| __get ($name) | |
| __set ($name, $value) | |
| load ($file) | |
| save ($file) | |
| upload ($files) | |
| put () | |
Public Attributes | |
| const | MODE_NONE = 0 |
| const | MODE_DATA = 1 |
| const | MODE_FILE = 2 |
| const | MODE_STREAM = 3 |
| const | MODE_UPLOAD = 4 |
| $icon = null | |
Protected Member Functions | |
| _get () | |
| _set ($content) | |
Protected Attributes | |
| $path | |
| $is_dir | |
| $content = null | |
| $props = array() | |
| $filename | |
| $mode = self::MODE_NONE | |
MediaAsset represents a file or directory in the media system
Definition at line 11 of file mediaasset.php.
| MediaAsset::__construct | ( | $ | path, | |
| $ | is_dir, | |||
| $ | properties = array(), |
|||
| $ | icon = null | |||
| ) |
MediaAsset constructor
| 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 |
Definition at line 34 of file mediaasset.php.
| MediaAsset::__get | ( | $ | name | ) |
Retrieve attributes about this asset
| string | $name The name of the property to retrieve |
Definition at line 94 of file mediaasset.php.
| MediaAsset::__set | ( | $ | name, | |
| $ | value | |||
| ) |
Set attributes about this asset
| string | $name The name of the property to set | |
| mixed | $value The value to set |
Definition at line 126 of file mediaasset.php.
| MediaAsset::_get | ( | ) | [protected] |
Return the content of the asset
Definition at line 47 of file mediaasset.php.
Referenced by __get().
| MediaAsset::_set | ( | $ | content | ) | [protected] |
Set the content of this asset
| mixed | $content The asset content |
Definition at line 71 of file mediaasset.php.
Referenced by __set().
| MediaAsset::load | ( | $ | file | ) |
Load the asset data from a file
| string | $file The filename to load |
Definition at line 146 of file mediaasset.php.
| MediaAsset::put | ( | ) |
Shortcut for putting an asset into the correct silo based on its path
Definition at line 196 of file mediaasset.php.
| MediaAsset::save | ( | $ | file | ) |
Save the asset data to a file
| string | $file The destination filename |
Definition at line 158 of file mediaasset.php.
| MediaAsset::upload | ( | $ | files | ) |
Load the asset data from an upload
| array | $files The $_FILES array created when a file is uploaded |
Definition at line 184 of file mediaasset.php.
1.7.1