List of all members.
| 
Public Member Functions | 
|  | __call ($sMethod, $aArgs) | 
|  | getImagePath ($sAbsPath=false) | 
|  | outputImage () | 
| 
Static Public Member Functions | 
| static | getInstance () | 
| 
Protected Member Functions | 
|  | _getShopBasePath () | 
|  | _getImageUri () | 
|  | _getImageName () | 
|  | _getImageMasterPath () | 
|  | _getImageInfo () | 
|  | _getImageTarget () | 
|  | _getNopicImageTarget () | 
|  | _getImageType () | 
|  | _generatePng ($sSource, $sTarget, $iWidth, $iHeight) | 
|  | _generateJpg ($sSource, $sTarget, $iWidth, $iHeight, $iQuality) | 
|  | _generateGif ($sSource, $sTarget, $iWidth, $iHeight) | 
|  | _isTargetPathValid ($sPath) | 
|  | _createFolders ($sDir) | 
|  | _isValidPath ($sPath) | 
|  | _generateImage ($sImageSource, $sImageTarget) | 
|  | _getLockName ($sName) | 
|  | _lock ($sSource) | 
|  | _unlock ($sSource) | 
|  | _setHeader ($sHeader) | 
|  | _getHeaders () | 
| 
Protected Attributes | 
|  | $_aHeaders = array() | 
|  | $_aAllowedImgTypes = array( "jpg", "jpeg", "png", "gif" ) | 
|  | $_sImageInfoSep = "_" | 
|  | $_hLockHandle = null | 
|  | $_sImageUri = null | 
|  | $_aConfParamToPath | 
| 
Static Protected Attributes | 
| static | $_oInstance = null | 
Detailed Description
Image generator class 
Definition at line 107 of file oxdynimggenerator.php.
Member Function Documentation
      
        
          | oxDynImgGenerator.__call | ( | $ | sMethod, | 
        
          |  |  | $ | aArgs |  | 
        
          |  | ) |  |  |  | 
      
 
Only used for convenience in UNIT tests by doing so we avoid writing extended classes for testing protected or private methods
- Parameters:
- 
  
    |  | string | $sMethod Methods name |  |  | array | $aArgs Argument array |  
 
- Exceptions:
- 
  
  
- Returns:
- string 
Definition at line 190 of file oxdynimggenerator.php.
 
 
      
        
          | oxDynImgGenerator._createFolders | ( | $ | sDir | ) |  [protected] | 
      
 
Checks if valid and creates missing needed folders
- Parameters:
- 
  
    |  | string | $sDir folder(s) to create |  
 
- Returns:
- bool 
Definition at line 389 of file oxdynimggenerator.php.
 
 
      
        
          | oxDynImgGenerator._generateGif | ( | $ | sSource, | 
        
          |  |  | $ | sTarget, | 
        
          |  |  | $ | iWidth, | 
        
          |  |  | $ | iHeight |  | 
        
          |  | ) |  |  |  [protected] | 
      
 
Generates GIF type image and returns its location on file system
- Parameters:
- 
  
    |  | string | $sSource image source |  |  | string | $sTarget image target |  |  | int | $iWidth image width |  |  | int | $iHeight image height |  
 
- Returns:
- string 
Definition at line 354 of file oxdynimggenerator.php.
 
 
      
        
          | oxDynImgGenerator._generateImage | ( | $ | sImageSource, | 
        
          |  |  | $ | sImageTarget |  | 
        
          |  | ) |  |  |  [protected] | 
      
 
Generates requested image
- Parameters:
- 
  
    |  | string | $sImageSource image source |  |  | string | $sImageTarget image target |  
 
- Returns:
- string 
Definition at line 506 of file oxdynimggenerator.php.
 
 
      
        
          | oxDynImgGenerator._generateJpg | ( | $ | sSource, | 
        
          |  |  | $ | sTarget, | 
        
          |  |  | $ | iWidth, | 
        
          |  |  | $ | iHeight, | 
        
          |  |  | $ | iQuality |  | 
        
          |  | ) |  |  |  [protected] | 
      
 
Generates JPG type image and returns its location on file system
- Parameters:
- 
  
    |  | string | $sSource image source |  |  | string | $sTarget image target |  |  | int | $iWidth image width |  |  | int | $iHeight image height |  |  | int | $iQuality new image quality |  
 
- Returns:
- string 
Definition at line 339 of file oxdynimggenerator.php.
 
 
      
        
          | oxDynImgGenerator._generatePng | ( | $ | sSource, | 
        
          |  |  | $ | sTarget, | 
        
          |  |  | $ | iWidth, | 
        
          |  |  | $ | iHeight |  | 
        
          |  | ) |  |  |  [protected] | 
      
 
Generates PNG type image and returns its location on file system
- Parameters:
- 
  
    |  | string | $sSource image source |  |  | string | $sTarget image target |  |  | int | $iWidth image width |  |  | int | $iHeight image height |  
 
- Returns:
- string 
Definition at line 323 of file oxdynimggenerator.php.
 
 
      
        
          | oxDynImgGenerator._getHeaders | ( |  | ) |  [protected] | 
      
 
 
      
        
          | oxDynImgGenerator._getImageInfo | ( |  | ) |  [protected] | 
      
 
 
      
        
          | oxDynImgGenerator._getImageMasterPath | ( |  | ) |  [protected] | 
      
 
 
      
        
          | oxDynImgGenerator._getImageName | ( |  | ) |  [protected] | 
      
 
 
      
        
          | oxDynImgGenerator._getImageTarget | ( |  | ) |  [protected] | 
      
 
 
      
        
          | oxDynImgGenerator._getImageType | ( |  | ) |  [protected] | 
      
 
