Controllers, the first stage in processing a route, inherit from the PpciController class. This automatically calls the initialization function function initController( RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
and loads the message service and the App configuration into $this->config
.
Here is a typical implementation example:
class Borrower extends PpciController
{protected $lib;
function __construct()
{$this->lib = new LibrariesBorrower();
}function list()
{return $this->lib->list();
}function display()
{return $this->lib->display();
}function change()
{return $this->lib->change();
}function write()
{return $this->lib->write();
}function delete()
{return $this->lib->delete();
} }