Properties

$translators

$translators : array

Type

array — translators

$container

$container : \Psr\Container\ContainerInterface

Type

\Psr\Container\ContainerInterface — container

Methods

__construct()

__construct(\Psr\Container\ContainerInterface  $container) : mixed

constructor

Parameters

\Psr\Container\ContainerInterface $container

Returns

mixed —

getTranslator()

getTranslator(string|null  $locale_code = null) : \Fisharebest\Localization\Translator

gets translator

Parameters

string|null $locale_code

Throws

\DI\DependencyException
\DI\NotFoundException

Returns

\Fisharebest\Localization\Translator —

__call()

__call(string  $name, mixed  $arguments) : mixed

{@inheritdocs}

Parameters

string $name
mixed $arguments

Throws

\App\Base\Exceptions\InvalidValueException

Returns

mixed —

getContainer()

getContainer() : \Psr\Container\ContainerInterface

gets container object

Returns

\Psr\Container\ContainerInterface —

getApp()

getApp() : \App\App

gets app object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\App —

getLog()

getLog() : \Monolog\Logger

gets log object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Monolog\Logger —

getTemplates()

getTemplates() : \League\Plates\Engine

gets plates engine object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\League\Plates\Engine —

getDebugbar()

getDebugbar() : \DebugBar\StandardDebugBar

gets debugbar object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\DebugBar\StandardDebugBar —

getDb()

getDb() : \LessQL\Database

gets db object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\LessQL\Database —

getPdo()

getPdo() : \PDO

gets PDO object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\PDO —

getSchema()

getSchema() : \Degami\SqlSchema\Schema

gets schema object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Degami\SqlSchema\Schema —

getEventManager()

getEventManager() : \Gplanchat\EventManager\SharedEventEmitter

gets events manager service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Gplanchat\EventManager\SharedEventEmitter —

getWebRouter()

getWebRouter() : \App\Site\Routing\Web

gets routing service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Site\Routing\Web —

getCrudRouter()

getCrudRouter() : \App\Site\Routing\Crud

gets crud service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Site\Routing\Crud —

getRouters()

getRouters() : array

gets routers

Throws

\Degami\Basics\Exceptions\BasicException

Returns

array —

getUtils()

getUtils() : \App\Base\Tools\Utils\Globals

gets global utils service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Base\Tools\Utils\Globals —

getSiteData()

getSiteData() : \App\Base\Tools\Utils\SiteData

gets site data service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Base\Tools\Utils\SiteData —

getAssets()

getAssets() : \App\Base\Tools\Assets\Manager

gets assets manager

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Base\Tools\Assets\Manager —

getGuzzle()

getGuzzle() : \GuzzleHttp\Client

gets guzzle service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\GuzzleHttp\Client —

getImagine()

getImagine() : \Imagine\Gd\Imagine

gets imagine service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Imagine\Gd\Imagine —

getMailer()

getMailer() : \App\Base\Tools\Utils\Mailer

gets mailer service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Base\Tools\Utils\Mailer —

getSesMailer()

getSesMailer() : \Aws\Ses\SesClient

gets SES mailer service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Aws\Ses\SesClient —

getSmtpMailer()

getSmtpMailer() : \Swift_Mailer

gets SMTP mailer service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Swift_Mailer —

getCache()

getCache() : \App\Base\Tools\Cache\Manager

get cache manager

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Base\Tools\Cache\Manager —

getHtmlRenderer()

getHtmlRenderer() : \App\Base\Tools\Utils\HtmlPartsRenderer

gets html renderer service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Base\Tools\Utils\HtmlPartsRenderer —

getIcons()

getIcons() : \Feather\Icons

gets icons service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Feather\Icons —

getElasticsearch()

getElasticsearch() : \ElasticSearch\Client

gets elasticsearch service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\ElasticSearch\Client —

getEnv()

getEnv(string  $variable, mixed  $default = null) : mixed

gets env variable

Parameters

string $variable
mixed $default

Throws

