Class MediaAsset

Description

MediaAsset represents a file or directory in the media system

Located in /system/classes/mediaasset.php (line 8)


	
			
Class Constant Summary
Variable Summary
mixed $content
mixed $filename
mixed $icon
mixed $is_dir
mixed $mode
mixed $path
mixed $props
Method Summary
MediaAsset __construct (string $path, boolean $is_dir, [array $properties = array()], [ $icon = NULL])
void get_props ()
void load (string $file)
boolean put ()
boolean save (string $file)
void upload (array $files)
mixed _get ()
void _set (mixed $content)
mixed __get (string $name)
void __set (string $name, mixed $value)
Variables
mixed $content = null (line 18)
  • access: protected
mixed $filename (line 21)
  • access: protected
mixed $icon = null (line 20)
  • access: public
mixed $is_dir (line 17)
  • access: protected
mixed $mode = self::MODE_NONE (line 22)
  • access: protected
mixed $path (line 16)
  • access: protected
mixed $props = array() (line 19)
  • access: protected
Methods
Constructor __construct (line 31)

MediaAsset constructor

  • access: public
MediaAsset __construct (string $path, boolean $is_dir, [array $properties = array()], [ $icon = NULL])
  • string $path: The path of the asset
  • boolean $is_dir: true if the asset is a directory
  • array $properties: An associative array of property values
  • $icon
get_props (line 73)
  • access: public
void get_props ()
load (line 133)

Load the asset data from a file

  • access: public
void load (string $file)
  • string $file: The filename to load
put (line 183)

Shortcut for putting an asset into the correct silo based on its path

  • return: True on success
  • access: public
boolean put ()
save (line 145)

Save the asset data to a file

  • return: True on success
  • access: public
boolean save (string $file)
  • string $file: The destination filename
upload (line 171)

Load the asset data from an upload

  • access: public
void upload (array $files)
  • array $files: The $_FILES array created when a file is uploaded
_get (line 44)

Return the content of the asset

  • return: The asset content
  • access: protected
mixed _get ()
_set (line 68)

Set the content of this asset

  • access: protected
void _set (mixed $content)
  • mixed $content: The asset content
__get (line 91)

Retrieve attributes about this asset

  • return: The value requested
  • access: public
mixed __get (string $name)
  • string $name: The name of the property to retrieve
__set (line 113)

Set attributes about this asset

  • access: public
void __set (string $name, mixed $value)
  • string $name: The name of the property to set
  • mixed $value: The value to set
Class Constants
MODE_DATA = 1 (line 11)
MODE_FILE = 2 (line 12)
MODE_NONE = 0 (line 10)
MODE_STREAM = 3 (line 13)
MODE_UPLOAD = 4 (line 14)

Documentation generated on Thu, 30 Oct 2008 20:31:21 +0100 by phpDocumentor 1.3.2