com\setasign\SetaSite\Controller\Frontend

ResourceFile Class ResourceFile

File: /SetaSite/src/Controller/Frontend/ResourceFile.php

Class hierarchy

  • com\setasign\SetaFramework\Controller\AbstractController

Implements

  • \com\setasign\SetaFramework\Controller\ControllerInterface

Summary

Constants

EVENT_BEFORE_RENDER

public const ResourceFile::EVENT_BEFORE_RENDER = 'setasite.frontend_resource_controller.before_render'

Will be triggered when a resource is requested and before it existence is checked.


Type: Event
extraParams:
'type' => &string
'params' => &array

EVENT_GET_UNKNOWN_RESOURCE_TYPE

public const ResourceFile::EVENT_GET_UNKNOWN_RESOURCE_TYPE = 'setasite.frontend_resource_controller.get_unknown_resource_type'

Will be triggered when a resource type will be requested that is unknown.


Type: Event
extraParams:
'type' => string
'params' => array
'file' => &string

Properties

$httpFactory

protected \com\setasign\SetaFramework\Http\HttpFactoryInterface \com\setasign\SetaFramework\Controller\AbstractController::$httpFactory

$response

protected ?\Psr\Http\Message\ResponseInterface \com\setasign\SetaFramework\Controller\AbstractController::$response

Methods

__construct()

public \com\setasign\SetaFramework\Controller\AbstractController::__construct (
\com\setasign\SetaFramework\Http\HttpFactoryInterface $httpFactory
)
Parameters
$httpFactory : \com\setasign\SetaFramework\Http\HttpFactoryInterface
 

getParam()

public \com\setasign\SetaFramework\Controller\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 \com\setasign\SetaFramework\Controller\AbstractController::getParams (
void
): array

Get all existing params

getResourceAction()

public ResourceFile::getResourceAction (
\com\setasign\SetaFramework\Request\ServerRequest $request,
\com\setasign\SetaFramework\Di\Di $di,
\com\setasign\SetaFramework\EventManager\EventManager $eventManager,
\com\setasign\SetaSite\Module\ModuleManager $moduleManager
): void
Parameters
$request : \com\setasign\SetaFramework\Request\ServerRequest
 
$di : \com\setasign\SetaFramework\Di\Di
 
$eventManager : \com\setasign\SetaFramework\EventManager\EventManager
 
$moduleManager : \com\setasign\SetaSite\Module\ModuleManager
 
Exceptions

Throws \com\setasign\SetaSite\Exception

Throws \com\setasign\SetaSite\FileSystem\FilesystemException

Throws \com\setasign\SetaSite\HttpErrorException

getResponse()

public \com\setasign\SetaFramework\Controller\AbstractController::getResponse (
void
): \Psr\Http\Message\ResponseInterface

renderView()

protected ResourceFile::renderView (
void
): void
Exceptions

Throws \com\setasign\SetaSite\Exception

resetResponse()

public \com\setasign\SetaFramework\Controller\AbstractController::resetResponse (
void
): void

setParam()

public \com\setasign\SetaFramework\Controller\AbstractController::setParam (
string $name,
mixed $value
): \com\setasign\SetaFramework\Controller\ControllerInterface

Sets a param

Parameters
$name : string
 
$value : mixed
 

setParams()

public \com\setasign\SetaFramework\Controller\AbstractController::setParams (
array $params
): \com\setasign\SetaFramework\Controller\ControllerInterface

Set a array of params

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

Parameters
$params : array