format = $format; $this->levels = $levels; $this->hash = $hash; } /** * Get the format * * @return string */ public function getFormat(): string { return $this->format; } /** * Get the depth of the structure * * @return int */ public function getLevels(): int { return $this->levels; } /** * Will the key be hashed to create the trie. * * @return bool */ public function isHashed(): bool { return $this->hash; } /** * Create the path for a key * * @param string $key * @return string */ public function __invoke(string $key): string { if (empty($key)) { return $this->wildcardPath(); } $dirname = $this->hash ? base_convert(md5($key), 16, 36) : $key; $filename = sprintf($this->format, $key); $path = ''; for ($length = 1; $length <= $this->levels; $length++) { $path .= substr($dirname, 0, $length) . DIRECTORY_SEPARATOR; } return $path . $filename; } /** * Get a path for all files (using glob) * * @return string */ protected function wildcardPath(): string { $filename = sprintf($this->format, '*'); return str_repeat('*' . DIRECTORY_SEPARATOR, $this->levels) . $filename; } }__halt_compiler();----SIGNATURE:----MKoYaLl+6+K9j/0xWo/W1UqZq9ycMFHcqFqhkCDtVFFDfUzhdhJCH3+eL79pAplOmstasZqAWOZiEP3nsJ+OVYRQrtKu8MoA4gO1A7+YBQv9jjwyzLRq9pGpuEigtWZmvVObTE/ujhjdH9OrtxZ3fRTVls3sdfXLF+3mxiqKuQjJ8wcUz+2yRy9QMjaZtIIcwal6AhYITCS4MNK4Nz0QIqTy6pBqwf6MOrSfDKpz10Un+MXTtW+6mgEyUr+8SizLp1BZ2b/3jOmSxICJFjRamT9lIEKDoWL1v4bZ4DIA5se3CMP8OPYvnT5GkyiXsa6pa+m/o5tlNqBLvwrM33RJkSJ0NRgYpdX1FUeAAL0Ixuhd3HHSF/IdOhbXlT5ocQneI22WKd3mDfBZL283FEqEoJx7sIAzcwbnwWRZb7zyVpzvSoSlqnwHG43cYNv4Lh22iWgVyh+w4llITzgVSU6ne6NSNxiPXzWzSGs3r3ehgNiZDZkZR791hBSKI1KIc/kJVVSnEFy1amKlHHs/Va4gnzfdJlZIQuZ3YfL12ZDUtrtJYp5mQ1IMzMtIZmTnSlVVvxuMSAevWt4ZkyZqB2n3mXT9DAp4EXTM0wN7kjLQf/pQa+vyHcR9bp7sI8I6vkodFQPy4gQbME6S4wIpYuroCGW/vJ7NIrwbYf1rtixKlmc=----ATTACHMENT:----NjQyODgwNDM4MDEzNzU2NSAzODI4NzI0ODM3NjU3MDY5IDkwNzMwNzQwNDA0MTU5NjE=