\Degami\Basics\Exceptions\BasicException

Returns

mixed —

getRequest()

getRequest() : \Symfony\Component\HttpFoundation\Request

gets current request object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Symfony\Component\HttpFoundation\Request —

getAppRouteInfo()

getAppRouteInfo() : \App\Site\Routing\RouteInfo|null

gets route info

Returns

\App\Site\Routing\RouteInfo|null —

getAppWebsite()

getAppWebsite() : \App\Site\Models\Website|null

gets current website

Returns

\App\Site\Models\Website|null —

requestUrl()

requestUrl(string  $url, string  $method = 'GET', array  $options = []) : string|bool

executes an http request

Parameters

string $url
string $method
array $options

Throws

\Exception
\GuzzleHttp\Exception\GuzzleException

Returns

string|bool —

getWebsitesSelectOptions()

getWebsitesSelectOptions() : array

gets websites options for selects

Returns

array —

getSiteLanguagesSelectOptions()

getSiteLanguagesSelectOptions(int|null  $website_id = null) : array

gets site languages options for selects

Parameters

int|null $website_id

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException
\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException

Returns

array —

errorPage()

errorPage(int  $error_code, \Symfony\Component\HttpFoundation\Request|null  $request, \App\Site\Routing\RouteInfo|null  $route_info = null, array  $template_data = [], string|null  $template_name = null) : \Symfony\Component\HttpFoundation\Response

return an error page

Parameters

int $error_code
\Symfony\Component\HttpFoundation\Request|null $request
\App\Site\Routing\RouteInfo|null $route_info
array $template_data
string|null $template_name

Throws

\Degami\Basics\Exceptions\BasicException
\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException
\Throwable

Returns

\Symfony\Component\HttpFoundation\Response —

exceptionPage()

exceptionPage(\Throwable  $exception, \Symfony\Component\HttpFoundation\Request|null  $request, \App\Site\Routing\RouteInfo|null  $route_info = null) : \Symfony\Component\HttpFoundation\Response

returns a exception error page

Parameters

\Throwable $exception
\Symfony\Component\HttpFoundation\Request|null $request
\App\Site\Routing\RouteInfo|null $route_info

Throws

\Degami\Basics\Exceptions\BasicException
\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException
\Throwable

Returns

\Symfony\Component\HttpFoundation\Response —

blockedIpPage()

blockedIpPage(\Symfony\Component\HttpFoundation\Request  $request, \App\Site\Routing\RouteInfo|null  $route_info = null) : \Symfony\Component\HttpFoundation\Response

returns a blocked ip exception error page

Parameters

\Symfony\Component\HttpFoundation\Request $request
\App\Site\Routing\RouteInfo|null $route_info

Throws

\Degami\Basics\Exceptions\BasicException
\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException
\Throwable
\DI\DependencyException
\DI\NotFoundException

Returns

\Symfony\Component\HttpFoundation\Response —

exceptionJson()

exceptionJson(\Exception  $exception, \Symfony\Component\HttpFoundation\Request  $request) : \Symfony\Component\HttpFoundation\Response

returns an exception error json

Parameters

\Exception $exception
\Symfony\Component\HttpFoundation\Request $request

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException
\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException

Returns

\Symfony\Component\HttpFoundation\Response —

exceptionXML()

exceptionXML(\Exception  $exception, \Symfony\Component\HttpFoundation\Request  $request) : \Symfony\Component\HttpFoundation\Response

returns an exception error xml

Parameters

\Exception $exception
\Symfony\Component\HttpFoundation\Request $request

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException
\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException

Returns

\Symfony\Component\HttpFoundation\Response —

getEmptyRouteInfo()

getEmptyRouteInfo() : mixed

gets an empty RouteInfo object

Throws

\DI\DependencyException
\DI\NotFoundException

Returns

mixed —

offlinePage()

