PHP Класс Habari\MediaAsset

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$icon

Защищенные свойства (Protected)

Свойство Тип Описание
$content
$filename
$is_dir
$mode
$path
$props

Открытые методы

Метод Описание
__construct ( string $path, boolean $is_dir, array $properties = [], $icon = null ) MediaAsset constructor
__get ( string $name ) : mixed Retrieve attributes about this asset
__set ( string $name, mixed $value ) Set attributes about this asset
get_props ( )
load ( string $file ) Load the asset data from a file
put ( ) : boolean Shortcut for putting an asset into the correct silo based on its path
save ( string $file ) : boolean Save the asset data to a file
upload ( array $files ) Load the asset data from an upload

Защищенные методы

Метод Описание
_get ( ) : mixed Return the content of the asset
_set ( mixed $content ) Set the content of this asset

Описание методов

__construct() публичный Метод

MediaAsset constructor
public __construct ( string $path, boolean $is_dir, array $properties = [], $icon = null )
$path string The path of the asset
$is_dir boolean true if the asset is a directory
$properties array An associative array of property values

__get() публичный Метод

Retrieve attributes about this asset
public __get ( string $name ) : mixed
$name string The name of the property to retrieve
Результат mixed The value requested

__set() публичный Метод

Set attributes about this asset
public __set ( string $name, mixed $value )
$name string The name of the property to set
$value mixed The value to set

_get() защищенный Метод

Return the content of the asset
protected _get ( ) : mixed
Результат mixed The asset content

_set() защищенный Метод

Set the content of this asset
protected _set ( mixed $content )
$content mixed The asset content

get_props() публичный Метод

public get_props ( )

load() публичный Метод

Load the asset data from a file
public load ( string $file )
$file string The filename to load

put() публичный Метод

Shortcut for putting an asset into the correct silo based on its path
public put ( ) : boolean
Результат boolean True on success

save() публичный Метод

Save the asset data to a file
public save ( string $file ) : boolean
$file string The destination filename
Результат boolean True on success

upload() публичный Метод

Load the asset data from an upload
public upload ( array $files )
$files array The $_FILES array created when a file is uploaded

Описание свойств

$content защищенное свойство

protected $content

$filename защищенное свойство

protected $filename

$icon публичное свойство

public $icon

$is_dir защищенное свойство

protected $is_dir

$mode защищенное свойство

protected $mode

$path защищенное свойство

protected $path

$props защищенное свойство

protected $props