Return the filling percentage of the backend storage

@return int integer between 0 and 100
557926
public function getFillingPercentage()
    {
        if (!$this->_extendedBackend) {
            Zend_Cache::throwException(self::BACKEND_NOT_IMPLEMENTS_EXTENDED_IF);
        }
        return $this->_backend->getFillingPercentage();
    }
1371812
public function getMemPercentApplication()
    {
        if ($this->_memApplication !== null) {
            if (($this->_memApplication > 0) && ($this->_memTotal > 0)) {
                return round($this->_memApplication / $this->_memTotal * 100);
            } else {
                return 0;
            }
        } else {
            return null;
        }
    }
219897
public function getDiscount()
    {
        $amount = 0;
        $cart = ShoppingCart::get();
        $items = $cart->TotalItems;
        $discount = $cart->getDiscount();
        
        if ($this->BasePrice && $discount && $discount->Amount) {
            if ($discount->Type == "Fixed") {
                $amount = ($discount->Amount / $items) * $this->Quantity;
            } elseif ($discount->Type == "Percentage") {
                $amount = (($this->Price / 100) * $discount->Amount) * $this->Quantity;
            }
        }
        
        return $amount;
    }
459807
function() {
      var currPercentage = 0;
      log('_bytesTotal = ' + _bytesTotal);
      log('_bytesLoaded = ' + _bytesLoaded);
      currPercentage = Math.round((_bytesLoaded / _bytesTotal) * 100);

      log('Percentage: ' + currPercentage + '%');

      onUpdate(currPercentage);

      if (!_files[_currentSegment].length) {

        // Is there another group of files.
        _currentSegment++;

        if (_files[_currentSegment]) {
          startLoading();
        } else {
          onComplete();
        }
      }
    }
777085
public function getPercentage($round = true)
    {
        if ($this->numApprovedTranslations === 0 || $this->numTranslatable === 0) {
            $result = $round ? 0 : 0.0;
        } elseif ($this->numApprovedTranslations === $this->numTranslatable) {
            $result = $round ? 100 : 100.0;
        } else {
            $result = $this->numApprovedTranslations * 100.0 / $this->numTranslatable;
            if ($round) {
                $result = max(1, min(99, (int) round($result)));
            }
        }

        return $result;
    }
216248
public function returnFullData() {
        
        $aDisk = $this->getSNMP()->realWalk1d(self::OID_DISK);
        $aDiskIo = $this->getSNMP()->realWalk1d(self::OID_DISK_IO);
        
        $aReturn = Array();
        $aReturn['index'] = $aDisk[self::OID_DISK_INDEX];
        $aReturn['device'] = $aDisk[self::OID_DISK_DEVICE];
        $aReturn['path'] = $aDisk[self::OID_DISK_PATH];
        $aReturn['minimum_size'] = $aDisk[self::OID_DISK_MINIMUM];
        $aReturn['minimum_percent'] = $aDisk[self::OID_DISK_MIN_PERCENT];
        $aReturn['total_size'] = $aDisk[self::OID_DISK_TOTAL];
        $aReturn['avaliable_size'] = $aDisk[self::OID_DISK_AVALIABLE];
        $aReturn['used_size'] = $aDisk[self::OID_DISK_USED];
        $aReturn['used_percent'] = $aDisk[self::OID_DISK_USED_PERCENT];
        $aReturn['free_percent'] = $this->freePercentCalculation($aReturn['used_percent']);
        $aReturn['node_percent'] = $aDisk[self::OID_DISK_NODE_PERCENT];
        $aReturn['total_low'] = $aDisk[self::OID_DISK_TOTAL_LOW];
        $aReturn['total_high'] = $aDisk[self::OID_DISK_TOTAL_HIGH];
        $aReturn['avaliable_low'] = $aDisk[self::OID_DISK_AVALIABLE_LOW];
        $aReturn['avaliable_high'] = $aDisk[self::OID_DISK_AVALIABLE_HIGH];
        $aReturn['used_low'] = $aDisk[self::OID_DISK_USED_LOW];
        $aReturn['used_high'] = $aDisk[self::OID_DISK_USED_HIGH];
        $aReturn['error_flag'] = $aDisk[self::OID_DISK_ERROR_FLAG];
        $aReturn['error_msg'] = $aDisk[self::OID_DISK_ERROR_MSG];
        $aReturn['disk_io'] = $aDiskIo;
        return $aReturn;
    }
