Development

Changeset 2605

You must first sign up to be able to contribute.

Changeset 2605

Show
Ignore:
Timestamp:
11/02/06 17:32:56 (7 years ago)
Author:
forkmantis
Message:

Migrated parse_file_size function into a helper. An error is now logged when a user calls the old function from the util class.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfPropelFileStoragePlugin/lib/sfPropelFileStorageUtil.class.php

    r2593 r2605  
    9494  } 
    9595   
    96   /* Thanks to: http://www.php.net/manual/en/function.filesize.php#64387 */ 
    97   public static function parseFileSize($size) 
    98   { 
    99     /* 
    100     Returns a human readable size 
    101     */ 
     96 
     97  public static function parse_file_size($size){ 
     98    // deprecated in favor of camel cased parseFileSize. 
     99    sfContext::getInstance()->getLogger()->err('The method "sfPropelFileStorageUtil::parse_file_size" has been relocated into the helper PropelFileStorage. This method will be removed from sfPropelFileStorageUtil in a future release.'); 
     100 
    102101    $i=0; 
    103102    $iec = array("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"); 
     
    106105     $i++; 
    107106    } 
     107 
    108108    return substr($size,0,strpos($size,'.')+4).' '.$iec[$i]; 
    109   } 
    110  
    111   public static function parse_file_size($size){ 
    112     // deprecated in favor of camel cased parseFileSize. 
    113     return self::parseFileSize($size); 
    114109  } 
    115110