PersistenceHandler/RabbitMqPersistenceHandler.php
/**
     * Function that returns the human readable size in bytes.
     *
     * @param string $fileSize
     *
     * @return integer
     */
Function that returns the human readable size in bytes.
@param string $fileSize

@return integer
Function that returns the human readable size in bytes . @param string $fileSize @return integer
public static function convertToBytes($fileSize)
    {
        $number = substr($fileSize, 0, -2);
        switch (strtoupper(substr($fileSize,-2))) {
            case "KB":
                return $number * 1024;
            case "MB":
                return $number * pow(1024,2);
            case "GB":
                return $number * pow(1024,3);
            case "TB":
                return $number * pow(1024,4);
            case "PB":
                return $number * pow(1024,5);
            default:
                return $fileSize;
        }
    }
public static function convertToBytes ( $ fileSize ) { $ number = substr ( $ fileSize , 0 , - 2 ) ; switch ( strtoupper ( substr ( $ fileSize , - 2 ) ) ) { case " KB " : return $ number * 1024 ; case " MB " : return $ number * pow ( 1024 , 2 ) ; case " GB " : return $ number * pow ( 1024 , 3 ) ; case " TB " : return $ number * pow ( 1024 , 4 ) ; case " PB " : return $ number * pow ( 1024 , 5 ) ; default : return $ fileSize ; } }
Function that returns the human readable size in bytes.
Function that returns the human readable size in bytes .