Documentation

App extends ContainerAwareObject
in package
uses ContainerAwareTrait, ToolsTrait, TranslatorsTrait

App class

Table of Contents

Constants

APP  = 'app'
ASSETS  = 'assets'
BLOCKS_NAMESPACE  = 'App\Site\Blocks'
COMMANDS  = 'commands'
COMMANDS_NAMESPACE  = 'App\Site\Commands'
CONFIG  = 'config'
CONTROLLERS  = 'controllers'
CONTROLLERS_NAMESPACE  = 'App\Site\Controllers'
CRON_TASKS_NAMESPACE  = 'App\Site\Cron\Tasks'
CRUD_NAMESPACE  = 'App\Site\Crud'
DUMPS  = 'dumps'
FLAGS  = 'flags'
GRAPHQL  = 'graphql'
GRAPHQL_RESOLVERS_NAMESPACE  = 'App\Site\GraphQL\Resolvers'
LOGS  = 'logs'
MEDIA  = 'media'
MIGRATIONS  = 'migrations'
MIGRATIONS_NAMESPACE  = 'App\Site\Migrations'
MODELS  = 'models'
MODELS_NAMESPACE  = 'App\Site\Models'
QUEUES_NAMESPACE  = 'App\Site\Queues'
ROOT  = 'root'
ROUTING  = 'routing'
ROUTING_NAMESPACE  = 'App\Site\Routing'
TEMPLATES  = 'templates'
TMP  = 'tmp'
TRANSLATIONS  = 'translations'
WEBHOOKS_NAMESPACE  = 'App\Site\Webhooks'
WEBROOT  = 'pub'

Properties

$instance  : App|null
$translators  : array<string|int, mixed>
$blocked_ips  : array<string|int, mixed>
$container  : ContainerInterface
$current_locale  : string|null

Methods

__call()  : mixed
{@inheritdoc}
__construct()  : mixed
class constructor
bootstrap()  : mixed
application bootstrap
containerCall()  : mixed
call method through container
containerMake()  : mixed
create object through container
event()  : self
emits an events
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
getContainer()  : ContainerInterface
gets container object
getCrudRouter()  : Crud
gets crud service
getCurrentLocale()  : string|null
gets current locale
getDb()  : Database
gets db object
getDebugbar()  : StandardDebugBar
gets debugbar object
getDir()  : string|null
gets application directory by type
getDirs()  : array<string|int, mixed>
gets application directories
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
getInstance()  : App
get current app instance
getLog()  : Logger
gets log object
getMailer()  : Mailer
gets mailer service
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
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
isBlocked()  : bool
checks if ip address is blocked
requestUrl()  : string|bool
executes an http request
setCurrentLocale()  : self
sets current locale
genericErrorPage()  : string
getService()  : mixed
gets registered service
isSiteOffline()  : bool
checks if site is offline

Constants

APP

public mixed APP = 'app'

ASSETS

public mixed ASSETS = 'assets'

BLOCKS_NAMESPACE

public mixed BLOCKS_NAMESPACE = 'App\Site\Blocks'

COMMANDS

public mixed COMMANDS = 'commands'

COMMANDS_NAMESPACE

public mixed COMMANDS_NAMESPACE = 'App\Site\Commands'

CONFIG

public mixed CONFIG = 'config'

CONTROLLERS

public mixed CONTROLLERS = 'controllers'

CONTROLLERS_NAMESPACE

public mixed CONTROLLERS_NAMESPACE = 'App\Site\Controllers'

CRON_TASKS_NAMESPACE

public mixed CRON_TASKS_NAMESPACE = 'App\Site\Cron\Tasks'

CRUD_NAMESPACE

public mixed CRUD_NAMESPACE = 'App\Site\Crud'

DUMPS

public mixed DUMPS = 'dumps'

FLAGS

public mixed FLAGS = 'flags'

GRAPHQL

public mixed GRAPHQL = 'graphql'

GRAPHQL_RESOLVERS_NAMESPACE

public mixed GRAPHQL_RESOLVERS_NAMESPACE = 'App\Site\GraphQL\Resolvers'

LOGS

public mixed LOGS = 'logs'

MEDIA

public mixed MEDIA = 'media'

MIGRATIONS

public mixed MIGRATIONS = 'migrations'

MIGRATIONS_NAMESPACE

public mixed MIGRATIONS_NAMESPACE = 'App\Site\Migrations'

MODELS

public mixed MODELS = 'models'

MODELS_NAMESPACE

public mixed MODELS_NAMESPACE = 'App\Site\Models'

QUEUES_NAMESPACE

public mixed QUEUES_NAMESPACE = 'App\Site\Queues'

ROOT

public mixed ROOT = 'root'

ROUTING

public mixed ROUTING = 'routing'

ROUTING_NAMESPACE

