Documentation

Webhooks extends BaseRouter
in package

Webhooks Router Class

Table of Contents

Constants

ROUTER_TYPE  = 'webhook'

Properties

$translators  : array<string|int, mixed>
$avoid_parameter_names  : array<string|int, mixed>
$container  : ContainerInterface
$dispatcher  : Dispatcher
$routes  : array<string|int, mixed>

Methods

__call()  : mixed
{@inheritdoc}
__construct()  : mixed
class constructor
addRoute()  : self
adds a route
checkRoute()  : bool
checks a route
containerCall()  : mixed
call method through container
containerMake()  : mixed
create object through container
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
getBaseUrl()  : string|null
return base site url
getCache()  : Manager
get cache manager
getContainer()  : ContainerInterface
gets container object
getCrudRouter()  : Crud
gets crud service
getDb()  : Database
gets db object
getDebugbar()  : StandardDebugBar
gets debugbar object
getDispatcher()  : Dispatcher
gets dispatcher
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
getHttpVerbs()  : array<string|int, string>
defines http default verbs
getIcons()  : Icons
gets icons service
getImagine()  : Imagine
gets imagine service
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
getRequestInfo()  : RouteInfo
returns a RouteInfo instance for current request
getRoute()  : array<string|int, mixed>|null
gets a single route
getRouters()  : array<string|int, mixed>
gets routers
getRoutes()  : array<string|int, mixed>
gets routes
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
getUrl()  : string
Returns url for given route
getUtils()  : Globals
gets global utils service
getWebhooksRouter()  : Webhooks
gets webhooks service
getWebRouter()  : Web
gets routing service
getZip()  : Zip
gets zip service
isEnabled()  : bool
determines if router is available
requestUrl()  : string|bool
executes an http request
checkRewrites()  : Rewrite|null
gets rewrite object by uri
checkRouteParameters()  : bool
checks route parameters
checkRouteVerbs()  : array<string|int, mixed>
checks route http verbs
getArrayFromCache()  : array<string|int, mixed>
gets array from cache
getCachedControllers()  : array<string|int, mixed>
gets cached controllers
getCachedRewrites()  : array<string|int, mixed>
gets cached routes
getCacheKey()  : string
compose cache key
getClassHttpVerbs()  : array<string|int, mixed>
gets Class applicable route http verbs
getRouteByClass()  : array<string|int, mixed>
gets route by class
getRouterName()  : string
gets Router name
getService()  : mixed
gets registered service
setArrayInCache()  : self
sets array in cache
setCachedControllers()  : self
sets cached controllers
setCachedRoutes()  : $this
sets cached routes
insertRoute()  : self
adds a route
insertRoutes()  : self
adds routes

Constants

ROUTER_TYPE

public mixed ROUTER_TYPE = 'webhook'

Properties

$translators

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

translators

$avoid_parameter_names

protected array<string|int, mixed> $avoid_parameter_names = ['container', 'route_info', 'route_data']

reserved parameter names

$container

protected ContainerInterface $container

$dispatcher

protected Dispatcher $dispatcher

dispatcher

$routes

protected array<string|int, mixed> $routes

routes

Methods

__construct()

class constructor

public __construct(ContainerInterface $container) : mixed
Parameters
$container : ContainerInterface
Tags
throws
Exception

addRoute()

adds a route

public addRoute(string $group, string $name, string $path, string $class[, string $method = self::CLASS_METHOD ][, array<string|int, string> $verbs = ['GET', 'POST'] ]) : self
Parameters
$group : string
$name : string
$path : string
$class : string
$method : string = self::CLASS_METHOD
$verbs : array<string|int, string> = ['GET', 'POST']
Return values
self

checkRoute()

checks a route

public checkRoute(string $route) : bool
Parameters
$route : string
Tags
throws
BasicException
throws
PhpfastcacheSimpleCacheException
Return values
bool

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

getBaseUrl()

return base site url

public getBaseUrl() : string|null
Tags
throws
BasicException
Return values
string|null

getContainer()

gets container object

public getContainer() : ContainerInterface
Return values
ContainerInterface

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

getDispatcher()

gets dispatcher

public getDispatcher() : Dispatcher
Return values
Dispatcher

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

getHttpVerbs()

defines http default verbs

public getHttpVerbs() : array<string|int, string>
Return values
array<string|int, string>

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

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

getRequestInfo()