Returns image type used for image generation and header setting
- Returns:
- string 
Definition at line 306 of file oxdynimggenerator.php.
 
 
      
        
          | oxDynImgGenerator._getImageUri | ( |  | ) |  [protected] | 
      
 
 
      
        
          | oxDynImgGenerator._getLockName | ( | $ | sName | ) |  [protected] | 
      
 
Returns lock file name
- Parameters:
- 
  
    |  | string | $sName original file name |  
 
- Returns:
- string 
Definition at line 552 of file oxdynimggenerator.php.
 
 
      
        
          | oxDynImgGenerator._getNopicImageTarget | ( |  | ) |  [protected] | 
      
 
 
      
        
          | oxDynImgGenerator._getShopBasePath | ( |  | ) |  [protected] | 
      
 
 
      
        
          | oxDynImgGenerator._isTargetPathValid | ( | $ | sPath | ) |  [protected] | 
      
 
Checks if requested image path is valid. If path is valid but is not created - creates directory structure
- Parameters:
- 
  
    |  | string | $sPath image path name to check |  
 
- Returns:
- bool 
Definition at line 368 of file oxdynimggenerator.php.
 
 
      
        
          | oxDynImgGenerator._isValidPath | ( | $ | sPath | ) |  [protected] | 
      
 
Checks if main folder matches requested
- Parameters:
- 
  
    |  | string | $sPath image path name to check |  
 
- Returns:
- bool 
Definition at line 422 of file oxdynimggenerator.php.
 
 
      
        
          | oxDynImgGenerator._lock | ( | $ | sSource | ) |  [protected] | 
      
 
Locks file and returns locking state
- Parameters:
- 
  
    |  | string | $sSource source file which should be locked |  
 
- Returns:
- bool 
Definition at line 564 of file oxdynimggenerator.php.
 
 
      
        
          | oxDynImgGenerator._setHeader | ( | $ | sHeader | ) |  [protected] | 
      
 
 
      
        
          | oxDynImgGenerator._unlock | ( | $ | sSource | ) |  [protected] | 
      
 
Deletes lock file
- Parameters:
- 
  
    |  | string | $sSource source file which should be locked |  
 
- Returns:
- null 
Definition at line 598 of file oxdynimggenerator.php.
 
 
      
        
          | oxDynImgGenerator.getImagePath | ( | $ | sAbsPath = false | ) |  | 
      
 
Returns path to image file which needs should be rendered. If file cannot be found - return false
- Parameters:
- 
  
    |  | string | $sAbsPath absolute requested image path (not url, but real path on file system) |  
 
- Returns:
- string | false 
Definition at line 615 of file oxdynimggenerator.php.
 
 
      
        
          | static oxDynImgGenerator.getInstance | ( |  | ) |  [static] | 
      
 
 
      
        
          | oxDynImgGenerator.outputImage | ( |  | ) |  | 
      
 
Creates and outputs requested image. If source file was not found - tries to render related "nopic.jpg". If "nopic.jpg" is not available - sends 404 header to browser
- Returns:
- null 
Definition at line 664 of file oxdynimggenerator.php.
 
 
Member Data Documentation
      
        
          | oxDynImgGenerator.$_aAllowedImgTypes = array( "jpg", "jpeg", "png", "gif" )  [protected] | 
      
 
 
      
        
          | oxDynImgGenerator.$_aConfParamToPath  [protected] | 
      
 
Initial value: array( 
                                          "sIconsize"             => '/.*\/generated\/product\/(icon|\d+)\/\d+\_\d+\_\d+$/',  
                                          "sThumbnailsize"        => '/.*\/generated\/product\/(thumb|\d+)\/\d+\_\d+\_\d+$/', 
                                          "sZoomImageSize"        => '/.*\/generated\/product\/\d+\/\d+\_\d+\_\d+$/',         
                                          "aDetailImageSizes"     => '/.*\/generated\/product\/\d+\/\d+\_\d+\_\d+$/',         
                                          
                                          "sManufacturerIconsize" => '/.*\/generated\/(manufacturer|vendor)\/icon\/\d+\_\d+\_\d+$/', 
                                          
                                          "sCatThumbnailsize"     => '/.*\/generated\/category\/thumb\/\d+\_\d+\_\d+$/',     
                                          "sCatIconsize"          => '/.*\/generated\/category\/icon\/\d+\_\d+\_\d+$/',      
                                          "sCatPromotionsize"     => '/.*\/generated\/category\/promo_icon\/\d+\_\d+\_\d+$/' 
                                        )
Definition at line 150 of file oxdynimggenerator.php.
 
 
      
        
          | oxDynImgGenerator.$_aHeaders = array()  [protected] | 
      
 
 
      
        
          | oxDynImgGenerator.$_hLockHandle = null  [protected] | 
      
 
 
      
        
          | oxDynImgGenerator.$_oInstance = null  [static, protected] | 
      
 
 
      
        
          | oxDynImgGenerator.$_sImageInfoSep = "_"  [protected] | 
      
 
 
      
        
          | oxDynImgGenerator.$_sImageUri = null  [protected] | 
      
 
 
The documentation for this class was generated from the following file: