Overview

Namespaces

  • Minion
    • Service
    • Twig

Classes

  • Application
  • Console
  • Controller
  • Utils

Interfaces

  • ControllerInterface
  • Overview
  • Namespace
  • Class

Class Controller

Class Controller.

Minion\Controller implements Minion\ControllerInterface
Abstract
Namespace: Minion
Package: Minion
Author: Damian SzczerbiƄski dszczer@gmail.com
Located at Controller.php
Methods summary
public
# setContainer( Minion\Application $container )

Dependency injection allowing access to framework instance and it's services.

Dependency injection allowing access to framework instance and it's services.

Parameters

$container

Implementation of

Minion\ControllerInterface::setContainer()
public Symfony\Component\HttpFoundation\Response
# render( string $path, array $arguments = [] )

Helper, render template under provided $path.

Helper, render template under provided $path.

Parameters

$path
Path to the template file. If placed in sub-folders, separate them with "/"
$arguments
Arguments passed to template

Returns

Symfony\Component\HttpFoundation\Response

Implementation of

Minion\ControllerInterface::render()
public string
# renderText( string $path, array $arguments = [] )

Helper, render template under provided $path, but returns plain text instead of Response object.

Helper, render template under provided $path, but returns plain text instead of Response object.

Parameters

$path
Path to the template file. If placed in sub-folders, separate them with "/"
$arguments
Arguments passed to template

Returns

string

Implementation of

Minion\ControllerInterface::renderText()
public Symfony\Component\HttpFoundation\Response
# createNotFoundException( string $message, Exception $lastException = null )

Helper, return response with 404 HTTP status code.

Helper, return response with 404 HTTP status code.

Parameters

$message
Message to display
$lastException
Linked exception if any

Returns

Symfony\Component\HttpFoundation\Response

Implementation of

Minion\ControllerInterface::createNotFoundException()
public Symfony\Component\HttpFoundation\Response
# createNotAllowedException( string $message, Exception $lastException = null )

Helper, return response with 403 HTTP status code.

Helper, return response with 403 HTTP status code.

Parameters

$message
Message to display
$lastException
Linked exception if any

Returns

Symfony\Component\HttpFoundation\Response

Implementation of

Minion\ControllerInterface::createNotAllowedException()
public string
# generateUrl( string $route, array $params = [], integer $flag = Minion\UrlGeneratorInterface::ABSOLUTE_URL )

Helper, generate absolute URL path.

Helper, generate absolute URL path.

Parameters

$route
Route name
$params
URL parameters (path and/or query)
$flag
URL generating method

Returns

string
Generated URL

Implementation of

Minion\ControllerInterface::generateUrl()
public mixed
# getParameter( string $name, mixed $default = null )

Helper, get parameter by it's name.

Helper, get parameter by it's name.

Parameters

$name
Parameter name
$default
Default value, if parameter does not exist

Returns

mixed
Parameter or default value

Implementation of

Minion\ControllerInterface::getParameter()
Properties summary
protected Minion\Application $container

Framework

Framework

#
API documentation generated by ApiGen