Imbo\EventListener\ImageVariations\Storage\S3::getImagePath PHP Метод

getImagePath() приватный Метод

Get the path to an image
private getImagePath ( string $user, string $imageIdentifier, integer $width = null, boolean $includeFilename = true ) : string
$user string The user which the image belongs to
$imageIdentifier string Image identifier
$width integer Width of the image, in pixels
$includeFilename boolean Whether or not to include the last part of the path (the filename itself)
Результат string
    private function getImagePath($user, $imageIdentifier, $width = null, $includeFilename = true)
    {
        $userPath = str_pad($user, 3, '0', STR_PAD_LEFT);
        $parts = ['imageVariation', $userPath[0], $userPath[1], $userPath[2], $user, $imageIdentifier[0], $imageIdentifier[1], $imageIdentifier[2], $imageIdentifier];
        if ($includeFilename) {
            $parts[] = $width;
        }
        return implode('/', $parts);
    }