Returns the maximum number of chunks in the file

@return  int
@throws  BadMethodCallException  if $name property is null
@since  0.1.0
329832
public function getMaxChunks()
	{
		return ceil(($this->name !== null ? filesize($this->name) : 0) / $this->size);
	}
871865
public function getChunkString()
    {
        if (!$this->curChunkSize) {
            return false;
        }
        $chunk = $this->read($this->curChunkSize);
        $this->curChunkSize = null;
        return $chunk;
    }
786565
public function getMaxLength($csv_file = null)
	{
		$csv_file = $csv_file ? $csv_file : $this->csv_file;

		$sizes = array(0);
		if( ! $csv_file )
		{
			throw new NoDataException();
		}

		foreach($csv_file as $line)
		{
			$sizes[]=count($line->getElements() );
		}

		return max($sizes);
	}
1349502
public function getUsedWidth(): int
    {
        $maxWidth = 0;

        /** @var PackedItem $item */
        foreach ($this->items as $item) {
            $maxWidth = max($maxWidth, $item->getX() + $item->getWidth());
        }

        return $maxWidth;
    }
860564
public function getLimit()
    {
        if ($this->max > 0) {
            return min($this->max, $this->limit);
        }

        return $this->limit;
    }
140379
public function max_size_per_file($name, $value, $max){
        if(! $this->not_empty($name, $value)){
            return TRUE;
        }
        $ok= TRUE;
        foreach ($value['size'] as $size) {
            if($size > $max){
                $ok= FALSE;
                break;
            }
        }
        
        if($ok){
            return TRUE;
        }else{
            $this->add_message($name, 'max_per_file', array('max' => $max));
            return FALSE;
        }
    }
896195
private function getFilesMaxAge($path, $names = array(), $default = 0)
    {
        $finder = new Finder();
        $finder->files()->in(realpath($path))->ignoreDotFiles(true);
        foreach ($names as $name) {
            $finder->name($name);
        }
        $ages = array();
        foreach ($finder as $file) {
            $ages[] = filemtime($file);
        }
        return max(array_merge($ages, array($default)));
    }
381695
public long fileLength(String name) throws IOException {
    return fs.getFileStatus(new Path(directory, name)).getLen();
  }
965637
public function getBytes()
    {
        if ($this->bytes === null) {
            $this->bytes = array_map(
                function ($chunk) {
                    return (int) $chunk;
                },
                explode('.', $this->address)
            );
        }

        return $this->bytes;
    }
1279856
public static function getMaxAllowedPacket(): int
  {
    if (!isset(self::$maxAllowedPacket))
    {
      $query              = "show variables like 'max_allowed_packet'";
      $max_allowed_packet = self::executeRow1($query);

      self::$maxAllowedPacket = $max_allowed_packet['Value'];

      // Note: When setting $chunkSize equal to $maxAllowedPacket it is not possible to transmit a LOB
      // with size $maxAllowedPacket bytes (but only $maxAllowedPacket - 8 bytes). But when setting the size of
      // $chunkSize less than $maxAllowedPacket than it is possible to transmit a LOB with size
      // $maxAllowedPacket bytes.
      self::$chunkSize = (int)min(self::$maxAllowedPacket - 8, 1024 * 1024);
    }

    return (int)self::$maxAllowedPacket;
  }
1184100
public function getFullLength()
    {
        $cmd_length = 1;

        $rl_length = strlen($this->remaining_length_bytes);

        return $cmd_length + $rl_length + $this->remaining_length;
    }
532505
public function getMaxUploadSize()
    {
        $maxUpload = (int)(ini_get('upload_max_filesize'));
        $maxPost = (int)(ini_get('post_max_size'));
        $memoryLimit = (int)(ini_get('memory_limit'));
        return min($maxUpload, $maxPost, $memoryLimit);
    }
1108514
public function getMaxAllowedPacket(): int
  {
    if (!isset($this->maxAllowedPacket))
    {
      $query              = "show variables like 'max_allowed_packet'";
      $max_allowed_packet = $this->executeRow1($query);

      $this->maxAllowedPacket = $max_allowed_packet['Value'];

      // Note: When setting $chunkSize equal to $maxAllowedPacket it is not possible to transmit a LOB
      // with size $maxAllowedPacket bytes (but only $maxAllowedPacket - 8 bytes). But when setting the size of
      // $chunkSize less than $maxAllowedPacket than it is possible to transmit a LOB with size
      // $maxAllowedPacket bytes.
      $this->chunkSize = (int)min($this->maxAllowedPacket - 8, 1024 * 1024);
    }

    return (int)$this->maxAllowedPacket;
  }
