\AcidFs

Gestionnaire de Fichier et Ressources Fichier/Image

Summary

Methods
Properties
Constants
base64Image()
getExtension()
removeExtension()
removeBasePath()
recurseCopy()
getImgSmallerSize()
getImgSrcSizeCroped()
imgResize()
imgRotate()
imgGray()
fill()
importMimeArray()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

base64Image()

base64Image(  $file_name, string  $alt = '', array  $params = array()) : string

Convertit un chemin vers une image en image html faisant en base64

Parameters

$file_name
string $alt
array $params

Returns

string

getExtension()

getExtension(string  $file_name) : string

Retourne l'extension du fichier en entrée ou false en cas d'échec.

Parameters

string $file_name

Returns

string —

| bool

removeExtension()

removeExtension(string  $file_name) : string

Retourne le nom du fichier en entrée sans extension.

Parameters

string $file_name

Returns

string

removeBasePath()

removeBasePath(string  $file_name) : string

Retourne le nom du fichier delesté du basepath le cas échéant

Parameters

string $file_name

Returns

string

recurseCopy()

recurseCopy(string  $src, string  $dst) 

Copie un dossier de manière recursive

Parameters

string $src
string $dst

getImgSmallerSize()

getImgSmallerSize(integer  $w, integer  $h, integer  $mw, integer  $mh) : array

Retourne le couple (largeur, hauteur) correspondant à l'encoffrage d'une image de dimension $w x $h dans $mw x $mh.

Parameters

integer $w

Largeur à traiter.

integer $h

Hauteur à traiter.

integer $mw

Largeur du coffre.

integer $mh

Hauteur du coffre.

Returns

array —

( int , int )

getImgSrcSizeCroped()

getImgSrcSizeCroped(integer  $w, integer  $h, integer  $mw, integer  $mh,   $mode = 'center') : array

Retourne un tableau correspondant au remplissage du coffre de dimension $mw x $mh par une image de dimension $w x $h.

Parameters

integer $w

Largeur de l'image.

integer $h

Hauteur de l'image.

integer $mw

Largeur du coffre.

integer $mh

Hauteur du coffre.

$mode

Returns

array —

( int : largeur, int : hauteur, int : capture_x, int : capture_y )

imgResize()

imgResize(string  $src_path, string  $dst_path, integer  $img_w, integer  $img_h, integer  $src_w = null, integer  $src_h = null, integer  $src_type = null, integer  $src_x, integer  $src_y, null  $quality = null) : boolean

Créer une image redimensionnée en fonction des paramètres en entrée et retourne true en cas de succès, false sinon.

Parameters

string $src_path
string $dst_path
integer $img_w
integer $img_h
integer $src_w
integer $src_h
integer $src_type
integer $src_x
integer $src_y
null $quality

Returns

boolean

imgRotate()

imgRotate(string  $src_path, string  $dst_path, float  $degrees, integer  $bgd_color, integer  $ignore_transparent, null  $quality = null) : boolean

Créer une replique avec rotation de l'image désignée par $src_path et la stocke en $dst_path.

Parameters

string $src_path
string $dst_path
float $degrees
integer $bgd_color
integer $ignore_transparent
null $quality

Returns

boolean

imgGray()

imgGray(string  $src_path, string  $dst_path) 

Créer une replique grisée de l'image désignée par $src_path et la stocke en $dst_path.

Parameters

string $src_path
string $dst_path

fill()

fill(string  $src_path, string  $dst_path, integer  $dst_w, integer  $dst_h, string  $color) 

Centre l'image et remplit dans un espace coloré

Parameters

string $src_path
string $dst_path
integer $dst_w
integer $dst_h
string $color

importMimeArray()

importMimeArray(string  $source_url = 'http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types') : array

Import array of Mime Types from url

Parameters

string $source_url

Returns

array