\AppController

A Controller class

Controllers for all routes

Summary

Methods
Properties
Constants
__construct()
home()
login()
authenticate()
admin()
create()
store()
show()
json()
edit()
update()
media()
delete()
editSettings()
updateSettings()
No public properties found
No constants found
No protected methods found
$view
$flash
$container
N/A
No private methods found
No private properties found
N/A

Properties

$view

$view : \App\Twig

Store Twig view

Type

\App\Twig — object

$flash

$flash : \App\Messages

Store Slim flash messages

Type

\App\Messages — object

$container

$container : \App\App

Store Slim app container

Type

\App\App — container object

Methods

__construct()

__construct(object  $container) 

Initialize controller

Parameters

object $container

App container object

home()

home(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response) : \Psr\Http\Message\ResponseInterface

Home page

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response

Returns

\Psr\Http\Message\ResponseInterface

login()

login(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response) : \Psr\Http\Message\ResponseInterface

Login page

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response

Returns

\Psr\Http\Message\ResponseInterface

authenticate()

authenticate(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response) : \Psr\Http\Message\ResponseInterface

Authenticate login

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response

Returns

\Psr\Http\Message\ResponseInterface

admin()

admin(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response) : \Psr\Http\Message\ResponseInterface

List of presentations

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response

Returns

\Psr\Http\Message\ResponseInterface

create()

create(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response) : \Psr\Http\Message\ResponseInterface

Create presentation

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response

Returns

\Psr\Http\Message\ResponseInterface

store()

store(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response) : \Psr\Http\Message\ResponseInterface

Store presentation

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response

Returns

\Psr\Http\Message\ResponseInterface

show()

show(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response, Array  $args) : \Psr\Http\Message\ResponseInterface

Show presentation

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response
Array $args

Returns

\Psr\Http\Message\ResponseInterface

json()

json(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response, Array  $args) : \Psr\Http\Message\ResponseInterface

Presentation slide as json

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response
Array $args

Returns

\Psr\Http\Message\ResponseInterface

edit()

edit(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response, Array  $args) : \Psr\Http\Message\ResponseInterface

Edit presentation

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response
Array $args

Returns

\Psr\Http\Message\ResponseInterface

update()

update(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response, Array  $args) : \Psr\Http\Message\ResponseInterface

Update presentation

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response
Array $args

Returns

\Psr\Http\Message\ResponseInterface

media()

media(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response) : \Psr\Http\Message\ResponseInterface

List of media files

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response

Returns

\Psr\Http\Message\ResponseInterface

delete()

delete(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response) : \Psr\Http\Message\ResponseInterface

Delete media or presentation file

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response

Returns

\Psr\Http\Message\ResponseInterface

editSettings()

editSettings(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response) : \Psr\Http\Message\ResponseInterface

Edit username and password

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response

Returns

\Psr\Http\Message\ResponseInterface

updateSettings()

updateSettings(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response) : \Psr\Http\Message\ResponseInterface

Update usernamde and password

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response

Returns

\Psr\Http\Message\ResponseInterface