PHP Класс Bolt\EventListener\StorageEventListener

Наследование: implements Symfony\Component\EventDispatcher\EventSubscriberInterface, use trait Bolt\Request\ProfilerAwareTrait
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$hashStrength integer
$loggerFlash Bolt\Logger\FlashLoggerInterface
$passwordFactory PasswordLib\Password\Factory
$schemaManager Bolt\Storage\Database\Schema\SchemaManagerInterface
$timedRecord Bolt\Storage\EventProcessor\TimedRecord
$timedRecordsEnabled boolean
$urlGenerator Symfony\Component\Routing\Generator\UrlGeneratorInterface

Открытые методы

Метод Описание
__construct ( TimedRecord $timedRecord, Bolt\Storage\Database\Schema\SchemaManagerInterface $schemaManager, Symfony\Component\Routing\Generator\UrlGeneratorInterface $urlGenerator, Bolt\Logger\FlashLoggerInterface $loggerFlash, PasswordLib\Password\Factory $passwordFactory, integer $hashStrength, boolean $timedRecordsEnabled ) Constructor.
getSubscribedEvents ( )
onKernelRequest ( GetResponseEvent $event ) Kernel request listener callback.
onPostHydrate ( Bolt\Events\HydrationEvent $event ) Post hydration storage event.
onUserEntityPreSave ( Bolt\Events\StorageEvent $event ) Pre-save storage event for user entities.

Защищенные методы

Метод Описание
passwordHash ( Bolt\Storage\Entity\Users $usersEntity ) Hash user passwords on save.
schemaCheck ( GetResponseEvent $event ) Trigger database schema checks if required.

Приватные методы

Метод Описание
getValidHash ( string $password ) : string Return a valid hash for a password, of if the password is already hashed just return as is.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( TimedRecord $timedRecord, Bolt\Storage\Database\Schema\SchemaManagerInterface $schemaManager, Symfony\Component\Routing\Generator\UrlGeneratorInterface $urlGenerator, Bolt\Logger\FlashLoggerInterface $loggerFlash, PasswordLib\Password\Factory $passwordFactory, integer $hashStrength, boolean $timedRecordsEnabled )
$timedRecord Bolt\Storage\EventProcessor\TimedRecord
$schemaManager Bolt\Storage\Database\Schema\SchemaManagerInterface
$urlGenerator Symfony\Component\Routing\Generator\UrlGeneratorInterface
$loggerFlash Bolt\Logger\FlashLoggerInterface
$passwordFactory PasswordLib\Password\Factory
$hashStrength integer
$timedRecordsEnabled boolean

getSubscribedEvents() публичный статический Метод

public static getSubscribedEvents ( )

onKernelRequest() публичный Метод

Kernel request listener callback.
public onKernelRequest ( GetResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseEvent

onPostHydrate() публичный Метод

Post hydration storage event.
public onPostHydrate ( Bolt\Events\HydrationEvent $event )
$event Bolt\Events\HydrationEvent

onUserEntityPreSave() публичный Метод

Pre-save storage event for user entities.
public onUserEntityPreSave ( Bolt\Events\StorageEvent $event )
$event Bolt\Events\StorageEvent

passwordHash() защищенный Метод

Hash user passwords on save.
protected passwordHash ( Bolt\Storage\Entity\Users $usersEntity )
$usersEntity Bolt\Storage\Entity\Users

schemaCheck() защищенный Метод

Trigger database schema checks if required.
protected schemaCheck ( GetResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseEvent

Описание свойств

$hashStrength защищенное свойство

protected int $hashStrength
Результат integer

$loggerFlash защищенное свойство

protected FlashLoggerInterface,Bolt\Logger $loggerFlash
Результат Bolt\Logger\FlashLoggerInterface

$passwordFactory защищенное свойство

protected Factory,PasswordLib\Password $passwordFactory
Результат PasswordLib\Password\Factory

$schemaManager защищенное свойство

protected SchemaManagerInterface,Bolt\Storage\Database\Schema $schemaManager
Результат Bolt\Storage\Database\Schema\SchemaManagerInterface

$timedRecord защищенное свойство

protected TimedRecord,Bolt\Storage\EventProcessor $timedRecord
Результат Bolt\Storage\EventProcessor\TimedRecord

$timedRecordsEnabled защищенное свойство

protected bool $timedRecordsEnabled
Результат boolean

$urlGenerator защищенное свойство

protected UrlGeneratorInterface,Symfony\Component\Routing\Generator $urlGenerator
Результат Symfony\Component\Routing\Generator\UrlGeneratorInterface