Manager
extends ContainerAwareObject
in package
implements
CacheInterface
Cache Manager
Table of Contents
Interfaces
- CacheInterface
Constants
- CACHE_TAG = 'sitebase_cache'
Properties
- $internalCacheInstance : ExtendedCacheItemPoolInterface|null
- $translators : array<string|int, mixed>
- $container : ContainerInterface
Methods
- __call() : mixed
- {@inheritdoc}
- __construct() : mixed
- constructor
- clear() : bool
- clears cache
- containerCall() : mixed
- call method through container
- containerMake() : mixed
- create object through container
- delete() : bool
- deletes cached element
- deleteMultiple() : bool
- deletes multiple elements from cache
- get() : mixed
- retrieves element from cache
- getAllItemsByTag() : array<string|int, mixed>
- get items by tag
- getApp() : App
- gets app object
- getApplicationLogger() : Manager
- gets application_logger service
- getAppRouteInfo() : RouteInfo|null
- gets route info
- getAppWebsite() : Website|null
- gets current website
- getAssets() : Manager
- gets assets manager
- getCache() : Manager
- get cache manager
- getCacheLifetime() : int|Dateinterval
- gets cache lifetime
- getContainer() : ContainerInterface
- gets container object
- getCrudRouter() : Crud
- gets crud service
- getDb() : Database
- gets db object
- getDebugbar() : StandardDebugBar
- gets debugbar object
- getEnv() : mixed
- gets env variable
- getEventManager() : SharedEventEmitter
- gets events manager service
- getGoogleAuthenticator() : PHPGangsta_GoogleAuthenticator
- gets google authenticator service
- getGuzzle() : Client
- gets guzzle service
- getHtmlRenderer() : HtmlPartsRenderer
- gets html renderer service
- getIcons() : Icons
- gets icons service
- getImagine() : Imagine
- gets imagine service
- getInternalCacheInstance() : ExtendedCacheItemPoolInterface
- gets internal cache instance
- getLog() : Logger
- gets log object
- getMailer() : Mailer
- gets mailer service
- getMultiple() : iterable<string|int, mixed>
- get multiple elements from cache
- getPdo() : PDO
- gets PDO object
- getRedis() : Manager
- gets redis service
- getRequest() : Request
- gets current request object
- getRouters() : array<string|int, mixed>
- gets routers
- getSchema() : Schema
- gets schema object
- getSearch() : Manager
- gets search service
- getSesMailer() : SesClient
- gets SES mailer service
- getSiteData() : SiteData
- gets site data service
- getSmtpMailer() : Swift_Mailer
- gets SMTP mailer service
- getStats() : DriverStatistic
- get cache statistics
- getTemplates() : Engine
- gets plates engine object
- getTranslator() : Translator
- gets translator
- getUtils() : Globals
- gets global utils service
- getWebhooksRouter() : Webhooks
- gets webhooks service
- getWebRouter() : Web
- gets routing service
- getZip() : Zip
- gets zip service
- has() : bool
- checks if element is present
- requestUrl() : string|bool
- executes an http request
- set() : bool
- saves element in cache
- setMultiple() : bool
- sets multiple elements into cache
- getService() : mixed
- gets registered service
Constants
CACHE_TAG
public
mixed
CACHE_TAG
= 'sitebase_cache'
Properties
$internalCacheInstance
public
static ExtendedCacheItemPoolInterface|null
$internalCacheInstance
= null
internal cache instance
$translators
public
static array<string|int, mixed>
$translators
= []
translators
$container
protected
ContainerInterface
$container
Methods
__call()
{@inheritdoc}
public
__call(string $name, mixed $arguments) : mixed
Parameters
- $name : string
- $arguments : mixed
__construct()
constructor
public
__construct(ContainerInterface $container) : mixed
Parameters
- $container : ContainerInterface
Tags
clear()
clears cache
public
clear() : bool
Tags
Return values
boolcontainerCall()
call method through container
public
containerCall(callable $callable[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
- $callable : callable
- $arguments : array<string|int, mixed> = []
containerMake()
create object through container
public
containerMake(string $className[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
- $className : string
- $arguments : array<string|int, mixed> = []
delete()
deletes cached element
public
delete(string $key) : bool
Parameters
- $key : string
Tags
Return values
booldeleteMultiple()
deletes multiple elements from cache
public
deleteMultiple(array<string|int, string> $keys) : bool
Parameters
- $keys : array<string|int, string>
Tags
Return values
boolget()
retrieves element from cache
public
get(mixed $key[, mixed|null $default = null ]) : mixed
Parameters
- $key : mixed
- $default : mixed|null = null
Tags
getAllItemsByTag()
get items by tag
public
getAllItemsByTag(string $tagName) : array<string|int, mixed>
Parameters
- $tagName : string
Return values
array<string|int, mixed>getApp()
gets app object
public
getApp() : App
Tags
Return values
AppgetApplicationLogger()
gets application_logger service
public
getApplicationLogger() : Manager
Tags
Return values
ManagergetAppRouteInfo()
gets route info
public
getAppRouteInfo() : RouteInfo|null
Return values
RouteInfo|nullgetAppWebsite()
gets current website
public
getAppWebsite() : Website|null
Return values
Website|nullgetAssets()
gets assets manager
public
getAssets() : Manager
Tags
Return values
ManagergetCache()
get cache manager
public
getCache() : Manager
Tags
Return values
ManagergetCacheLifetime()
gets cache lifetime
public
getCacheLifetime([int|DateInterval|null $ttl = null ]) : int|Dateinterval
Parameters
- $ttl : int|DateInterval|null = null
Tags
Return values
int|DateintervalgetContainer()
gets container object
public
getContainer() : ContainerInterface
Return values
ContainerInterfacegetCrudRouter()
gets crud service
public
getCrudRouter() : Crud
Tags
Return values
CrudgetDb()
gets db object
public
getDb() : Database
Tags
Return values
DatabasegetDebugbar()
gets debugbar object
public
getDebugbar() : StandardDebugBar
Tags
Return values
StandardDebugBargetEnv()
gets env variable
public
getEnv(string $variable[, mixed $default = null ]) : mixed
Parameters
- $variable : string
- $default : mixed = null
Tags
getEventManager()
gets events manager service
public
getEventManager() : SharedEventEmitter
Tags
Return values
SharedEventEmittergetGoogleAuthenticator()
gets google authenticator service
public
getGoogleAuthenticator() : PHPGangsta_GoogleAuthenticator
Tags
Return values
PHPGangsta_GoogleAuthenticatorgetGuzzle()
gets guzzle service
public
getGuzzle() : Client
Tags
Return values
ClientgetHtmlRenderer()
gets html renderer service
public
getHtmlRenderer() : HtmlPartsRenderer
Tags
Return values
HtmlPartsRenderergetIcons()
gets icons service
public
getIcons() : Icons
Tags
Return values
IconsgetImagine()
gets imagine service
public
getImagine() : Imagine
Tags
Return values
ImaginegetInternalCacheInstance()
gets internal cache instance
public
getInternalCacheInstance() : ExtendedCacheItemPoolInterface
Return values
ExtendedCacheItemPoolInterfacegetLog()
gets log object
public
getLog() : Logger
Tags
Return values
LoggergetMailer()
gets mailer service
public
getMailer() : Mailer
Tags
Return values
MailergetMultiple()
get multiple elements from cache
public
getMultiple(array<string|int, string> $keys[, null $default = null ]) : iterable<string|int, mixed>
Parameters
- $keys : array<string|int, string>
- $default : null = null
Tags
Return values
iterable<string|int, mixed>getPdo()
gets PDO object
public
getPdo() : PDO
Tags
Return values
PDOgetRedis()
gets redis service
public
getRedis() : Manager
Tags
Return values
ManagergetRequest()
gets current request object
public
getRequest() : Request
Tags
Return values
RequestgetRouters()
gets routers
public
getRouters() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getSchema()
gets schema object
public
getSchema() : Schema
Tags
Return values
SchemagetSearch()
gets search service
public
getSearch() : Manager
Tags
Return values
ManagergetSesMailer()
gets SES mailer service
public
getSesMailer() : SesClient
Tags
Return values
SesClientgetSiteData()
gets site data service
public
getSiteData() : SiteData
Tags
Return values
SiteDatagetSmtpMailer()
gets SMTP mailer service
public
getSmtpMailer() : Swift_Mailer
Tags
Return values
Swift_MailergetStats()
get cache statistics
public
getStats() : DriverStatistic
Return values
DriverStatisticgetTemplates()
gets plates engine object
public
getTemplates() : Engine
Tags
Return values
EnginegetTranslator()
gets translator
public
getTranslator([string|null $locale_code = null ]) : Translator
Parameters
- $locale_code : string|null = null
Tags
Return values
TranslatorgetUtils()
gets global utils service
public
getUtils() : Globals
Tags
Return values
GlobalsgetWebhooksRouter()
gets webhooks service
public
getWebhooksRouter() : Webhooks
Tags
Return values
WebhooksgetWebRouter()
gets routing service
public
getWebRouter() : Web
Tags
Return values
WebgetZip()
gets zip service
public
getZip() : Zip
Tags
Return values
Ziphas()
checks if element is present
public
has(mixed $key) : bool
Parameters
- $key : mixed
Tags
Return values
boolrequestUrl()
executes an http request
public
requestUrl(string $url[, string $method = 'GET' ][, array<string|int, mixed> $options = [] ]) : string|bool
Parameters
- $url : string
- $method : string = 'GET'
- $options : array<string|int, mixed> = []
Tags
Return values
string|boolset()
saves element in cache
public
set(mixed $key, mixed $value[, null $ttl = null ]) : bool
Parameters
- $key : mixed
- $value : mixed
- $ttl : null = null
Tags
Return values
boolsetMultiple()
sets multiple elements into cache
public
setMultiple(mixed $values[, null $ttl = null ]) : bool
Parameters
- $values : mixed
- $ttl : null = null
Tags
Return values
boolgetService()
gets registered service
protected
getService(string $service_key) : mixed
Parameters
- $service_key : string