public static function getAvatarPath($id, $size = 150, $isFolder = false, $pathDir = '') { if (!isset($id)) { $id = 0; } if ($isFolder) { $savePath = StorageHelper::storageSolutionEncode($id); } else { $savePath = StorageHelper::storageSolutionEncode($id) . $id . ".jpg"; } $savePath = StorageHelper::storageSolutionEncode($id) . $id . ".jpg"; $path = $pathDir . DS . $size . DS . $savePath; return $path; }