615383
public function balance() : int
    {
        return ($this->right ? $this->right->height() : 0)
            - ($this->left ? $this->left->height() : 0);
    }
682481
public function getContentLength()
    {
        $length = $this->body->getContentLength();

        return $length === false
            ? $this->limit
            : min($this->limit, min($length, $this->offset + $this->limit) - $this->offset);
    }
1067558
private static function getTotalDataFile()
    {
        $docRoot = self::docRoot();
        $dbDeployPath = $docRoot . '/dbdeploy/data/';
        if (!file_exists($dbDeployPath)) {
            return 0;
        }
        $files = glob($dbDeployPath . '*.sql');

        return count($files);
    }
167167
public function getNormalizeResponseChunkSize() : int
    {
        $chunkSize      = $this->getConfiguration('responseChunkSize', static::DEFAULT_CHUNK_SIZE);
        $chunkSize      = ! is_numeric($chunkSize) ? static::DEFAULT_CHUNK_SIZE : intval(abs($chunkSize));
        $chunkSize      = $chunkSize < 512 ? 512 : $chunkSize;
        return $chunkSize;
    }
839696
public function getMemPercentCache()
    {
        if ($this->_memCache !== null) {
            if (($this->_memCache > 0) && ($this->_memTotal > 0)) {
                if (($this->_memApplication !== null) && ($this->_memApplication > 0)) {
                    return round(($this->_memCache + $this->_memApplication) / $this->_memTotal * 100) - $this->getMemPercentApplication();
                } else {
                    return round($this->_memCache / $this->_memTotal * 100);
                }
            } else {
                return 0;
            }
        } else {
            return null;
        }
    }
107417
public function getFillingPercentage()
    {
        $mem = apc_sma_info(true);
        $memSize    = $mem['num_seg'] * $mem['seg_size'];
        $memAvailable= $mem['avail_mem'];
        $memUsed = $memSize - $memAvailable;
        if ($memSize == 0) {
            Zend_Cache::throwException('can\'t get apc memory size');
        }
        if ($memUsed > $memSize) {
            return 100;
        }
        return ((int) (100. * ($memUsed / $memSize)));
    }
308300
protected function getResourceLength(): int
    {
        if (null === $this->fileName) {
            return parent::getResourceLength();
        }

        if (substr($this->fileName, 0, 16) === 'compress.zlib://') {
            return filesize(substr($this->fileName, 16));
        } elseif (substr($this->fileName, 0, 17) === 'compress.bzip2://') {
            return filesize(substr($this->fileName, 17));
        }

        return parent::getResourceLength();
    }
342077
public function dim($percent)
    {
        if($percent < 0){
            $percent = 0;
        } else if($percent > 100){
            $percent = 100;
        }

        $level = round((255*$percent)/100);

        return $this->bridge->setDeviceStatus($this->deviceId, null, $level);
    }
1021004
public function getBlockEndPosition(): ?int
    {
        if ($this->blockEndPosition === false) {
            $this->blockEndPosition = $this->loadBlockEndPosition();
        }

        return $this->blockEndPosition;
    }
1321947
public function getBasketCost()
    {
        $cost = $this->find()
            ->where([
                'id_user' => $this->idUser,
                'storage' => $this->owner->storageName
            ])
            ->sum('price*count');

        return ($cost) ? $cost : 0;
    }
141441
public function calcResourceMemorySize(): int {
		$imageData = getimagesize($this->filePath);
		
		return round(($imageData[0] * $imageData[1] * $imageData['bits'] * $imageData['channels'] / 8));
	}