940727
protected function Chunks(){
		$level = 0;
		$parenLevel = 0;
		$lastMultiCommentEndBrace = null;
		$lastOpening = null;
		$lastMultiComment = null;
		$lastParen = null;

		for( $this->parserCurrentIndex = 0; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++ ){
			$cc = $this->CharCode($this->parserCurrentIndex);
			if ((($cc >= 97) && ($cc <= 122)) || ($cc < 34)) {
				// a-z or whitespace
				continue;
			}

			switch ($cc) {

				// (
				case 40:
					$parenLevel++;
					$lastParen = $this->parserCurrentIndex;
					break;

				// )
				case 41:
					$parenLevel--;
					if( $parenLevel < 0 ){
						return $this->fail("missing opening `(`");
					}
					break;

				// ;
				case 59:
					//if (!$parenLevel) { $this->emitChunk();	}
					break;

				// {
				case 123:
					$level++;
					$lastOpening = $this->parserCurrentIndex;
					break;

				// }
				case 125:
					$level--;
					if( $level < 0 ){
						return $this->fail("missing opening `{`");

					}
					//if (!$level && !$parenLevel) { $this->emitChunk(); }
					break;
				// \
				case 92:
					if ($this->parserCurrentIndex < $this->input_len - 1) { $this->parserCurrentIndex++; break; }
					return $this->fail("unescaped `\\`");

				// ", ' and `
				case 34:
				case 39:
				case 96:
					$matched = 0;
					$currentChunkStartIndex = $this->parserCurrentIndex;
					for ($this->parserCurrentIndex = $this->parserCurrentIndex + 1; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++) {
						$cc2 = $this->CharCode($this->parserCurrentIndex);
						if ($cc2 > 96) { continue; }
						if ($cc2 == $cc) { $matched = 1; break; }
						if ($cc2 == 92) {        // \
							if ($this->parserCurrentIndex == $this->input_len - 1) {
								return $this->fail("unescaped `\\`");
							}
							$this->parserCurrentIndex++;
						}
					}
					if ($matched) { break; }
					return $this->fail("unmatched `" . chr($cc) . "`", $currentChunkStartIndex);

				// /, check for comment
				case 47:
					if ($parenLevel || ($this->parserCurrentIndex == $this->input_len - 1)) { break; }
					$cc2 = $this->CharCode($this->parserCurrentIndex+1);
					if ($cc2 == 47) {
						// //, find lnfeed
						for ($this->parserCurrentIndex = $this->parserCurrentIndex + 2; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++) {
							$cc2 = $this->CharCode($this->parserCurrentIndex);
							if (($cc2 <= 13) && (($cc2 == 10) || ($cc2 == 13))) { break; }
						}
					} else if ($cc2 == 42) {
						// /*, find */
						$lastMultiComment = $currentChunkStartIndex = $this->parserCurrentIndex;
						for ($this->parserCurrentIndex = $this->parserCurrentIndex + 2; $this->parserCurrentIndex < $this->input_len - 1; $this->parserCurrentIndex++) {
							$cc2 = $this->CharCode($this->parserCurrentIndex);
							if ($cc2 == 125) { $lastMultiCommentEndBrace = $this->parserCurrentIndex; }
							if ($cc2 != 42) { continue; }
							if ($this->CharCode($this->parserCurrentIndex+1) == 47) { break; }
						}
						if ($this->parserCurrentIndex == $this->input_len - 1) {
							return $this->fail("missing closing `*/`", $currentChunkStartIndex);
						}
					}
					break;

				// *, check for unmatched */
				case 42:
					if (($this->parserCurrentIndex < $this->input_len - 1) && ($this->CharCode($this->parserCurrentIndex+1) == 47)) {
						return $this->fail("unmatched `/*`");
					}
					break;
			}
		}

		if( $level !== 0 ){
			if( ($lastMultiComment > $lastOpening) && ($lastMultiCommentEndBrace > $lastMultiComment) ){
				return $this->fail("missing closing `}` or `*/`", $lastOpening);
			} else {
				return $this->fail("missing closing `}`", $lastOpening);
			}
		} else if ( $parenLevel !== 0 ){
			return $this->fail("missing closing `)`", $lastParen);
		}


		//chunk didn't fail


		//$this->emitChunk(true);
	}
873452
private int getMaxPartCount()
	{
		int max = 0;
		for (Object k : super.fWords.keySet())
		{
			String key = k.toString();
			int count = key.split("\\s+?").length;
			if (count > max)
			{
				max = count;
			}
		}
		return max;
	}
545054
public static function getFileUploadLimit()
    {

        $max_upload = self::toBytes(ini_get('upload_max_filesize'));
        $max_post = self::toBytes(ini_get('post_max_size'));
        $memory_limit = self::toBytes(ini_get('memory_limit'));

        $returnValue = min($max_upload, $max_post, $memory_limit);

        return (int)$returnValue;
    }
1209700
protected function getFileName()
    {
        $fileName = parent::getFileName();

        if ($this->maxCount !== false) {
            $fileName = strtr($fileName, [$this->countPlaceHolder => $this->currentFileCount]);
        }

        return $fileName;
    }