Ejemplo n.º 1
0
 /**
  * Converts a value to decabinary SI format
  * Example: {$value|decabinary}
  *
  * @param float $value The value to format
  *
  * @return string
  */
 function decaSI($value)
 {
     $decabinary = CMbString::toDecaSI($value);
     return "<span title=\"{$value}\">{$decabinary}</span>";
 }
Ejemplo n.º 2
0
 /**
  * Apply a ratio multiplicator to current memory limit
  * 
  * @param float $ratio Ratio to apply
  * 
  * @return int Previous memory limit
  */
 static function memoryRatio($ratio)
 {
     $limit = CMbString::fromDecaSI(ini_get("memory_limit"), "") * $ratio;
     $limit = CMbString::toDecaSI($limit);
     return ini_set("memory_limit", $limit);
 }