# API documentation
# Core\Application
# BaseApplication
class abstract
Full name: \Pandora3\Core\Application\BaseApplication
Implements: \Pandora3\Core\Interfaces\ApplicationInterface
Constants:
public const MODE_DEV = 'dev'
public const MODE_PROD = 'prod'
public const MODE_TEST = 'test'
Properties:
property mode
Type: string
public $mode: string
property path
Type: string
public $path: string
property config
Type: \Pandora3\Core\Registry\Registry
public $config: \Pandora3\Core\Registry\Registry
property container
Type: \Pandora3\Core\Container\Container
public $container: \Pandora3\Core\Container\Container
property properties
Type: array
protected $properties = []: array
Methods:
method run
public run( string $mode = self::MODE_DEV ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$mode | string |
method execute
abstract protected execute( ): mixed
Returns:
Type: mixed
method handleRuntimeError
protected handleRuntimeError( \Throwable $ex ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$ex | \Throwable |
method loadConfig
protected loadConfig( string $path ): array
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$path | string |
Returns:
Type: array
method isMode
public isMode( string $mode ): bool
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$mode | string |
Returns:
Type: bool
method getConfig
protected getConfig( ): array
Returns:
Type: array
method setProperty
protected setProperty( string $property, \Closure|string $dependency ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$property | string | |
$dependency | \Closure | string |
method setProperties
protected setProperties( array $properties ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$properties | array |
method dependencies
protected dependencies( \Pandora3\Core\Container\Container $container ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$container | \Pandora3\Core\Container\Container |
# Core\Application\Exceptions
# UnregisteredMiddlewareException
class
Full name: \Pandora3\Core\Application\Exceptions\UnregisteredMiddlewareException
Extends: \RuntimeException
Implements: \Pandora3\Core\Interfaces\Exceptions\CoreException
Methods:
method __construct
public __construct( string $middlewareName, \Throwable|null $previous = null )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$middlewareName | string | |
$previous | \Throwable | null |
# Core\Container
# Container
class
Full name: \Pandora3\Core\Container\Container
Properties:
property instances
Type: array
protected $instances = []: array
property dependencies
Type: array
protected $dependencies = []: array
Methods:
method has
public has( string $property ): bool
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$property | string |
Returns:
Type: bool
method get
public get( string $abstract, array $params ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$abstract | string | |
$params | array |
Returns:
Type: mixed
Throws:
\Pandora3\Core\Container\Exceptions\ContainerException
method resolve
protected resolve( string|\Closure $abstract, array $params = [] ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$abstract | string | \Closure | |
$params | array |
Returns:
Type: mixed
Throws:
\Pandora3\Core\Container\Exceptions\ContainerException
method build
protected build( string $class, array $params = [] ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$class | string | |
$params | array |
Returns:
Type: mixed
Throws:
\Pandora3\Core\Container\Exceptions\ContainerException
method resolveDependencies
protected resolveDependencies( string $className, \ReflectionParameter[] $dependencies, array $params = [] ): array
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$className | string | |
$dependencies | \ReflectionParameter[] | |
$params | array |
Returns:
Type: array
Throws:
\Pandora3\Core\Container\Exceptions\ContainerException
method resolvePrimitive
protected resolvePrimitive( \ReflectionParameter $parameter, string $className ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$parameter | \ReflectionParameter | |
$className | string |
Returns:
Type: mixed
Throws:
\Pandora3\Core\Container\Exceptions\ParameterNotResolvedException
method setDependenciesShared
public setDependenciesShared( array $dependencies ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$dependencies | array |
method setDependencies
public setDependencies( array $dependencies ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$dependencies | array |
method setShared
public setShared( string $abstract, string|\Closure $dependency ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$abstract | string | |
$dependency | string | \Closure |
method set
public set( string $abstract, string|\Closure $dependency ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$abstract | string | |
$dependency | string | \Closure |
# Core\Container\Exceptions
# ClassNotFoundException
class
Full name: \Pandora3\Core\Container\Exceptions\ClassNotFoundException
Extends: \Pandora3\Core\Container\Exceptions\ContainerException
Methods:
method __construct
public __construct( string $className, \Throwable|null $previous = null )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$className | string | |
$previous | \Throwable | null |
# ContainerException
class abstract
Full name: \Pandora3\Core\Container\Exceptions\ContainerException
Extends: \RuntimeException
Implements: \Pandora3\Core\Interfaces\Exceptions\CoreException
# DependencyNotInstantiableException
class
Full name: \Pandora3\Core\Container\Exceptions\DependencyNotInstantiableException
Extends: \Pandora3\Core\Container\Exceptions\ContainerException
Methods:
method __construct
public __construct( string $dependency, \Throwable|null $previous = null )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$dependency | string | |
$previous | \Throwable | null |
# ParameterNotResolvedException
class
Full name: \Pandora3\Core\Container\Exceptions\ParameterNotResolvedException
Extends: \Pandora3\Core\Container\Exceptions\ContainerException
Methods:
method __construct
public __construct( string $className, string $parameter, \Throwable|null $previous = null )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$className | string | |
$parameter | string | |
$previous | \Throwable | null |
# Core\Controller
# Controller
class abstract
Full name: \Pandora3\Core\Controller\Controller
Implements: \Pandora3\Core\Interfaces\ControllerInterface,
\Pandora3\Core\Interfaces\RequestDispatcherInterface
Properties:
property app
Type: \Pandora3\Libs\Application\Application
public $app: \Pandora3\Libs\Application\Application
property baseUri
Type: string
public $baseUri: string
property dispatcher
Type: \Pandora3\Core\Interfaces\RequestDispatcherInterface
protected $dispatcher: \Pandora3\Core\Interfaces\RequestDispatcherInterface
property request
Type: \Pandora3\Core\Interfaces\RequestInterface
protected $request: \Pandora3\Core\Interfaces\RequestInterface
property layout
Type: string
protected $layout = 'Layout/Main.twig': string
property name
Type: string
protected $name: string
property initialised
Type: bool
private $initialised: bool
property app
Type: \Pandora3\Libs\Application\Application
protected $app: \Pandora3\Libs\Application\Application
property container
Type: \Pandora3\Core\Container\Container
protected $container: \Pandora3\Core\Container\Container
Methods:
method redirectUri
protected redirectUri( string $uri, array $queryParams = [] ): \Pandora3\Core\Interfaces\ResponseInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$uri | string | |
$queryParams | array |
Returns:
Type: \Pandora3\Core\Interfaces\ResponseInterface
method render
protected render( string $view, array $context = [] ): \Pandora3\Core\Interfaces\ResponseInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$view | string | |
$context | array |
Returns:
Type: \Pandora3\Core\Interfaces\ResponseInterface
Throws:
\Pandora3\Core\Controller\Exceptions\ControllerRenderViewException
method getViewPath
protected getViewPath( ): string
Returns:
Type: string
method getActionHandler
protected getActionHandler( string $method ): \Pandora3\Core\Interfaces\RequestHandlerInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$method | string |
Returns:
Type: \Pandora3\Core\Interfaces\RequestHandlerInterface
method dispatch
public dispatch( string $path, ?array &$arguments = null ): \Pandora3\Core\Interfaces\RequestHandlerInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$path | string | |
$arguments | ?array |
Returns:
Type: \Pandora3\Core\Interfaces\RequestHandlerInterface
method setLayout
protected setLayout( string $layout ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$layout | string |
method setApplication
public setApplication( \Pandora3\Libs\Application\Application $application ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$application | \Pandora3\Libs\Application\Application |
Returns:
Type: mixed
method getName
private getName( ): string
Returns:
Type: string
method getMiddlewares
public getMiddlewares( ): array[]
Returns:
Type: array[]
method getRoutes
public getRoutes( ): array
Returns:
Type: array
method getDispatcher
protected getDispatcher( ): \Pandora3\Core\Interfaces\RequestDispatcherInterface
Returns:
Type: \Pandora3\Core\Interfaces\RequestDispatcherInterface
method registerRoutes
protected registerRoutes( \Pandora3\Core\Interfaces\RouterInterface|\Pandora3\Core\MiddlewareRouter\MiddlewareRouter $router, array $routes ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$router | \Pandora3\Core\Interfaces\RouterInterface | \Pandora3\Core\MiddlewareRouter\MiddlewareRouter | |
$routes | array |
Returns:
Type: mixed
method dependencies
protected dependencies( \Pandora3\Core\Container\Container $container ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$container | \Pandora3\Core\Container\Container |
method init
protected init( ): void
# Core\Controller\Exceptions
# ControllerRenderViewException
class
Full name: \Pandora3\Core\Controller\Exceptions\ControllerRenderViewException
Extends: \RuntimeException
Implements: \Pandora3\Core\Interfaces\Exceptions\CoreException
Methods:
method __construct
public __construct( string $viewPath, string $className, null|\Throwable $previous = null )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$viewPath | string | |
$className | string | |
$previous | null | \Throwable |
# Core\Debug
# Debug
class
Full name: \Pandora3\Core\Debug\Debug
Methods:
method logException
public static logException( \Throwable $ex ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$ex | \Throwable |
Returns:
Type: mixed
method dumpException
public static dumpException( \Throwable $exception ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$exception | \Throwable |
Returns:
Type: mixed
method getErrorName
public static getErrorName( int|string $code ): string
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$code | int | string |
Returns:
Type: string
# Core\Logger
# Logger
class
Full name: \Pandora3\Core\Logger\Logger
# Core\Http
# Request
class
Full name: \Pandora3\Core\Http\Request
Implements: \Pandora3\Core\Interfaces\RequestInterface
Properties:
property protocol
Type: string
public $protocol: string
property isPost
Type: bool
public $isPost: bool
property refererUri
Type: string
public $refererUri: string
property uri
Type: string
public $uri: string
property method
Type: string
public $method: string
property files
Type: array
protected $files: array
Methods:
method getFiles
public getFiles( ): array
Returns:
Type: array
method getCookie
public getCookie( string $name ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$name | string |
Returns:
Type: mixed
method file
public file( string $name ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$name | string |
Returns:
Type: mixed
method post
public post( string $name ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$name | string |
Returns:
Type: mixed
method get
public get( string $name ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$name | string |
Returns:
Type: mixed
method all
public all( ?string $method = null ): array
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$method | ?string |
Returns:
Type: array
method isMethod
public isMethod( string $method ): bool
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$method | string |
Returns:
Type: bool
method getProtocol
public getProtocol( ): string
{@inheritdoc}
Returns:
Type: string
method isPost
public isPost( ): bool
Returns:
Type: bool
method getMethod
public getMethod( ): string
Returns:
Type: string
method getRefererUri
public getRefererUri( ): string
Returns:
Type: string
method getUri
public getUri( ): string
Returns:
Type: string
method __construct
public __construct( string $uri )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$uri | string |
# Response
class
Full name: \Pandora3\Core\Http\Response
Implements: \Pandora3\Core\Interfaces\ResponseInterface
Properties:
property statusText
Type: array
protected static $statusText = [100 => Continue, 101 => Switching Protocols, 102 => Processing, 103 => Early Hints, 200 => OK, 201 => Created, 202 => Accepted, 203 => Non-Authoritative Information, 204 => No Content, 205 => Reset Content, 206 => Partial Content, 207 => Multi-Status, 208 => Already Reported, 226 => IM Used, 300 => Multiple Choices, 301 => Moved Permanently, 302 => Found, 303 => See Other, 304 => Not Modified, 305 => Use Proxy, 307 => Temporary Redirect, 308 => Permanent Redirect, 400 => Bad Request, 401 => Unauthorized, 402 => Payment Required, 403 => Forbidden, 404 => Not Found, 405 => Method Not Allowed, 406 => Not Acceptable, 407 => Proxy Authentication Required, 408 => Request Timeout, 409 => Conflict, 410 => Gone, 411 => Length Required, 412 => Precondition Failed, 413 => Payload Too Large, 414 => URI Too Long, 415 => Unsupported Media Type, 416 => Range Not Satisfiable, 417 => Expectation Failed, 418 => I'm a teapot, 421 => Misdirected Request, 422 => Unprocessable Entity, 423 => Locked, 424 => Failed Dependency, 425 => Too Early, 426 => Upgrade Required, 428 => Precondition Required, 429 => Too Many Requests, 431 => Request Header Fields Too Large, 451 => Unavailable For Legal Reasons, 500 => Internal Server Error, 501 => Not Implemented, 502 => Bad Gateway, 503 => Service Unavailable, 504 => Gateway Timeout, 505 => HTTP Version Not Supported, 506 => Variant Also Negotiates, 507 => Insufficient Storage, 508 => Loop Detected, 510 => Not Extended, 511 => Network Authentication Required]: array
property cookies
Type: \Pandora3\Libs\Cookie\Cookie[]
protected $cookies = []: \Pandora3\Libs\Cookie\Cookie[]
property status
Type: int
protected $status: int
property headers
Type: array
protected $headers: array
property content
Type: string
protected $content: string
Methods:
method send
public send( ): void
method sendHeaders
protected sendHeaders( ): void
method getCookies
protected getCookies( ): array
Returns:
Type: array
method clearCookie
public clearCookie( string $name, string $path = '/', null|string $domain = null, bool $isSecure = false, bool $isHttpOnly = true ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$name | string | |
$path | string | |
$domain | null | string | |
$isSecure | bool | |
$isHttpOnly | bool |
method removeCookie
public removeCookie( string $name, string $path = '/', null|string $domain = null ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$name | string | |
$path | string | |
$domain | null | string |
method setCookie
public setCookie( \Pandora3\Libs\Cookie\Cookie $cookie ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$cookie | \Pandora3\Libs\Cookie\Cookie |
method getContent
public getContent( ): string
Returns:
Type: string
method setContent
public setContent( string $content ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$content | string |
method removeHeader
public removeHeader( string $header ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$header | string |
method setHeader
public setHeader( string $header, string $value ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$header | string | |
$value | string |
method setStatus
public setStatus( int $status ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$status | int |
method __construct
public __construct( string $content, int $status = 200, array $headers = [] )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$content | string | |
$status | int | |
$headers | array |
# Core\Middleware
# MiddlewareChain
class
Full name: \Pandora3\Core\Middleware\MiddlewareChain
Properties:
property middlewares
Type: \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface[]
protected $middlewares: \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface[]
Methods:
method wrapHandler
public wrapHandler( \Pandora3\Core\Interfaces\RequestHandlerInterface $handler ): \Pandora3\Core\Interfaces\RequestHandlerInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$handler | \Pandora3\Core\Interfaces\RequestHandlerInterface |
Returns:
Type: \Pandora3\Core\Interfaces\RequestHandlerInterface
method __construct
public __construct( \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface[] $middlewares )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$middlewares | \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface[] |
# MiddlewareDispatcher
class
Full name: \Pandora3\Core\Middleware\MiddlewareDispatcher
Implements: \Pandora3\Core\Interfaces\RequestDispatcherInterface
Properties:
property chain
Type: \Pandora3\Core\Middleware\MiddlewareChain
protected $chain: \Pandora3\Core\Middleware\MiddlewareChain
property dispatcher
Type: \Pandora3\Core\Interfaces\RequestDispatcherInterface
protected $dispatcher: \Pandora3\Core\Interfaces\RequestDispatcherInterface
Methods:
method dispatch
public dispatch( string $path, ?array &$arguments = null ): \Pandora3\Core\Interfaces\RequestHandlerInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$path | string | |
$arguments | ?array |
Returns:
Type: \Pandora3\Core\Interfaces\RequestHandlerInterface
method __construct
public __construct( \Pandora3\Core\Interfaces\RequestDispatcherInterface $dispatcher, \Pandora3\Core\Middleware\MiddlewareChain $chain )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$dispatcher | \Pandora3\Core\Interfaces\RequestDispatcherInterface | |
$chain | \Pandora3\Core\Middleware\MiddlewareChain |
# MiddlewareHandler
class
Full name: \Pandora3\Core\Middleware\MiddlewareHandler
Implements: \Pandora3\Core\Interfaces\RequestHandlerInterface
Properties:
property handler
Type: \Pandora3\Core\Interfaces\RequestHandlerInterface
protected $handler: \Pandora3\Core\Interfaces\RequestHandlerInterface
property middleware
Type: \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface
protected $middleware: \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface
Methods:
method handle
public handle( \Pandora3\Core\Interfaces\RequestInterface $request, array $arguments = [] ): \Pandora3\Core\Interfaces\ResponseInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$request | \Pandora3\Core\Interfaces\RequestInterface | |
$arguments | array |
Returns:
Type: \Pandora3\Core\Interfaces\ResponseInterface
method __construct
public __construct( \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface $middleware, \Pandora3\Core\Interfaces\RequestHandlerInterface $handler )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$middleware | \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface | |
$handler | \Pandora3\Core\Interfaces\RequestHandlerInterface |
# Core\MiddlewareRouter
# MiddlewareRouter
class
Full name: \Pandora3\Core\MiddlewareRouter\MiddlewareRouter
Extends: \Pandora3\Core\Router\Router
Properties:
property container
Inherited from \Pandora3\Core\Router\Router
Type: \Pandora3\Core\Container\Container
protected $container: \Pandora3\Core\Container\Container
property routes
Inherited from \Pandora3\Core\Router\Router
Type: array
protected $routes: array
Methods:
method dispatch
Inherited from \Pandora3\Core\Router\Router
public dispatch( string $path, ?array &$arguments = null ): \Pandora3\Core\Router\Pandora3\Core\Interfaces\RequestHandlerInterface
{@inheritdoc}
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$path | string | |
$arguments | ?array |
Returns:
Type: \Pandora3\Core\Router\Pandora3\Core\Interfaces\RequestHandlerInterface
method matchRoute
Inherited from \Pandora3\Core\Router\Router
protected matchRoute( string $path, string $routePath, string|null &$subPath = null, array|null &$variables = null ): bool
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$path | string | |
$routePath | string | |
$subPath | string | null | |
$variables | array | null |
Returns:
Type: bool
method prepareHandler
Inherited from \Pandora3\Core\Router\Router
protected prepareHandler( \Closure|\Pandora3\Core\Interfaces\RequestHandlerInterface|\Pandora3\Core\Interfaces\RequestDispatcherInterface|string $handler, string $routePath ): \Pandora3\Core\Interfaces\RequestHandlerInterface|\Pandora3\Core\Interfaces\RequestDispatcherInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$handler | \Closure | \Pandora3\Core\Interfaces\RequestHandlerInterface | \Pandora3\Core\Interfaces\RequestDispatcherInterface | string | |
$routePath | string |
Returns:
Type: \Pandora3\Core\Interfaces\RequestHandlerInterface | \Pandora3\Core\Interfaces\RequestDispatcherInterface
method __construct
Inherited from \Pandora3\Core\Router\Router
public __construct( array $routes = [], \Pandora3\Core\Container\Container $container = null )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$routes | array | |
$container | \Pandora3\Core\Container\Container |
method wrapHandler
public wrapHandler( \Pandora3\Core\Interfaces\RequestHandlerInterface|\Pandora3\Core\Interfaces\RequestDispatcherInterface $handler, \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface|string[] $middlewares ): \Pandora3\Core\Interfaces\RequestHandlerInterface|\Pandora3\Core\Interfaces\RequestDispatcherInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$handler | \Pandora3\Core\Interfaces\RequestHandlerInterface | \Pandora3\Core\Interfaces\RequestDispatcherInterface | |
$middlewares | \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface | string[] |
Returns:
Type: \Pandora3\Core\Interfaces\RequestHandlerInterface | \Pandora3\Core\Interfaces\RequestDispatcherInterface
method chainMiddlewares
protected chainMiddlewares( \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface|string[] $middlewares ): \Pandora3\Core\Middleware\MiddlewareChain
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$middlewares | \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface | string[] |
Returns:
Type: \Pandora3\Core\Middleware\MiddlewareChain
method add
Inherited from \Pandora3\Core\Router\Router
public add( string $routePath, \Closure|\Pandora3\Core\Interfaces\RequestDispatcherInterface|\Pandora3\Core\Interfaces\RequestHandlerInterface|string $handler ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$routePath | string | |
$handler | \Closure | \Pandora3\Core\Interfaces\RequestDispatcherInterface | \Pandora3\Core\Interfaces\RequestHandlerInterface | string |
# Core\Registry
# Registry
class
Full name: \Pandora3\Core\Registry\Registry
Properties:
property data
Type: array
protected $data: array
Methods:
method has
public has( string $property ): bool
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$property | string |
Returns:
Type: bool
method get
public get( string $property ): mixed|null
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$property | string |
Returns:
Type: mixed | null
method __construct
public __construct( array $data = [] )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$data | array |
# Core\Router\Exceptions
# RouteNotFoundException
class
Full name: \Pandora3\Core\Router\Exceptions\RouteNotFoundException
Extends: \LogicException
Implements: \Pandora3\Core\Interfaces\Exceptions\ApplicationException
Methods:
method __construct
public __construct( string $requestUri, \Throwable|null $previous = null )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$requestUri | string | |
$previous | \Throwable | null |
# Core\Router
# RequestHandler
class
Full name: \Pandora3\Core\Router\RequestHandler
Implements: \Pandora3\Core\Interfaces\RequestHandlerInterface
Properties:
property handler
Type: \Closure
protected $handler: \Closure
Methods:
method handle
public handle( \Pandora3\Core\Interfaces\RequestInterface $request, array $arguments = [] ): \Pandora3\Core\Interfaces\ResponseInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$request | \Pandora3\Core\Interfaces\RequestInterface | |
$arguments | array |
Returns:
Type: \Pandora3\Core\Interfaces\ResponseInterface
method __construct
public __construct( \Closure $handler )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$handler | \Closure |
# Router
class
Full name: \Pandora3\Core\Router\Router
Implements: \Pandora3\Core\Interfaces\RouterInterface
Properties:
property container
Type: \Pandora3\Core\Container\Container
protected $container: \Pandora3\Core\Container\Container
property routes
Type: array
protected $routes: array
Methods:
method dispatch
public dispatch( string $path, ?array &$arguments = null ): \Pandora3\Core\Router\Pandora3\Core\Interfaces\RequestHandlerInterface
{@inheritdoc}
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$path | string | |
$arguments | ?array |
Returns:
Type: \Pandora3\Core\Router\Pandora3\Core\Interfaces\RequestHandlerInterface
method matchRoute
protected matchRoute( string $path, string $routePath, string|null &$subPath = null, array|null &$variables = null ): bool
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$path | string | |
$routePath | string | |
$subPath | string | null | |
$variables | array | null |
Returns:
Type: bool
method prepareHandler
protected prepareHandler( \Closure|\Pandora3\Core\Interfaces\RequestHandlerInterface|\Pandora3\Core\Interfaces\RequestDispatcherInterface|string $handler, string $routePath ): \Pandora3\Core\Interfaces\RequestHandlerInterface|\Pandora3\Core\Interfaces\RequestDispatcherInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$handler | \Closure | \Pandora3\Core\Interfaces\RequestHandlerInterface | \Pandora3\Core\Interfaces\RequestDispatcherInterface | string | |
$routePath | string |
Returns:
Type: \Pandora3\Core\Interfaces\RequestHandlerInterface | \Pandora3\Core\Interfaces\RequestDispatcherInterface
method add
public add( string $routePath, \Closure|\Pandora3\Core\Interfaces\RequestDispatcherInterface|\Pandora3\Core\Interfaces\RequestHandlerInterface|string $handler ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$routePath | string | |
$handler | \Closure | \Pandora3\Core\Interfaces\RequestDispatcherInterface | \Pandora3\Core\Interfaces\RequestHandlerInterface | string |
method __construct
public __construct( array $routes = [], \Pandora3\Core\Container\Container $container = null )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$routes | array | |
$container | \Pandora3\Core\Container\Container |
# Libs\Application
# Application
class abstract
Full name: \Pandora3\Libs\Application\Application
Extends: \Pandora3\Core\Application\BaseApplication
Constants:
// [Inherited] from \Pandora3\Core\Application\BaseApplication
public const MODE_DEV = 'dev'
// [Inherited] from \Pandora3\Core\Application\BaseApplication
public const MODE_PROD = 'prod'
// [Inherited] from \Pandora3\Core\Application\BaseApplication
public const MODE_TEST = 'test'
Properties:
property mode
Inherited from \Pandora3\Core\Application\BaseApplication
Type: string
public $mode: string
property path
Inherited from \Pandora3\Core\Application\BaseApplication
Type: string
public $path: string
property config
Inherited from \Pandora3\Core\Application\BaseApplication
Type: \Pandora3\Core\Registry\Registry
public $config: \Pandora3\Core\Registry\Registry
property container
Inherited from \Pandora3\Core\Application\BaseApplication
Type: \Pandora3\Core\Container\Container
public $container: \Pandora3\Core\Container\Container
property cookies
Type: \Pandora3\Libs\Cookie\Cookies
public $cookies: \Pandora3\Libs\Cookie\Cookies
property router
Type: \Pandora3\Core\Interfaces\RouterInterface
public $router: \Pandora3\Core\Interfaces\RouterInterface
property request
Type: \Pandora3\Core\Interfaces\RequestInterface
public $request: \Pandora3\Core\Interfaces\RequestInterface
property auth
Type: \Pandora3\Plugins\Authorisation\Authorisation
public $auth: \Pandora3\Plugins\Authorisation\Authorisation
property database
Type: \Pandora3\Core\Interfaces\DatabaseConnectionInterface
public $database: \Pandora3\Core\Interfaces\DatabaseConnectionInterface
property baseUri
Type: string
public $baseUri: string
property properties
Inherited from \Pandora3\Core\Application\BaseApplication
Type: array
protected $properties = []: array
property dispatcher
Type: \Pandora3\Core\Interfaces\RequestDispatcherInterface
protected $dispatcher: \Pandora3\Core\Interfaces\RequestDispatcherInterface
property instance
Type: \Pandora3\Libs\Application\Application
protected static $instance: \Pandora3\Libs\Application\Application
Methods:
method handleRuntimeError
Inherited from \Pandora3\Core\Application\BaseApplication
protected handleRuntimeError( \Throwable $ex ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$ex | \Throwable |
method registerMiddleware
protected registerMiddleware( string $name, string $className ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$name | string | |
$className | string |
method getRoutes
protected getRoutes( ): array
Gets application routes
Returns:
Type: array
method getMiddlewares
public getMiddlewares( ): array
Returns:
Type: array
method getSecret
public getSecret( ): string
Returns:
Type: string
method getConfig
Inherited from \Pandora3\Core\Application\BaseApplication
protected getConfig( ): array
Returns:
Type: array
method page404
protected page404( \Pandora3\Core\Interfaces\RequestInterface $request ): \Pandora3\Libs\Application\Pandora3\Core\Interfaces\ResponseInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$request | \Pandora3\Core\Interfaces\RequestInterface |
Returns:
Type: \Pandora3\Libs\Application\Pandora3\Core\Interfaces\ResponseInterface
method registerRoutes
protected registerRoutes( \Pandora3\Core\Interfaces\RouterInterface|\Pandora3\Core\MiddlewareRouter\MiddlewareRouter $router, array $routes ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$router | \Pandora3\Core\Interfaces\RouterInterface | \Pandora3\Core\MiddlewareRouter\MiddlewareRouter | |
$routes | array |
Returns:
Type: mixed
method getDispatcher
protected getDispatcher( ): \Pandora3\Core\Interfaces\RequestDispatcherInterface
Returns:
Type: \Pandora3\Core\Interfaces\RequestDispatcherInterface
method run
Inherited from \Pandora3\Core\Application\BaseApplication
public run( string $mode = self::MODE_DEV ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$mode | string |
method dispatch
protected dispatch( array &$arguments ): \Pandora3\Core\Interfaces\RequestHandlerInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$arguments | array |
Returns:
Type: \Pandora3\Core\Interfaces\RequestHandlerInterface
method getUnauthorisedHandler
protected getUnauthorisedHandler( ): \Pandora3\Core\Interfaces\RequestHandlerInterface
Returns:
Type: \Pandora3\Core\Interfaces\RequestHandlerInterface
method dependencies
Inherited from \Pandora3\Core\Application\BaseApplication
protected dependencies( \Pandora3\Core\Container\Container $container ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$container | \Pandora3\Core\Container\Container |
method execute
Inherited from \Pandora3\Core\Application\BaseApplication
abstract protected execute( ): mixed
Returns:
Type: mixed
method setProperties
Inherited from \Pandora3\Core\Application\BaseApplication
protected setProperties( array $properties ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$properties | array |
method setProperty
Inherited from \Pandora3\Core\Application\BaseApplication
protected setProperty( string $property, \Closure|string $dependency ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$property | string | |
$dependency | \Closure | string |
method isMode
Inherited from \Pandora3\Core\Application\BaseApplication
public isMode( string $mode ): bool
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$mode | string |
Returns:
Type: bool
method loadConfig
Inherited from \Pandora3\Core\Application\BaseApplication
protected loadConfig( string $path ): array
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$path | string |
Returns:
Type: array
method redirectUriHandler
protected redirectUriHandler( string $uri ): \Pandora3\Core\Interfaces\RequestHandlerInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$uri | string |
Returns:
Type: \Pandora3\Core\Interfaces\RequestHandlerInterface
method getInstance
public static getInstance( ): static
Returns:
Type: static
# Libs\Cookie
# Cookie
class
Full name: \Pandora3\Libs\Cookie\Cookie
Constants:
public const SAME_SITE_LAX = 'Lax'
public const SAME_SITE_STRICT = 'Strict'
Properties:
property maxAge
Type: int
public $maxAge: int
property sameSite
Type: string | null
public $sameSite: string|null
property isHttpOnly
Type: bool
public $isHttpOnly: bool
property isSecure
Type: bool
public $isSecure: bool
property domain
Type: string | null
public $domain: string|null
property path
Type: string
public $path: string
property expire
Type: int
public $expire: int
property value
Type: string | null
public $value: string|null
property name
Type: string
public $name: string
Methods:
method __toString
public __toString( ): string
Returns:
Type: string
method getMaxAge
public getMaxAge( ): int
Returns:
Type: int
method __construct
public __construct( string $name, ?string $value = null, array $params = [] )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$name | string | |
$value | ?string | |
$params | array |
# Cookies
class
Full name: \Pandora3\Libs\Cookie\Cookies
Properties:
property cookies
Type: \Pandora3\Libs\Cookie\Cookie[]
protected $cookies = []: \Pandora3\Libs\Cookie\Cookie[]
Methods:
method getCookies
public getCookies( ): array
Returns:
Type: array
method clear
public clear( string $name, string $path = '/', null|string $domain = null, bool $isSecure = false, bool $isHttpOnly = true ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$name | string | |
$path | string | |
$domain | null | string | |
$isSecure | bool | |
$isHttpOnly | bool |
method remove
public remove( string $name, string $path = '/', null|string $domain = null ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$name | string | |
$path | string | |
$domain | null | string |
method set
public set( \Pandora3\Libs\Cookie\Cookie $cookie ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$cookie | \Pandora3\Libs\Cookie\Cookie |
# Libs\Cookie\Middlewares
# SaveCookiesMiddleware
class
Full name: \Pandora3\Libs\Cookie\Middlewares\SaveCookiesMiddleware
Implements: \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface
Properties:
property cookies
Type: \Pandora3\Libs\Cookie\Cookies
protected $cookies: \Pandora3\Libs\Cookie\Cookies
Methods:
method process
public process( \Pandora3\Core\Interfaces\RequestInterface $request, \Pandora3\Core\Interfaces\RequestHandlerInterface $handler, mixed $arguments ): \Pandora3\Core\Interfaces\ResponseInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$request | \Pandora3\Core\Interfaces\RequestInterface | |
$handler | \Pandora3\Core\Interfaces\RequestHandlerInterface | |
$arguments | mixed |
Returns:
Type: \Pandora3\Core\Interfaces\ResponseInterface
method __construct
public __construct( \Pandora3\Libs\Cookie\Cookies $cookies )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$cookies | \Pandora3\Libs\Cookie\Cookies |
# Libs\Database
# DatabaseConnection
class
Full name: \Pandora3\Libs\Database\DatabaseConnection
Implements: \Pandora3\Core\Interfaces\DatabaseConnectionInterface
Properties:
property connection
Type: \PDO
protected $connection: \PDO
property params
Type: array
protected $params: array
Methods:
method getConnection
public getConnection( ): \PDO
Returns:
Type: \PDO
method close
public close( ): void
method connect
public connect( ): void
method __construct
public __construct( array $params )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$params | array |
# Libs\Database\Exceptions
# ConnectionFailedException
class
Full name: \Pandora3\Libs\Database\Exceptions\ConnectionFailedException
Extends: \RuntimeException
Implements: \Pandora3\Core\Interfaces\Exceptions\CoreException
Methods:
method __construct
public __construct( \Throwable|null $previous = null )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$previous | \Throwable | null |
# Libs\Renderer
# PhpRenderer
class
Full name: \Pandora3\Libs\Renderer\PhpRenderer
Implements: \Pandora3\Core\Interfaces\RendererInterface
Properties:
property path
Type: string
protected $path: string
Methods:
method render
public render( string $viewPath, array $context = [] ): string
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$viewPath | string | |
$context | array |
Returns:
Type: string
method __construct
public __construct( string $path = '' )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$path | string |
# Libs\Session
# Session
class
Full name: \Pandora3\Libs\Session\Session
Implements: \Pandora3\Core\Interfaces\SessionInterface
Properties:
property id
Type: string
protected $id: string
Methods:
method clear
public clear( string $property ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$property | string |
method set
public set( string $property, mixed $value ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$property | string | |
$value | mixed |
method get
public get( string $property ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$property | string |
Returns:
Type: mixed
method setup
protected setup( ): void
method saveCurrentSession
protected static saveCurrentSession( ): void
method new
public static new( string $id ): static
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$id | string |
Returns:
Type: static
method continue
public static continue( ): static
Returns:
Type: static
method getId
public getId( ): mixed
Returns:
Type: mixed
method __construct
public __construct( string|null $id = null )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$id | string | null |
# Libs\Time
# Date
class
Full name: \Pandora3\Libs\Time\Date
Extends: \DateTimeImmutable
Constants:
public const FormatMysql = 'Y-m-d'
Properties:
property dayOfWeek
Type: int
public $dayOfWeek: int
property day
Type: int
public $day: int
property month
Type: int
public $month: int
property year
Type: int
public $year: int
Methods:
method convert
public static convert( string|\DateTimeInterface|null $date, string $format ): string
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$date | string | \DateTimeInterface | null | |
$format | string |
Returns:
Type: string
method subInterval
public subInterval( string $interval ): static
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$interval | string |
Returns:
Type: static
method addInterval
public addInterval( string $interval ): static
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$interval | string |
Returns:
Type: static
method toDateTime
public toDateTime( ): \Pandora3\Libs\Time\DateTime
Returns:
Type: \Pandora3\Libs\Time\DateTime
method isLeapYear
public static isLeapYear( int $year ): bool
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$year | int |
Returns:
Type: bool
method toMysql
public toMysql( ): string
Returns:
Type: string
method now
public static now( ): static
Returns:
Type: static
method createFromFormat
public static createFromFormat( string $format, string|null $time, string|\DateTimeZone|null $timezone = null ): static|null
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$format | string | |
$time | string | null | |
$timezone | string | \DateTimeZone | null |
Returns:
Type: static | null
method create
public static create( string|int $year, string|int $month, string|int $day ): static
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$year | string | int | |
$month | string | int | |
$day | string | int |
Returns:
Type: static
method __construct
public __construct( string|\DateTimeInterface $time = 'now', string|\DateTimeZone|null $timezone = null )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$time | string | \DateTimeInterface | |
$timezone | string | \DateTimeZone | null |
# DateTime
class
Full name: \Pandora3\Libs\Time\DateTime
Extends: \DateTimeImmutable
Constants:
public const FormatMysql = 'Y-m-d H:i:s'
Properties:
property date
Type: \Pandora3\Libs\Time\Date
public $date: \Pandora3\Libs\Time\Date
property second
Type: int
public $second: int
property minute
Type: int
public $minute: int
property hour
Type: int
public $hour: int
property dayOfWeek
Type: int
public $dayOfWeek: int
property day
Type: int
public $day: int
property month
Type: int
public $month: int
property year
Type: int
public $year: int
Methods:
method convert
public static convert( string|\DateTimeInterface|null $date, string $format ): string
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$date | string | \DateTimeInterface | null | |
$format | string |
Returns:
Type: string
method getDate
public getDate( ): \Pandora3\Libs\Time\Date
Returns:
Type: \Pandora3\Libs\Time\Date
method subInterval
public subInterval( string $interval ): bool|static
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$interval | string |
Returns:
Type: bool | static
method addInterval
public addInterval( string $interval ): static
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$interval | string |
Returns:
Type: static
method toMysql
public toMysql( ): string
Returns:
Type: string
method now
public static now( ): static
Returns:
Type: static
method createFromFormat
public static createFromFormat( string $format, string|null $time, string|\DateTimeZone|null $timezone = null ): static|null
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$format | string | |
$time | string | null | |
$timezone | string | \DateTimeZone | null |
Returns:
Type: static | null
method create
public static create( string|int $year, string|int $month, string|int $day, string|int $hour = 0, string|int $minute = 0, string|int $second = 0 ): static
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$year | string | int | |
$month | string | int | |
$day | string | int | |
$hour | string | int | |
$minute | string | int | |
$second | string | int |
Returns:
Type: static
method __construct
public __construct( string|\DateTimeInterface $time = 'now', string|\DateTimeZone|null $timezone = null )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$time | string | \DateTimeInterface | |
$timezone | string | \DateTimeZone | null |
# Libs\Time\Enum
# Month
class
Full name: \Pandora3\Libs\Time\Enum\Month
Constants:
public const None = 0
public const January = 1
public const February = 2
public const March = 3
public const April = 4
public const May = 5
public const June = 6
public const July = 7
public const August = 8
public const September = 9
public const October = 10
public const November = 11
public const December = 12
Methods:
method numberOfDays
public static numberOfDays( int $month, int|null $year = null ): int
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$month | int | |
$year | int | null |
Returns:
Type: int
# Week
class
Full name: \Pandora3\Libs\Time\Enum\Week
Constants:
public const None = 0
public const Monday = 1
public const Tuesday = 2
public const Thursday = 3
public const Wednesday = 4
public const Friday = 5
public const Saturday = 6
public const Sunday = 7
# Libs\Time
# Time
class
Full name: \Pandora3\Libs\Time\Time
# Libs\Widget\Exceptions
# WidgetRenderException
class
Full name: \Pandora3\Libs\Widget\Exceptions\WidgetRenderException
Extends: \RuntimeException
Implements: \Pandora3\Core\Interfaces\Exceptions\CoreException
Methods:
method __construct
public __construct( string $viewPath, string $className, null|\Throwable $previous = null )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$viewPath | string | |
$className | string | |
$previous | null | \Throwable |
# Libs\Widget
# Widget
class abstract
Full name: \Pandora3\Libs\Widget\Widget
Properties:
property context
Type: array
public $context: array
property scripts
Type: array
protected static $scripts = []: array
property path
Type: string
protected $path: string
property context
Type: array
protected $context: array
property container
Type: \Pandora3\Core\Container\Container
protected $container: \Pandora3\Core\Container\Container
Methods:
method addScript
public addScript( string $filename ): string
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$filename | string |
Returns:
Type: string
method render
public render( array $context = [] ): string
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$context | array |
Returns:
Type: string
Throws:
\Pandora3\Libs\Widget\Exceptions\WidgetRenderException
method beforeRender
protected beforeRender( array $context ): array
Preparing context to render
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$context | array |
Returns:
Type: array
method getView
abstract protected getView( ): string
Returns:
Type: string
method getPath
private getPath( ): string
Returns:
Type: string
method getContext
protected getContext( ): array
Returns:
Type: array
method dependencies
protected dependencies( \Pandora3\Core\Container\Container $container ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$container | \Pandora3\Core\Container\Container |
method __construct
public __construct( array $context = [] )
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$context | array |
# Core\Interfaces
# ApplicationInterface
interface
Full name: \Pandora3\Core\Interfaces\ApplicationInterface
Methods:
method run
public run( ): void
# ControllerInterface
interface
Full name: \Pandora3\Core\Interfaces\ControllerInterface
Methods:
method getRoutes
public getRoutes( ): array
Returns:
Type: array
# DatabaseConnectionInterface
interface
Full name: \Pandora3\Core\Interfaces\DatabaseConnectionInterface
Methods:
method close
public close( ): void
method connect
public connect( ): void
# Core\Interfaces\Exceptions
# ApplicationException
interface
Full name: \Pandora3\Core\Interfaces\Exceptions\ApplicationException
# CoreException
interface
Full name: \Pandora3\Core\Interfaces\Exceptions\CoreException
# Core\Interfaces
# LoggerInterface
interface
Full name: \Pandora3\Core\Interfaces\LoggerInterface
# RendererInterface
class
Full name: \Pandora3\Core\Interfaces\RendererInterface
Methods:
method render
public render( string $viewPath, array $context = [] ): string
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$viewPath | string | |
$context | array |
Returns:
Type: string
Throws:
\RuntimeException
# RequestDispatcherInterface
interface
Full name: \Pandora3\Core\Interfaces\RequestDispatcherInterface
Methods:
method dispatch
public dispatch( string $path, array|null &$arguments ): \Pandora3\Core\Interfaces\RequestHandlerInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$path | string | |
$arguments | array | null |
Returns:
Type: \Pandora3\Core\Interfaces\RequestHandlerInterface
Throws:
\Pandora3\Core\Router\Exceptions\RouteNotFoundException
# RequestHandlerInterface
interface
Full name: \Pandora3\Core\Interfaces\RequestHandlerInterface
Methods:
method handle
public handle( \Pandora3\Core\Interfaces\RequestInterface $request, array $arguments = [] ): \Pandora3\Core\Interfaces\ResponseInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$request | \Pandora3\Core\Interfaces\RequestInterface | |
$arguments | array |
Returns:
Type: \Pandora3\Core\Interfaces\ResponseInterface
# RequestInterface
interface
Full name: \Pandora3\Core\Interfaces\RequestInterface
Methods:
method getFiles
public getFiles( ): array
Returns:
Type: array
method getCookie
public getCookie( string $name ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$name | string |
Returns:
Type: mixed
method file
public file( string $param ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$param | string |
Returns:
Type: mixed
method post
public post( string $param ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$param | string |
Returns:
Type: mixed
method get
public get( string $param ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$param | string |
Returns:
Type: mixed
method all
public all( string|null $method ): array
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$method | string | null |
Returns:
Type: array
method isMethod
public isMethod( string $method ): bool
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$method | string |
Returns:
Type: bool
method isPost
public isPost( ): bool
Returns:
Type: bool
method getMethod
public getMethod( ): string
Returns:
Type: string
method getRefererUri
public getRefererUri( ): string
Returns:
Type: string
method getUri
public getUri( ): string
Returns:
Type: string
# ResponseInterface
interface
Full name: \Pandora3\Core\Interfaces\ResponseInterface
Methods:
method clearCookie
public clearCookie( string $name, string $path = '/', ?string $domain = null, bool $isSecure = false, bool $isHttpOnly = true ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$name | string | |
$path | string | |
$domain | ?string | |
$isSecure | bool | |
$isHttpOnly | bool |
method removeCookie
public removeCookie( string $name, string $path = '/', ?string $domain = null ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$name | string | |
$path | string | |
$domain | ?string |
method setCookie
public setCookie( \Pandora3\Libs\Cookie\Cookie $cookie ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$cookie | \Pandora3\Libs\Cookie\Cookie |
method setContent
public setContent( string $content ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$content | string |
method removeHeader
public removeHeader( string $header ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$header | string |
method setHeader
public setHeader( string $header, string $value ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$header | string | |
$value | string |
method setStatus
public setStatus( int $status ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$status | int |
method getContent
public getContent( ): string
Returns:
Type: string
method send
public send( ): void
# RouterInterface
interface
Full name: \Pandora3\Core\Interfaces\RouterInterface
Extends: \Pandora3\Core\Interfaces\RequestDispatcherInterface
Methods:
method dispatch
Inherited from \Pandora3\Core\Interfaces\RequestDispatcherInterface
public dispatch( string $path, array|null &$arguments ): \Pandora3\Core\Interfaces\RequestHandlerInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$path | string | |
$arguments | array | null |
Returns:
Type: \Pandora3\Core\Interfaces\RequestHandlerInterface
Throws:
\Pandora3\Core\Router\Exceptions\RouteNotFoundException
method add
public add( string $routePath, \Closure|\Pandora3\Core\Interfaces\RequestHandlerInterface|\Pandora3\Core\Interfaces\RequestDispatcherInterface|string $handler ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$routePath | string | |
$handler | \Closure | \Pandora3\Core\Interfaces\RequestHandlerInterface | \Pandora3\Core\Interfaces\RequestDispatcherInterface | string |
# SessionInterface
interface
Full name: \Pandora3\Core\Interfaces\SessionInterface
Methods:
method clear
public clear( string $property ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$property | string |
method set
public set( string $property, mixed $value ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$property | string | |
$value | mixed |
method get
public get( string $property ): mixed
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$property | string |
Returns:
Type: mixed
method getId
public getId( ): mixed
Returns:
Type: mixed
# Core\Middleware\Interfaces
# MiddlewareInterface
class
Full name: \Pandora3\Core\Middleware\Interfaces\MiddlewareInterface
Methods:
method process
public process( \Pandora3\Core\Interfaces\RequestInterface $request, \Pandora3\Core\Interfaces\RequestHandlerInterface $handler, array $arguments ): \Pandora3\Core\Interfaces\ResponseInterface
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$request | \Pandora3\Core\Interfaces\RequestInterface | |
$handler | \Pandora3\Core\Interfaces\RequestHandlerInterface | |
$arguments | array |
Returns:
Type: \Pandora3\Core\Interfaces\ResponseInterface
# Core\Properties
# Getters
trait
Full name: \Pandora3\Core\Properties\Getters
Methods:
method __get
public __get( string $property ): mixed|null
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$property | string |
Returns:
Type: mixed | null
# Setters
trait
Full name: \Pandora3\Core\Properties\Setters
Methods:
method __set
public __set( string $property, mixed $value ): void
Arguments:
| Arguemnt | Type | Description |
|---|---|---|
$property | string | |
$value | mixed |
Generated with phpDocumentor