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:----ORVObxBISmL1sHx0l7d+aWOPB7kEnlhDQ9YZBlgLwPv+hSei9KEGnVl4OGtPyAWA3ZC6coc+kk95Up5BpEBTkVrLfTPfcE2kOP8JqqF+DsJsJOZO2LhDO1F28iBtQY6AprrcRjpeIHVPtR/0/wYn0Rq4Cddh9z5xAxijPoLvIQ0ZodpO4nLyVIaPTZsdQaGKBcQWbyzL1ivEGbomVIMh3ymUVi2Z+FeiVANAREhvGmnHPa5GoDmbz9cn4zWHzdX/YzacuJAdJDoshqe0xbkZdzth3jgpVwQTqK05Dd0+pDmxvFVeyf0LhHzhTgLDB2JXjiiBLvqqYF0IP+9OO5rfDWsjLPhjzdHfkFDoOz3NjN4qzYXzEO7LSku+lVpi7bxGPESBOitAx/MiSjY9tlAWgPse2vhX0f/VL969FPUV/R0rs1aSND7ByxfS4nA4NBQiz1Zp/xmIUKR0YpawPFiIJ+WKM4PNU/2DhJYWXR8nTI+qsbqLjczX/XL1ggdIzoV+SHEUGH+y3hV4mvN1H66XMQmzxr6e4iqWFn6EK2/CNxSz8jkzatIpdoiY5zZSQwLIKPIhY8Zqsz2ytzb1+q5idS3FxK1o7JSaueabYUTuFh7EUWPpgGEyZhOkku+kwFfHq9mAyhb2oXYb8rFh35Cm5i2nUWxHbflhFm1yJvkk8Vw=----ATTACHMENT:----NTEzNDU4NDMwMDE1NDUxMiA2ODAwNzU3NjE5MTMwMjM2IDMwMTU2MDg2ODA2NjYzNDg=