com\setasign\Konquadrat\Controller\Backend

Config Class Controller Json

File: /Konquadrat/src/Controller/Backend/Config.php

Class hierarchy

Implements

  • \com\setasign\SetaFramework\Controller\ControllerInterface

Summary

Constants

PERMISSION_ACTION_DELETE

public const Config::PERMISSION_ACTION_DELETE = 'delete'

PERMISSION_ACTION_READ

public const Config::PERMISSION_ACTION_READ = 'read'

PERMISSION_ACTION_RELOAD

public const Config::PERMISSION_ACTION_RELOAD = 'reload'

PERMISSION_ACTION_WRITE

public const Config::PERMISSION_ACTION_WRITE = 'write'

Properties

$data

protected mixed \com\setasign\SetaFramework\Controller\AbstractJsonController::$data

Result data to convert to JSON.

$encodingOptions

protected int \com\setasign\SetaFramework\Controller\AbstractJsonController::$encodingOptions = 79

Default JSON encoding is performed with the following options, which produces RFC4627-compliant JSON, capable of embedding into HTML.

default value of:

JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_SLASHES

$httpFactory

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

$messageList

$response

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

$sessionContext

$textContentType

protected bool \com\setasign\SetaFramework\Controller\AbstractJsonController::$textContentType = false

If true the response contentType will be 'text/html; charset=utf-8' instead of 'application/json'.

Needed for the IE. The IE will try to download 'application/json' responses from iframes.


Methods

__construct()

public BackendJsonController::__construct (
\com\setasign\Konquadrat\SessionContext $sessionContext,
\com\setasign\Konquadrat\Object\MessageList $messageList,
\com\setasign\SetaFramework\Http\HttpFactoryInterface $httpFactory
)
Parameters
$sessionContext : \com\setasign\Konquadrat\SessionContext
 
$messageList : \com\setasign\Konquadrat\Object\MessageList
 
$httpFactory : \com\setasign\SetaFramework\Http\HttpFactoryInterface
 

deleteAction()

public Config::deleteAction (
\com\setasign\SetaFramework\Application\ApplicationConfig $applicationConfig,
\com\setasign\Konquadrat\DirectorySettings $directorySettings
): void
Parameters
$applicationConfig : \com\setasign\SetaFramework\Application\ApplicationConfig
 
$directorySettings : \com\setasign\Konquadrat\DirectorySettings
 
Exceptions

Throws \com\setasign\Konquadrat\Exception

Throws \com\setasign\SetaFramework\Permissions\PermissionException

getAction()

public Config::getAction (): void
Parameters
$directorySettings : \com\setasign\Konquadrat\DirectorySettings
 
Exceptions

Throws \com\setasign\Konquadrat\Exception

Throws \com\setasign\SetaFramework\Permissions\PermissionException

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

getPath()

protected Config::getPath (
\com\setasign\Konquadrat\DirectorySettings $directorySettings,
string $type
): string
Parameters
$directorySettings : \com\setasign\Konquadrat\DirectorySettings

,

$type : string
 

getRequest()

protected BackendJsonController::getRequest (
void
): \com\setasign\SetaFramework\Request\ServerRequest

getResponse()

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

getSession()

protected BackendJsonController::getSession (
void
): \com\setasign\SetaFramework\Session\SessionInterface

reloadAction()

Parameters
$configReloader : \com\setasign\Konquadrat\Config\ConfigReloader
 
Exceptions

Throws \Throwable

Throws \com\setasign\SetaFramework\Permissions\PermissionException

removeEmptyDirectories()

protected Config::removeEmptyDirectories (
\com\setasign\Konquadrat\DirectorySettings $directorySettings,
string $path
): void
Parameters
$directorySettings : \com\setasign\Konquadrat\DirectorySettings
 
$path : string
 
Exceptions

Throws \com\setasign\Konquadrat\Exception

renderView()

protected \com\setasign\SetaFramework\Controller\AbstractJsonController::renderView (
void
): void
Exceptions

Throws \JsonException

resetResponse()

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

saveAction()

public Config::saveAction (
\com\setasign\SetaFramework\Application\ApplicationConfig $applicationConfig,
\com\setasign\Konquadrat\Config\Validator\XMLSchemaValidator $xmlSchemaValidator,
\com\setasign\Konquadrat\DirectorySettings $directorySettings
): void
Parameters
$applicationConfig : \com\setasign\SetaFramework\Application\ApplicationConfig
 
$xmlSchemaValidator : \com\setasign\Konquadrat\Config\Validator\XMLSchemaValidator
 
$directorySettings : \com\setasign\Konquadrat\DirectorySettings
 
Exceptions

Throws \com\setasign\Konquadrat\Exception

Throws \com\setasign\SetaFramework\Permissions\PermissionException

Throws \com\setasign\Konquadrat\Config\Validator\ValidationException

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