. // }}} namespace Component\Avatar\Controller; use App\Core\Controller; use App\Core\GSFile as M; use Exception; use Symfony\Component\HttpFoundation\Request; class Avatar extends Controller { /** * @throws Exception */ public function avatar(Request $request, int $gsactor_id, string $size) { switch ($size) { case 'full': $res = \Component\Avatar\Avatar::getAvatarFileInfo($gsactor_id); return M::sendFile($res['file_path'], $res['mimetype'], $res['title']); default: throw new Exception('Not implemented'); } } }