Pionia Core

AuthenticationBackend
in package
implements AuthenticationContract Uses Containable

AbstractYes

Base class for other Authentication backend to inherit.

You have access to the application container via $this->context

Table of Contents

Interfaces

AuthenticationContract
Authentication contract.

Properties

$context  : ContainerInterface|Container|null
Application container context
$limitServices  : array<string|int, mixed>
limit the services this authentication backend can run on

Methods

__construct()  : mixed
afterRun()  : mixed
Hook to run after the authentication has been run
beforeRun()  : mixed
Hook to run before the authentication has been run
contextArrAdd()  : void
contextHas()  : bool
Check if a value exists in the container
contextMake()  : mixed
Make an instance of a class from the container. This will throw an exception if the class is not found
contextMakeSilently()  : mixed
Create an instance of a class without throwing an exception when it fails
getOrDefault()  : mixed
Get a value from the container or return a default value
getOrFail()  : mixed
Get a value from the container or throw an exception.
getSilently()  : mixed
Get a value from the container or return null instead of throwing an exception
set()  : static
Set a value in the container

Properties

$context

Application container context

public ContainerInterface|Container|null $context

$limitServices

limit the services this authentication backend can run on

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

Methods

__construct()

public __construct([ContainerInterface|Container|null $context = null ]) : mixed
Parameters
$context : ContainerInterface|Container|null = null

contextArrAdd()

public contextArrAdd(string $contextKey, array<string|int, mixed> $dataToAdd) : void
Parameters
$contextKey : string
$dataToAdd : array<string|int, mixed>

contextHas()

Check if a value exists in the container

public contextHas(string $key) : bool
Parameters
$key : string
Return values
bool

contextMake()

Make an instance of a class from the container. This will throw an exception if the class is not found

public contextMake(string $name[, array<string|int, mixed> $parameters = [] ]) : mixed
Parameters
$name : string
$parameters : array<string|int, mixed> = []
Tags
throws
DependencyException
throws
NotFoundException

contextMakeSilently()

Create an instance of a class without throwing an exception when it fails

public contextMakeSilently(string $name[, array<string|int, mixed> $parameters = [] ]) : mixed
Parameters
$name : string
$parameters : array<string|int, mixed> = []

getOrDefault()

Get a value from the container or return a default value

public getOrDefault(string $key, mixed $default) : mixed
Parameters
$key : string
$default : mixed

getOrFail()

Get a value from the container or throw an exception.

public getOrFail(string $key) : mixed
Parameters
$key : string
Tags
see
PioniaApplication::resolve()

for similar functionality on the application instance

throws
ContainerExceptionInterface
throws
DependencyException
throws
NotFoundException
throws
NotFoundExceptionInterface

getSilently()

Get a value from the container or return null instead of throwing an exception

public getSilently(mixed $key) : mixed
Parameters
$key : mixed

set()

Set a value in the container

public set(string $name, mixed $value) : static
Parameters
$name : string
$value : mixed
Return values
static

        
On this page

Search results