PHP Класс Gdn_UploadImage, vanilla

Наследование: extends Gdn_Upload
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
canUploadImages ( ) : boolean Check that we have the necessary tools to allow image uploading.
clear ( )
imageIco ( $gd, $targetPath )
imageSize ( string $Path, string $Filename = false ) : array Gets the image size of a file.
saveImageAs ( $Source, $Target, $Height = '', $Width = '', $Options = [] ) Saves the specified image at $Target in the specified format with the specified dimensions (or the existing dimensions if height/width are not provided.
validateUpload ( $InputName, $ThrowError = true ) Validates the uploaded image. Returns the temporary name of the uploaded file.

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

canUploadImages() публичный статический Метод

Check that we have the necessary tools to allow image uploading.
public static canUploadImages ( ) : boolean
Результат boolean

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

public clear ( )

imageIco() публичный статический Метод

public static imageIco ( $gd, $targetPath )

imageSize() публичный статический Метод

Gets the image size of a file.
С версии: 2.1
public static imageSize ( string $Path, string $Filename = false ) : array
$Path string The path to the file.
$Filename string The name of the file.
Результат array An array of [width, height, image type].

saveImageAs() публичный статический Метод

Saves the specified image at $Target in the specified format with the specified dimensions (or the existing dimensions if height/width are not provided.
public static saveImageAs ( $Source, $Target, $Height = '', $Width = '', $Options = [] )

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

Validates the uploaded image. Returns the temporary name of the uploaded file.
public validateUpload ( $InputName, $ThrowError = true )