52 lines
737 B
PHP
52 lines
737 B
PHP
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Application;
|
|
|
|
/**
|
|
* class Controller.
|
|
*
|
|
* @author Simon Vieille <simon@deblan.fr>
|
|
*/
|
|
abstract class Controller
|
|
{
|
|
/**
|
|
* @var Application
|
|
*/
|
|
protected $app;
|
|
|
|
/*
|
|
* Set the value of "app".
|
|
*
|
|
* @param Application $app
|
|
*
|
|
* @return Controller
|
|
*/
|
|
public function setApp($app)
|
|
{
|
|
$this->app = $app;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/*
|
|
* Get the value of "app".
|
|
*
|
|
* @return Application
|
|
*/
|
|
public function getApp()
|
|
{
|
|
return $this->app;
|
|
}
|
|
|
|
/**
|
|
* Registers routes.
|
|
*
|
|
* @param Application $app
|
|
*
|
|
* @return void
|
|
*/
|
|
abstract public function registerRoutes();
|
|
}
|