PHP 클래스 Habari\MediaAsset

파일 보기 프로젝트 열기: habari/system

공개 프로퍼티들

프로퍼티 타입 설명
$icon

보호된 프로퍼티들

프로퍼티 타입 설명
$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