Image extends Base
Table of Contents
- THUMBNAIL_DIMENSIONS = [[2560, 1440], [1920, 1080], [1366, 768], [1024, 768], [640, 480], [320, 240], [160, 160]]
- $entityManager : EntityManager
- $queryBuilder : QueryBuilder
- $request : Request
- $router : Router
- $view : Json
- __construct() : mixed
- delete() : void
- Deletes image by ID
- edit() : Image
- Edits image by ID
- getOneById() : Image
- Gets one image by ID
- getState() : array<string|int, string>
- Returns API state
- registerDefaultRoutes() : void
- Register default routes
- registerRoutes() : void
- Register routes to router
- requestDispatch() : void
- Dispatch request to predefined routes
- setRequest() : void
- Sets request
- setView() : void
- Sets view
- upload() : void
- Creates new image
- checkPerms() : void
- Checks user permitions on route action
Constants
THUMBNAIL_DIMENSIONS
public
array<string|int, array<string|int, int>>
THUMBNAIL_DIMENSIONS
= [[2560, 1440], [1920, 1080], [1366, 768], [1024, 768], [640, 480], [320, 240], [160, 160]]
Properties
$entityManager
protected
EntityManager
$entityManager
$queryBuilder
protected
QueryBuilder
$queryBuilder
$request
protected
Request
$request
$router
protected
Router
$router
$view
protected
Json
$view
Methods
__construct()
public
__construct(EntityManager $entityManager) : mixed
Parameters
- $entityManager : EntityManager
Return values
mixed —delete()
Deletes image by ID
public
delete(int $id) : void
Parameters
- $id : int
Return values
void —edit()
Edits image by ID
public
edit(int $id) : Image
Parameters
- $id : int
Return values
Image —getOneById()
Gets one image by ID
public
getOneById(int $id) : Image
Parameters
- $id : int
Return values
Image —getState()
Returns API state
public
getState() : array<string|int, string>
Tags
Return values
array<string|int, string> —registerDefaultRoutes()
Register default routes
public
registerDefaultRoutes(Router $router) : void
Parameters
- $router : Router
Return values
void —registerRoutes()
Register routes to router
public
registerRoutes(Router $router) : void
Parameters
- $router : Router
Return values
void —requestDispatch()
Dispatch request to predefined routes
public
requestDispatch(Router $router, Request $request) : void
Parameters
Return values
void —setRequest()
Sets request
public
setRequest(Request $request) : void
Parameters
- $request : Request
Return values
void —setView()
Sets view
public
setView(string $view) : void
Parameters
- $view : string
Return values
void —upload()
Creates new image
public
upload() : void
Return values
void —checkPerms()
Checks user permitions on route action
private
checkPerms(Route $route) : void
Parameters
- $route : Route