Habari\Media::prepare PHP Method

prepare() public static method

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";
public static prepare ( string $path ) : MediaAsset
$path string The virtual path at which the asset will be stored
return MediaAsset An empty, intialized asset instance
    public static function prepare($path)
    {
        $silo = Media::get_silo($path, true);
        return $silo->silo_new($path);
    }