[ Index ] |
|
Code source de PHP PEAR 1.4.5 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 353 lignes (13 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 1 fichier Cache.php |
Cache_Graphics:: (8 méthodes):
Cache_Graphics()
getImage()
getImageLink()
cacheImage()
cacheImageLink()
setCacheURL()
setCacheDir()
generateID()
Classe: Cache_Graphics - X-Ref
Graphics disk cache.Cache_Graphics() X-Ref |
Instantiates a cache file container. |
getImage($id, $format = 'png') X-Ref |
Returns the content of a cached image file. This function can be used to send the image directly to the browser. Make sure that you send a correspondending header before sending the image itself. Always try to get the image from the cache before you compute it. See the class docs for an example. param: string Image-ID param: string Image type: gif, jpg, png, wbmp return: string Image file contents if a cached file exists otherwise an empty string |
getImageLink($id, $format = 'png') X-Ref |
Returns an array with a link to the cached image and the image file path. Always try to get the image from the cache before you compute it. See the class docs for an example. param: string Image-ID param: string Image type: gif, jpg, png, wbmp return: array [ full path to the image file, image url ] |
cacheImage($id, $img, $format = 'png') X-Ref |
Create an image from the given image handler, cache it and return the file content. Always try to retrive the image from the cache before you compute it. Warning: this function uses the output buffer. If you expect collisions modify the code. param: string Image-ID. Used as a part of the cache filename. param: string Image handler to create the image from. param: string Image type: gif, jpg, png, wbmp. Also used as filename suffix. return: string Image content returned by ImageGIF/... |
cacheImageLink($id, &$img, $format = 'png') X-Ref |
Create an image from the given image handler, cache it and return a url and the file path of the image. Always try to retrive the image from the cache before you compute it. param: string Image-ID. Used as a part of the cache filename. param: string Image handler to create the image from. param: string Image type: gif, jpg, png, wbmp. Also used as filename suffix. return: array [ full path to the image file, image url ] |
setCacheURL($cache_url) X-Ref |
Sets the URL prefix used when rendering HTML Tags. Make sure that the URL matches the cache directory, otherwise you'll get broken links. param: string |
setCacheDir($cache_dir) X-Ref |
Sets the directory where to cache generated Images param: string |
generateID($variable, $format = 'png') X-Ref |
Pas de description |
Généré le : Sun Feb 25 14:08:00 2007 | par Balluche grâce à PHPXref 0.7 |