com\setasign\SetaFramework\Controller

AbstractController Class AbstractController

File: /SetaFramework/src/Controller/AbstractController.php

Class hierarchy

Implements

Summary

Properties

$params

private array AbstractController::$params = array()

Contains the params of the controller

$response

protected ?\Psr\Http\Message\ResponseInterface AbstractController::$response

Methods

getParam()

public AbstractController::getParam (
string $name,
mixed $default = null
): ?mixed

Returns a param if it exists otherwise this will return $default

Parameters
$name : string
 
$default : mixed
 

getParams()

public AbstractController::getParams (
void
): array

Get all existing params

getResponse()

public AbstractController::getResponse (
void
): \Psr\Http\Message\ResponseInterface

renderView()

protected AbstractController::renderView (
void
): void

Renders the view

Exceptions

Throws \com\setasign\SetaFramework\View\ViewException

resetResponse()

public AbstractController::resetResponse (
void
): void

setParam()

public AbstractController::setParam (
string $name,
mixed $value
): ControllerInterface

Sets a param

Parameters
$name : string
 
$value : mixed
 

setParams()

Set a array of params

Note: The params will be merged with the existing params!!

Parameters
$params : array