Static Public Member Functions | |
| static | dir ($path= '') |
| static | get ($path, $qualities=null) |
| static | prepare ($path) |
| static | put ($filedata, $path=null) |
| static | delete ($path) |
| static | copy ($pathfrom, $pathto) |
| static | move ($pathfrom, $pathto) |
| static | highlights ($path=null) |
| static | permissions ($path) |
| static | get_silo (&$silo, $parse_path=false) |
| static | init_silos () |
Public Attributes | |
| const | THUMBNAIL_WIDTH = 200 |
| const | THUMBNAIL_HEIGHT = 100 |
Static Public Attributes | |
| static | $silos = null |
Media access
Definition at line 15 of file media.php.
| static Media::copy | ( | $ | pathfrom, | |
| $ | pathto | |||
| ) | [static] |
| static Media::delete | ( | $ | path | ) | [static] |
| static Media::dir | ( | $ | path = '' |
) | [static] |
Retrieve an array of media assets stored at a virtual path
| string | $path The virtual path of the directory to retrieve |
Definition at line 27 of file media.php.
Referenced by AdminPostsHandler::ajax_media(), and Post::get_form().
| static Media::get | ( | $ | path, | |
| $ | qualities = null | |||
| ) | [static] |
Get the MediaAsset stored at a virtual path
| string | $path The virtual path of the file to retrieve | |
| array | $qualities Qualities of the image to return (such as 'thumbnail' or 'size') |
Definition at line 57 of file media.php.
Referenced by MediaAsset::_get(), and copy().
| static Media::get_silo | ( | &$ | silo, | |
| $ | parse_path = false | |||
| ) | [static] |
Return the instance of a silo
| mixed | $silo A silo instance or the name of a silo | |
| boolean | $parse_path If true, parse the siloname from the path and return the remainder path by reference |
Definition at line 193 of file media.php.
Referenced by AdminPostsHandler::ajax_media(), AdminPostsHandler::ajax_media_panel(), delete(), dir(), get(), highlights(), permissions(), prepare(), and put().
| static Media::highlights | ( | $ | path = null |
) | [static] |
Return an array of highlighted (featured) assets from all silos
| mixed | $path The name of a silo or a silo instance. If empty, all silos are returned. |
| static Media::init_silos | ( | ) | [static] |
Initialize the internal list of silo instances
Definition at line 216 of file media.php.
Referenced by dir(), get_silo(), and highlights().
| static Media::move | ( | $ | pathfrom, | |
| $ | pathto | |||
| ) | [static] |
Move the asset using the specified from and to paths A shortcut for Media::copy() then Media::delete()
| string | $pathfrom The virtual path source | |
| string | $pathto The virtual path destination |
| static Media::permissions | ( | $ | path | ) | [static] |
| static Media::prepare | ( | $ | path | ) | [static] |
Fetch an empty MediaAsset with the available metadata keys pre-allocated $asset = Media::prepare('silotype/foo/bar'); foreach($asset->get_info() as $key => $value) echo "$key : $value";
| string | $path The virtual path at which the asset will be stored |
| static Media::put | ( | $ | filedata, | |
| $ | path = null | |||
| ) | [static] |
Store the asset at the specified virtual path
| MediaAsset | $filedata The asset to store | |
| string | $path The virtual path where the asset will be stored |
Definition at line 86 of file media.php.
Referenced by copy().
1.7.1