offlinePage(\Symfony\Component\HttpFoundation\Request|null  $request, \App\Site\Routing\RouteInfo|null  $route_info = null) : \Symfony\Component\HttpFoundation\Response

returns a "site is offline" error page

Parameters

\Symfony\Component\HttpFoundation\Request|null $request
\App\Site\Routing\RouteInfo|null $route_info

Throws

\Degami\Basics\Exceptions\BasicException
\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException
\Throwable
\DI\DependencyException
\DI\NotFoundException

Returns

\Symfony\Component\HttpFoundation\Response —

logException()

logException(\Throwable  $e, string|null  $prefix = null, \Symfony\Component\HttpFoundation\Request|null  $request = null) : mixed

logs an exception

Parameters

\Throwable $e
string|null $prefix
\Symfony\Component\HttpFoundation\Request|null $request

Throws

\Degami\Basics\Exceptions\BasicException

Returns

mixed —

httpRequest()

httpRequest(string  $url, string  $method = 'GET', array  $options = []) : string|bool

executes an http request

Parameters

string $url
string $method
array $options

Throws

\GuzzleHttp\Exception\GuzzleException
\Degami\Basics\Exceptions\BasicException

Returns

string|bool —

translate()

translate(string  $string, string|null  $locale = null) : string

translates a string

Parameters

string $string
string|null $locale

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException

Returns

string —

checkPass()

checkPass(string  $pass, string  $encoded_pass) : bool

checks password

Parameters

string $pass
string $encoded_pass

Returns

bool —

getEncodedPass()

getEncodedPass(string  $pass) : string

gets encoded version of password

Parameters

string $pass

Throws

\Degami\Basics\Exceptions\BasicException

Returns

string —

addQueueMessage()

addQueueMessage(string  $queue_name, mixed  $data) : \App\Site\Models\QueueMessage

adds message to queue

Parameters

string $queue_name
mixed $data

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException

Returns

\App\Site\Models\QueueMessage —

randString()

randString(int  $length = 10) : string

computes a random string

Parameters

int $length

Returns

string —

getWrappedMailBody()

getWrappedMailBody(string  $subject, string  $mail_body, string  $template_name = 'generic') : string

Parameters

string $subject
string $mail_body
string $template_name

Throws

\Degami\Basics\Exceptions\BasicException
\Throwable

Returns

string —

queueInternalMail()

queueInternalMail(string  $from, string  $to, string  $subject, string  $body, string  $template_name = 'generic') : \App\Site\Models\QueueMessage

Parameters

string $from
string $to
string $subject
string $body
string $template_name

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException
\Throwable

Returns

\App\Site\Models\QueueMessage —

queueContactFormMail()

queueContactFormMail(string  $from, string  $to, string  $subject, string  $body) : \App\Site\Models\QueueMessage

Parameters

string $from
string $to
string $subject
string $body

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException
\Throwable

Returns

\App\Site\Models\QueueMessage —

queueLinksFormMail()

queueLinksFormMail(string  $from, string  $to, string  $subject, string  $body) : \App\Site\Models\QueueMessage

Parameters

string $from
string $to
string $subject
string $body

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException
\Throwable

Returns

\App\Site\Models\QueueMessage —

getService()

getService(string  $service_key) : mixed

gets registered service

Parameters

string $service_key

Throws

\Degami\Basics\Exceptions\BasicException

Returns

mixed —

logRequestIfNeeded()

logRequestIfNeeded( $status_code, \Symfony\Component\HttpFoundation\Request  $request) : mixed

logs request (if needed)

Parameters

$status_code
\Symfony\Component\HttpFoundation\Request $request

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException
\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException

Returns

mixed —

queueMail()

queueMail(string  $from, string  $to, string  $subject, string  $body, string  $queue_name, string  $template_name = 'generic') : \App\Site\Models\QueueMessage

Parameters

string $from
string $to
string $subject
string $body
string $queue_name
string $template_name

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException
\Throwable

Returns

\App\Site\Models\QueueMessage —