Constants

CACHE_TAG

CACHE_TAG = 'sitebase_cache'

Properties

$translators

$translators : array

Type

array — translators

$internalCacheInstance

$internalCacheInstance : \Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface

Type

\Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface — internal cache instance

$container

$container : \Psr\Container\ContainerInterface

Type

\Psr\Container\ContainerInterface — container

Methods

__construct()

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

constructor

Parameters

\Psr\Container\ContainerInterface $container

Throws

\Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
\Phpfastcache\Exceptions\PhpfastcacheDriverCheckException
\Phpfastcache\Exceptions\PhpfastcacheDriverException
\Phpfastcache\Exceptions\PhpfastcacheDriverNotFoundException
\Phpfastcache\Exceptions\PhpfastcacheInvalidConfigurationException
\ReflectionException

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

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 —

get()

get(mixed  $key, null  $default = null) : mixed|null

retrieves element from cache

Parameters

mixed $key
null $default

Throws

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

Returns

mixed|null —

getCacheLifetime()

getCacheLifetime(int|\DateInterval|null  $ttl = null) : int|\App\Base\Tools\Cache\Dateinterval

gets cache lifetime

Parameters

int|\DateInterval|null $ttl

Throws

\Degami\Basics\Exceptions\BasicException

Returns

int|\App\Base\Tools\Cache\Dateinterval —

set()

set(mixed  $key, mixed  $value, null  $ttl = null) : bool

saves element in cache

Parameters

mixed $key
mixed $value
null $ttl

Throws

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

Returns

bool —

delete()

delete(string  $key) : bool

deletes cached element

Parameters

string $key

Throws

\Psr\Cache\InvalidArgumentException
\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException

Returns

bool —

clear()

clear() : bool

clears cache

Throws

\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException

Returns

bool —

getMultiple()

getMultiple(string[]  $keys, null  $default = null) : iterable

get multiple elements from cache

Parameters

string[] $keys
null $default

Throws

\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException

Returns

iterable —

setMultiple()

setMultiple(mixed  $values, null|int|\DateInterval  $ttl = null) : bool

sets multiple elements into cache

Parameters

mixed $values
null|int|\DateInterval $ttl

Throws

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

Returns

bool —

deleteMultiple()

deleteMultiple(string[]  $keys) : bool

deletes multiple elements from cache

Parameters

string[] $keys

Throws

\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException
\Psr\Cache\InvalidArgumentException

Returns

bool —

has()

has(mixed  $key) : bool

checks if element is present

Parameters

mixed $key

Throws

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

Returns

bool —

getInternalCacheInstance()

getInternalCacheInstance() : \Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface

gets internal cache instance

Returns

\Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface —

getStats()

getStats() : mixed

get cache statistics

Returns

mixed —

getAllItemsByTag()

getAllItemsByTag(string  $tagName) : array

get items by tag

Parameters

string $tagName

Returns

array —

getService()

getService(string  $service_key) : mixed

gets registered service

Parameters

string $service_key

Throws

\Degami\Basics\Exceptions\BasicException

Returns

mixed —