22 const BUCKET_SIZE = 5000;
41 throw new \InvalidArgumentException(
"GUIDs must be integers > 0.");
55 $bound = $this->getLowerBucketBound($this->guid);
56 return "$bound/$this->guid/";
65 return $this->getPath();
75 private static function getLowerBucketBound(
int $guid,
int $bucket_size = 0) {
76 if ($bucket_size < 1) {
77 $bucket_size = self::BUCKET_SIZE;
80 return (
int) max(floor($guid / $bucket_size) * $bucket_size, 1);
getPath()
Construct a file path matrix for an entity.
$guid
Removes an admin notice.
Locate the relative path of an entity's data dir.
__construct($guid)
Find an entity's data dir.
__toString()
String casting magic method.