Documentation

SelfValidatingPassport extends Passport
in package

An implementation used when there are no credentials to be checked (e.g.

API token authentication).

Tags
author

Wouter de Jong wouter@wouterj.nl

Table of Contents

Properties

$user  : mixed
$attributes  : array<string|int, mixed>
$badges  : array<string|int, mixed>

Methods

__construct()  : mixed
addBadge()  : $this
Adds a new security badge.
getAttribute()  : mixed
getAttributes()  : array<string|int, mixed>
getBadge()  : BadgeInterface|null
getBadges()  : array<BadgeInterface>, BadgeInterface>
getUser()  : UserInterface
hasBadge()  : bool
setAttribute()  : void

Properties

$attributes

private array<string|int, mixed> $attributes = []

$badges

private array<string|int, mixed> $badges = []

Methods

addBadge()

Adds a new security badge.

public addBadge(BadgeInterface $badge) : $this

A passport can hold only one instance of the same security badge. This method replaces the current badge if it is already set on this passport.

Parameters
$badge : BadgeInterface
Return values
$this

getAttribute()

public getAttribute(string $name[, mixed $default = null ]) : mixed
Parameters
$name : string
$default : mixed = null

getAttributes()

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

hasBadge()

public hasBadge(string $badgeFqcn) : bool
Parameters
$badgeFqcn : string
Return values
bool

setAttribute()

public setAttribute(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed

        
On this page

Search results