Properties

$translators

$translators :array

Type

array—translators

$container

$container :\Psr\Container\ContainerInterface

Type

\Psr\Container\ContainerInterface—container

Methods

__construct()

__construct(\Psr\Container\ContainerInterface  $container)

constructor

Parameters

\Psr\Container\ContainerInterface $container

getTranslator()

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

gets translator

Parameters

string|null $locale_code

Returns

\Fisharebest\Localization\Translator

__call()

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

{@inheritdocs}

Parameters

string $name
mixed $arguments

Throws

\App\Base\Exceptions\InvalidValueException

Returns

mixed

requestUrl()

requestUrl(string  $url,string  $method = 'GET',array  $options = array()): string|boolean

executes an http request

Parameters

string $url
string $method
array $options

Throws

\Exception
\GuzzleHttp\Exception\GuzzleException

Returns

string|boolean

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

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

getRouting()

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

gets routing service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Site\Routing\Web

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

getEnv()

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

gets env variable

Parameters

string $variable
mixed $default

Throws

\Degami\Basics\Exceptions\BasicException

Returns

mixed

renderFlashMessages()

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

returns flash message html

Parameters

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

Returns

\Degami\Basics\Html\TagList

renderSiteMenu()

renderSiteMenu(string  $locale): string

render site menu

Parameters

string $locale

Throws

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

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

Returns

mixed|string|null

renderPaginator()

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

renders paginator

Parameters

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

Throws

\Degami\Basics\Exceptions\BasicException

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
\Degami\Basics\Exceptions\BasicException

Returns

string

renderLog()

renderLog(  $log): mixed

renders log

Parameters

$log

Throws

\Degami\Basics\Exceptions\BasicException

Returns

mixed

getGravatar()

getGravatar(string  $email,integer  $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

integer $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',integer  $width = 20): string

renders a flag icon

Parameters

$country_code
string $class
integer $width

Throws

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

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

Returns

\Degami\Basics\Html\TagElement

_renderSiteMenu()

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

internally renders site menu

Parameters

array $menu_tree
array|null $parent

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

Returns

\Degami\Basics\Html\TagElement