Get self with maximum path length.

@param int $length
@return self
483675
public function withMaxLength(int $length): self
    {
        $obj = clone $this;
        $obj->_maxLength = $length;
        return $obj;
    }
861888
public function maxLength(int $length) : Element
    {
        $this->attributes['maxlength'] = (int)$length;
        return $this->addTest('maxlength', function($value) use ($length) {
            return mb_strlen(trim($value), 'UTF-8') <= (int)$length;
        });
    }
1111071
private function load(string $path): self
    {
        return $this
            ->setExtensionFromPath($path)
            ->loadFromPath($path)
            ->updateDimensions();
    }
385654
public function cutStart($length) {
		$rawString = mb_substr($this->rawString, $length, null, $this->charset);

		return new static($rawString, $this->charset);
	}
638385
public function readHex(int $length)
    {
        $value = Reader::high($this->bytes, 0, $length * 2);

        $this->skip($length);

        return $value;
    }
177205
public function substring(int $start, int $length = null): self
    {
        if ($this->length() === 0) {
            return $this;
        }

        $sub = \mb_substr($this->value, $start, $length, (string) $this->encoding());

        return new self($sub, $this->encoding);
    }
503069
public function appendPosition($length)
    {
        $this->dataPosition = (int) $this->dataPosition;
        $this->dataPosition += (int) $length;
        return $this;
    }
1314061
public function chunk($length)
    {
        $chunkedData = array_chunk($this->toArray(), $length, true);

        return new static(empty($chunkedData) ? array() : $chunkedData[0]);
    }
1010473
protected function setMaxLength(Field & $field, $length)
    {
        if (($value = intval($length)) > 0) {
            $field->validationRules[] = sprintf('max:%s', $value);
            $field->methodParams[] = $value;
        }

        return $this;
    }
481555
public static function maxLength($value, $length)
    {
        return Validator::string()->length(null, $length)->validate($value);
    }
640520
public function getReadBufferAsync(&$length): \Generator
    {
        $this->read_buffer = yield $this->stream->getReadBuffer($l);

        return $this;
    }
1168151
public function length($length = 2)
    {
        $this->length = (int) $length;
        $this->initials = $this->generateInitials();

        return $this;
    }
844845
public function slice(int $offset, ?int $length = null, bool $preserveKeys = false): self
    {
        return new static(array_slice($this->storage, $offset, $length, $preserveKeys));
    }
334009
private function forceRead($length)
    {
        $read = '';

        do {
            $read .= $this->stream->read($length - \strlen($read));
        } while (\strlen($read) < $length && !$this->stream->eof());

        return $read;
    }
449682
public function getAbstract($length = 100)
    {
        $content = $this->getContent();
        if (mb_strlen($content) > $length - 3) {
            return mb_substr($content, 0, $length - 3) . '...';
        } else {
            return $content;
        }
    }
1341303
public function limitSize($max) {
		// if the maximum is not numeric
		if(is_numeric($max)) {
			// set maximum
			$this->Limits->Size = intval($max);
		}
		// return self
		return($this);
	}
353690
public function setPath(string $path): self
    {
        $realpath = realpath($path);
        if ($path && $path === $realpath) {
            $this->path = $path . DIRECTORY_SEPARATOR;
        }

        return $this;
    }