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 —

renderFlashMessages()

renderFlashMessages(\App\Base\Abstracts\Controllers\BasePage  $controller) : \Degami\Basics\Html\TagList

returns flash message html

Parameters

\App\Base\Abstracts\Controllers\BasePage $controller

Throws

\DI\DependencyException
\DI\NotFoundException

Returns

\Degami\Basics\Html\TagList —

renderSiteMenu()

renderSiteMenu(string  $locale) : string

render site menu

Parameters

string $locale

Throws

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

Returns

string —

renderBlocks()

renderBlocks(string  $region, string|null  $locale = null, \App\Base\Abstracts\Controllers\BasePage|null  $current_page = null) : mixed|string|null

render region blocks

Parameters

string $region
string|null $locale
\App\Base\Abstracts\Controllers\BasePage|null $current_page

Throws

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

Returns

mixed|string|null —

renderPaginator()

renderPaginator(int  $current_page, int  $total, \App\Base\Abstracts\Controllers\BasePage  $controller, int  $page_size = BaseModel::ITEMS_PER_PAGE, int  $visible_links = 2) : string

renders paginator

Parameters

int $current_page
int $total
\App\Base\Abstracts\Controllers\BasePage $controller
int $page_size
int $visible_links

Throws

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

Returns

string —

renderAdminTable()

renderAdminTable(array  $elements, array|null  $header = null, \App\Base\Abstracts\Controllers\BasePage|null  $current_page = null) : string

renders admin table

Parameters

array $elements
array|null $header
\App\Base\Abstracts\Controllers\BasePage|null $current_page

Throws

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

Returns

string —

renderArrayOnTable()

renderArrayOnTable(array  $data, bool  $nowrap = true) : mixed

Renders array as table field name - field value

Parameters

array $data
bool $nowrap

Throws

\DI\DependencyException
\DI\NotFoundException

Returns

mixed —

renderLog()

renderLog( $log) : mixed

renders log

Parameters

$log

Throws

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

Returns

mixed —

renderQueueMessage()

renderQueueMessage(\App\Site\Models\QueueMessage  $message) : mixed

renders queue message

Parameters

\App\Site\Models\QueueMessage $message

Throws

\DI\DependencyException
\DI\NotFoundException

Returns

mixed —

getGravatar()

getGravatar(string  $email, int  $s = 80, string  $d = 'mp', string  $r = 'g', string  $class = 'rounded-circle') : string

Get either a Gravatar image tag for a specified email address.

Parameters

string $email

The email address

int $s

Size in pixels, defaults to 80px [ 1 - 2048 ]

string $d

Default imageset to use [ 404 | mp | identicon | monsterid | wavatar ]

string $r

Maximum rating (inclusive) [ g | pg | r | x ]

string $class

html class

Returns

string —

containing a complete image tag

renderFlag()

renderFlag( $country_code, string  $class = 'flag-icon', int  $width = 20) : string

renders a flag icon

Parameters

$country_code
string $class
int $width

Throws

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

Returns

string —

getIcon()

getIcon(string  $icon_name, array  $attributes = []) : string

gets an icon

Parameters

string $icon_name
array $attributes

Throws

\Degami\Basics\Exceptions\BasicException

Returns

string —

getService()

getService(string  $service_key) : mixed

gets registered service

Parameters

string $service_key

Throws

\Degami\Basics\Exceptions\BasicException

Returns

mixed —

renderMenuLink()

renderMenuLink(array  $leaf, string  $link_class = 'nav-link') : \Degami\Basics\Html\TagElement

internally renders menu link

Parameters

array $leaf
string $link_class

Throws

\DI\DependencyException
\DI\NotFoundException

Returns

\Degami\Basics\Html\TagElement —

internalRenderSiteMenu()

internalRenderSiteMenu(array  $menu_tree, array|null  $parent = null) : \Degami\Basics\Html\TagElement

internally renders site menu

Parameters

array $menu_tree
array|null $parent

Throws

\DI\DependencyException
\DI\NotFoundException

Returns

\Degami\Basics\Html\TagElement —

getPaginatorLi()

getPaginatorLi(string  $li_class, string|null  $href, string  $text) : \Degami\Basics\Html\TagElement

gets paginator li html tag

Parameters

string $li_class
string|null $href
string $text

Throws

\DI\DependencyException
\DI\NotFoundException

Returns

\Degami\Basics\Html\TagElement —