21 const BUCKET_SIZE = 5000;
35 throw new \InvalidArgumentException(
"GUIDs must be integers > 0.");
49 $bound = $this->getLowerBucketBound($this->guid);
50 return "$bound/$this->guid/";
59 return $this->getPath();
69 private static function getLowerBucketBound(
$guid, $bucket_size = null) {
70 if (!$bucket_size || $bucket_size < 1) {
71 $bucket_size = self::BUCKET_SIZE;
76 return (
int) max(floor(
$guid / $bucket_size) * $bucket_size, 1);
getPath()
Construct a file path matrix for an entity.
$guid
Removes an admin notice.
__construct($guid)
Find an entity's data dir.
__toString()
String casting magic method.