Abstract Class MediaHelper

Description
  • deprecated: 4.0 Use JHelperMedia instead
  • abstract:
  • since: 1.5

Located in /administrator/components/com_media/helpers/media.php (line 18)


	
			
Method Summary
 static boolean canUpload (array $file, [string $err = ''])
 static array countFiles (string $dir)
 static string getTypeIcon (string $fileName)
 static array imageResize (integer $width, integer $height, integer $target)
 static boolean isImage (string $fileName)
 static string parseSize (integer $size)
Methods
static canUpload (line 67)

Checks if the file can be uploaded

  • deprecated: 4.0 Use JHelperMedia::canUpload instead
  • since: 1.5
  • access: public
static boolean canUpload (array $file, [string $err = ''])
  • array $file: File information
  • string $err: An error message to be returned
static countFiles (line 121)

Counts the files and directories in a directory that are not php or html files.

  • return: The number of files and directories in the given directory
  • deprecated: 4.0 Use JHelperMedia::countFiles instead
  • since: 1.5
  • access: public
static array countFiles (string $dir)
  • string $dir: Directory name
static getTypeIcon (line 48)

Gets the file extension for the purpose of using an icon.

  • return: File extension
  • deprecated: 4.0 Use JHelperMedia::getTypeIcon instead
  • since: 1.5
  • access: public
static string getTypeIcon (string $fileName)
  • string $fileName: The filename
static imageResize (line 103)

Calculate the size of a resized image

  • return: The new width and height
  • deprecated: 4.0 Use JHelperMedia::imageResize instead
  • since: 3.2
  • access: public
static array imageResize (integer $width, integer $height, integer $target)
  • integer $width: Image width
  • integer $height: Image height
  • integer $target: Target size
static isImage (line 30)

Checks if the file is an image

  • deprecated: 4.0 Use JHelperMedia::isImage instead
  • since: 1.5
  • access: public
static boolean isImage (string $fileName)
  • string $fileName: The filename
static parseSize (line 85)

Method to parse a file size

  • return: The converted file size
  • deprecated: 4.0 Use JHtmlNumber::bytes() instead
  • since: 1.6
  • access: public
static string parseSize (integer $size)
  • integer $size: The file size in bytes

Documentation generated on Tue, 19 Nov 2013 15:07:43 +0100 by phpDocumentor 1.4.3