public mixed ROUTING_NAMESPACE = 'App\Site\Routing'

TEMPLATES

public mixed TEMPLATES = 'templates'

TMP

public mixed TMP = 'tmp'

TRANSLATIONS

public mixed TRANSLATIONS = 'translations'

WEBHOOKS_NAMESPACE

public mixed WEBHOOKS_NAMESPACE = 'App\Site\Webhooks'

WEBROOT

public mixed WEBROOT = 'pub'

Properties

$instance

public static App|null $instance = null

$translators

public static array<string|int, mixed> $translators = []

translators

$blocked_ips

protected array<string|int, mixed> $blocked_ips = []

blocked ips list

$current_locale

protected string|null $current_locale = null

current locale

Methods

__call()

{@inheritdoc}

public __call(string $name, mixed $arguments) : mixed
Parameters
$name : string
$arguments : mixed
Tags
throws
InvalidValueException

__construct()

class constructor

public __construct() : mixed

bootstrap()

application bootstrap

public bootstrap() : mixed
Tags
throws
BasicException
throws
Throwable

containerCall()

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> = []

event()

emits an events

public event(string $event_name, mixed $event_data) : self
Parameters
$event_name : string
$event_data : mixed
Tags
throws
BasicException
Return values
self

getContainer()

gets container object

public getContainer() : ContainerInterface
Return values
ContainerInterface

getCurrentLocale()

gets current locale

public getCurrentLocale() : string|null
Return values
string|null

getDb()

gets db object

public getDb() : Database
Tags
throws
BasicException
Return values
Database

getDebugbar()

gets debugbar object

public getDebugbar() : StandardDebugBar
Tags
throws
BasicException
Return values
StandardDebugBar

getDir()

gets application directory by type

public static getDir(string $type) : string|null
Parameters
$type : string
Return values
string|null

getDirs()

gets application directories

public static getDirs() : array<string|int, mixed>
Return values
array<string|int, mixed>

getEnv()

gets env variable

public getEnv(string $variable[, mixed $default = null ]) : mixed
Parameters
$variable : string
$default : mixed = null
Tags
throws
BasicException

getEventManager()

gets events manager service

public getEventManager() : SharedEventEmitter
Tags
throws
BasicException
Return values
SharedEventEmitter

getGoogleAuthenticator()

gets google authenticator service

public getGoogleAuthenticator() : PHPGangsta_GoogleAuthenticator
Tags
throws
BasicException
Return values
PHPGangsta_GoogleAuthenticator

getGuzzle()

gets guzzle service

public getGuzzle() : Client
Tags
throws
BasicException
Return values
Client

getIcons()

gets icons service

public getIcons() : Icons
Tags
throws
BasicException
Return values
Icons

getImagine()

gets imagine service

public getImagine() : Imagine
Tags
throws
BasicException
Return values
Imagine

getInstance()

get current app instance

public static getInstance() : App
Return values
App

getLog()

gets log object

public getLog() : Logger
Tags
throws
BasicException
Return values
Logger

getPdo()

gets PDO object

public getPdo() : PDO
Tags
throws
BasicException
Return values
PDO

getRequest()

gets current request object

public getRequest() : Request
Tags
throws
BasicException
Return values
Request

getRouters()

gets routers

public getRouters() : array<string|int, mixed>
Tags
throws
BasicException
Return values
array<string|int, mixed>

getSchema()

gets schema object

public getSchema() : Schema
Tags
throws
BasicException
Return values
Schema

getSesMailer()

gets SES mailer service

public getSesMailer() : SesClient
Tags
throws
BasicException
Return values
SesClient

getSmtpMailer()

gets SMTP mailer service

public getSmtpMailer() : Swift_Mailer
Tags
throws
BasicException
Return values
Swift_Mailer

getTemplates()

gets plates engine object

public getTemplates() : Engine
Tags
throws
BasicException
Return values
Engine

getTranslator()

gets translator

public getTranslator([string|null $locale_code = null ]) : Translator
Parameters
$locale_code : string|null = null
Tags
throws
DependencyException
throws
NotFoundException
Return values
Translator

isBlocked()

checks if ip address is blocked

public isBlocked(string $ip_address) : bool
Parameters
$ip_address : string
Return values
bool

requestUrl()

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
throws
Exception
throws
GuzzleException
Return values
string|bool

setCurrentLocale()

sets current locale

public setCurrentLocale([string|null $locale = null ]) : self
Parameters
$locale : string|null = null
Return values
self

genericErrorPage()

protected genericErrorPage(string $title, string $errorMessage) : string
Parameters
$title : string
$errorMessage : string
Return values
string

getService()

gets registered service

protected getService(string $service_key) : mixed
Parameters
$service_key : string
Tags
throws
BasicException

isSiteOffline()

checks if site is offline

protected isSiteOffline() : bool
Return values
bool

        
On this page

Search results