returns a RouteInfo instance for current request

public getRequestInfo([string|null $http_method = null ][, string|null $request_uri = null ][, string|null $domain = null ]) : RouteInfo
Parameters
$http_method : string|null = null
$request_uri : string|null = null
$domain : string|null = null
Tags
throws
BasicException
throws
DependencyException
throws
NotFoundException
throws
PhpfastcacheSimpleCacheException
Return values
RouteInfo

getRoute()

gets a single route

public getRoute(string $name) : array<string|int, mixed>|null
Parameters
$name : string
Return values
array<string|int, mixed>|null

getRouters()

gets routers

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

getRoutes()

gets routes

public getRoutes() : array<string|int, mixed>
Tags
throws
BasicException
throws
InvalidValueException
throws
PhpfastcacheSimpleCacheException
throws
Exception
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

getUrl()

Returns url for given route

public getUrl(string $route_name[, array<string|int, mixed> $route_params = [] ]) : string
Parameters
$route_name : string
$route_params : array<string|int, mixed> = []
Tags
throws
BasicException
Return values
string

isEnabled()

determines if router is available

public static isEnabled() : bool
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

checkRewrites()

gets rewrite object by uri

protected checkRewrites(string $uri) : Rewrite|null
Parameters
$uri : string
Return values
Rewrite|null

checkRouteParameters()

checks route parameters

protected checkRouteParameters(string $route) : bool
Parameters
$route : string
Return values
bool

checkRouteVerbs()

checks route http verbs

protected checkRouteVerbs(array<string|int, mixed> $verbs) : array<string|int, mixed>
Parameters
$verbs : array<string|int, mixed>
Return values
array<string|int, mixed>

getArrayFromCache()

gets array from cache

protected getArrayFromCache(mixed $array_name) : array<string|int, mixed>
Parameters
$array_name : mixed
Tags
throws
BasicException
throws
PhpfastcacheSimpleCacheException
Return values
array<string|int, mixed>

getCachedControllers()

gets cached controllers

protected getCachedControllers() : array<string|int, mixed>
Tags
throws
BasicException
throws
PhpfastcacheSimpleCacheException
Return values
array<string|int, mixed>

getCachedRewrites()

gets cached routes

protected getCachedRewrites() : array<string|int, mixed>
Tags
throws
BasicException
throws
PhpfastcacheSimpleCacheException
Return values
array<string|int, mixed>

getCacheKey()

compose cache key

protected getCacheKey(string $element) : string
Parameters
$element : string
Return values
string

getClassHttpVerbs()

gets Class applicable route http verbs

protected getClassHttpVerbs(mixed $controller_class) : array<string|int, mixed>
Parameters
$controller_class : mixed
Tags
throws
InvalidValueException
Return values
array<string|int, mixed>

getRouteByClass()

gets route by class

protected getRouteByClass(string $class[, string|null $uri = null ][, string|null $http_method = null ]) : array<string|int, mixed>
Parameters
$class : string
$uri : string|null = null
$http_method : string|null = null
Return values
array<string|int, mixed>

getRouterName()

gets Router name

protected getRouterName() : string
Return values
string

getService()

gets registered service

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

setArrayInCache()

sets array in cache

protected setArrayInCache(mixed $array_name, mixed $array) : self
Parameters
$array_name : mixed
$array : mixed
Tags
throws
BasicException
throws
PhpfastcacheSimpleCacheException
Return values
self

setCachedControllers()

sets cached controllers

protected setCachedControllers(array<string|int, mixed> $controllers) : self
Parameters
$controllers : array<string|int, mixed>
Tags
throws
BasicException
throws
PhpfastcacheSimpleCacheException
Return values
self

setCachedRoutes()

sets cached routes

protected setCachedRoutes(array<string|int, mixed> $routes) : $this
Parameters
$routes : array<string|int, mixed>
Tags
throws
BasicException
throws
PhpfastcacheSimpleCacheException
Return values
$this

insertRoute()

adds a route

private insertRoute(RouteCollector $r, array<string|int, mixed> $p) : self
Parameters
$r : RouteCollector
$p : array<string|int, mixed>
Return values
self

insertRoutes()

adds routes

private insertRoutes(RouteCollector $r, array<string|int, mixed> $paths) : self
Parameters
$r : RouteCollector
$paths : array<string|int, mixed>
Return values
self

        
On this page

Search results