Source for file media.php
Documentation is available at media.php
* @package Joomla.Administrator
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package Joomla.Administrator
* @deprecated 4.0 Use JHelperMedia instead
* Checks if the file is an image
* @param string $fileName The filename
* @deprecated 4.0 Use JHelperMedia::isImage instead
public static function isImage($fileName)
JLog::add('MediaHelper::isImage() is deprecated. Use JHelperMedia::isImage() instead.', JLog::WARNING, 'deprecated');
return $mediaHelper->isImage($fileName);
* Gets the file extension for the purpose of using an icon.
* @param string $fileName The filename
* @return string File extension
* @deprecated 4.0 Use JHelperMedia::getTypeIcon instead
JLog::add('MediaHelper::getTypeIcon() is deprecated. Use JHelperMedia::getTypeIcon() instead.', JLog::WARNING, 'deprecated');
return $mediaHelper->getTypeIcon($fileName);
* Checks if the file can be uploaded
* @param array File information
* @param string An error message to be returned
* @deprecated 4.0 Use JHelperMedia::canUpload instead
public static function canUpload($file, $err =
'')
JLog::add('MediaHelper::canUpload() is deprecated. Use JHelperMedia::canUpload() instead.', JLog::WARNING, 'deprecated');
return $mediaHelper->canUpload($file, 'com_media');
* Method to parse a file size
* @param integer $size The file size in bytes
* @return string The converted file size
* @deprecated 4.0 Use JHtmlNumber::bytes() instead
JLog::add('MediaHelper::parseSize() is deprecated. Use JHtmlNumber::bytes() instead.', JLog::WARNING, 'deprecated');
return JHtml::_('number.bytes', $size);
* Calculate the size of a resized image
* @param integer $width Image width
* @param integer $height Image height
* @param integer $target Target size
* @return array The new width and height
* @deprecated 4.0 Use JHelperMedia::imageResize instead
public static function imageResize($width, $height, $target)
JLog::add('MediaHelper::countFiles() is deprecated. Use JHelperMedia::countFiles() instead.', JLog::WARNING, 'deprecated');
return $mediaHelper->imageResize($width, $height, $target);
* Counts the files and directories in a directory that are not php or html files.
* @param string $dir Directory name
* @return array The number of files and directories in the given directory
* @deprecated 4.0 Use JHelperMedia::countFiles instead
JLog::add('MediaHelper::countFiles() is deprecated. Use JHelperMedia::countFiles() instead.', JLog::WARNING, 'deprecated');
return $mediaHelper->countFiles($dir);
Documentation generated on Tue, 19 Nov 2013 15:07:43 +0100 by phpDocumentor 1.4.3