PHP Interface Habari\MediaSilo

Show file Open project: habari/system

Public Methods

Method Description
silo_delete ( string $path ) Delete the file at the specified path
silo_dir ( string $path ) : array Return directory contents for the silo path
silo_get ( string $path, array $qualities = null ) : MediaAsset Get the file from the specified path
silo_highlights ( ) : array Retrieve a set of highlights from this silo This would include things like recently uploaded assets, or top downloads
silo_info ( ) Return basic information about this silo name- The name of the silo, used as the root directory for media in this silo
silo_permissions ( string $path ) : array Retrieve the permissions for the current user to access the specified path
silo_put ( string $path, MediaAsset $filedata ) Store the specified media at the specified path

Method Details

silo_delete() public method

Delete the file at the specified path
public silo_delete ( string $path )
$path string The path of the file to retrieve

silo_dir() public method

Return directory contents for the silo path
public silo_dir ( string $path ) : array
$path string The path to retrieve the contents of
return array An array of MediaAssets describing the contents of the directory

silo_get() public method

Get the file from the specified path
public silo_get ( string $path, array $qualities = null ) : MediaAsset
$path string The path of the file to retrieve
$qualities array Qualities that specify the version of the file to retrieve.
return MediaAsset The requested asset

silo_highlights() public method

Retrieve a set of highlights from this silo This would include things like recently uploaded assets, or top downloads
public silo_highlights ( ) : array
return array An array of MediaAssets to highlihgt from this silo

silo_info() public method

Return basic information about this silo name- The name of the silo, used as the root directory for media in this silo
public silo_info ( )

silo_permissions() public method

Retrieve the permissions for the current user to access the specified path
public silo_permissions ( string $path ) : array
$path string The path to retrieve permissions for
return array An array of permissions constants (MediaSilo::PERM_READ, MediaSilo::PERM_WRITE)

silo_put() public method

Store the specified media at the specified path
public silo_put ( string $path, MediaAsset $filedata )
$path string The path of the file to retrieve
$filedata MediaAsset The asset to store