Phpfox_Image_Helper

Description

Image Helper Displays all the images we see on a phpFox site. Each image runs thru this class where we perform many sanity and file size checks before they are displayed on a site.

  • author: Raymond Benc
  • version: $Id: helper.class.php 1758 2010-08-26 07:56:38Z Raymond_Benc $
  • copyright: [PHPFOX_COPYRIGHT]

Located in /include/library/phpfox/image/helper.class.php (line 18)


	
			
Method Summary
 Phpfox_Image_Helper __construct ()
 string display (array $aParams)
 array getNewSize ([string $sImage = null], int $iMaxHeight, int $iMaxWidth, [int $iWidth = 0], [int $iHeight = 0])
 int _cmp (string $a, string $b)
Methods
Constructor __construct (line 24)

Class constructor

  • access: public
Phpfox_Image_Helper __construct ()
display (line 84)

Displays an image on the site based on params passed

  • return: Returns the HTML <image> or the full path to the image based on the params passed with the 1st argument
  • access: public
string display (array $aParams)
  • array $aParams: Holds an ARRAY of params about the image
getNewSize (line 38)

Returns a new width/height for an image based on the max arguments passed

  • return: Returns an ARRAY, where argument 1 is the new height and argument 2 is the new width
  • access: public
array getNewSize ([string $sImage = null], int $iMaxHeight, int $iMaxWidth, [int $iWidth = 0], [int $iHeight = 0])
  • string $sImage: Full path to the image
  • int $iMaxHeight: Max height of the image
  • int $iMaxWidth: Max width of the image
  • int $iWidth: Actual width of the image (optional)
  • int $iHeight: Actual height of the image (optional)
_cmp (line 591)

Runs a check on two variables if they are equal, less then or greater then

  • return: Returns an INT based on the output
  • access: private
int _cmp (string $a, string $b)
  • string $a: Variable 1 to check against variable 2
  • string $b: Variable 2 to check against variable 1

Documentation generated on Tue, 28 Sep 2010 10:36:40 +0200 by phpDocumentor 1.4.0a2