setModel example

protected $model;

    /** * Constructor. * * @return void */
    public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
    {
        parent::initController($request$response$logger);

        $this->setModel($this->modelName);
    }

    /** * Set or change the model this controller is bound to. * Given either the name or the object, determine the other. * * @param object|string|null $which * * @return void */
    public function setModel($which = null)
    {
Home | Imprint | This part of the site doesn't use cookies.