ProfilePictureService
extends StorageBaseService
in package
A simple helper to handle profile picture uploads
Tags
Table of Contents
- BASE_PATH = __ROOT__
- PUBLIC_PATH = self::BASE_PATH . '/public/'
- SAVE_PATH = self::BASE_PATH . '/public/' . self::WEB_PATH
- WEB_PATH = '/jinya-content/'
- deleteProfilePicture() : void
- Deletes the artists' profile picture
- saveProfilePicture() : void
- Sets and saves the profile picture of the given artist
- getFileHash() : string
- Hashes the given resources content
Constants
BASE_PATH
public
string
BASE_PATH
= __ROOT__
The base path of Jinya CMS
Tags
PUBLIC_PATH
public
mixed
PUBLIC_PATH
= self::BASE_PATH . '/public/'
Tags
SAVE_PATH
public
string
SAVE_PATH
= self::BASE_PATH . '/public/' . self::WEB_PATH
The full base path for stored files
Tags
WEB_PATH
public
string
WEB_PATH
= '/jinya-content/'
The base path for web data
Tags
Methods
deleteProfilePicture()
Deletes the artists' profile picture
public
deleteProfilePicture(int $artistId) : void
Parameters
- $artistId : int
Tags
Return values
void —saveProfilePicture()
Sets and saves the profile picture of the given artist
public
saveProfilePicture(int $artistId, string $data) : void
Parameters
- $artistId : int
- $data : string
Tags
Return values
void —getFileHash()
Hashes the given resources content
protected
getFileHash(resource $fileContent) : string
Parameters
- $fileContent : resource