PHP Class Gdn_UploadImage, vanilla

Inheritance: extends Gdn_Upload
Afficher le fichier Open project: vanilla/vanilla Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

canUploadImages() public static méthode

Check that we have the necessary tools to allow image uploading.
public static canUploadImages ( ) : boolean
Résultat boolean

clear() public méthode

public clear ( )

imageIco() public static méthode

public static imageIco ( $gd, $targetPath )

imageSize() public static méthode

Gets the image size of a file.
Since: 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.
Résultat array An array of [width, height, image type].

saveImageAs() public static méthode

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() public méthode

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