VuFind API Documentation

SwitchDbHashCommand extends Command
in package

Console command: switch database encryption algorithm.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

$config  : Config
$pathResolver  : PathResolver|null
$userCardService  : UserCardServiceInterface
$userService  : UserServiceInterface
__construct()  : mixed
Constructor
configure()  : void
Configure the command.
execute()  : int
Run the command.
fixEntity()  : void
Re-encrypt an entity.
getConfigWriter()  : Writer
Get a config writer
getOpenSsl()  : Openssl
Get an OpenSsl object for the specified algorithm (or return null if the algorithm is 'none').

Properties

Methods

__construct()

Constructor

public __construct(Config $config, UserServiceInterface $userService, UserCardServiceInterface $userCardService[, string|null $name = null ][, PathResolver|null $pathResolver = null ]) : mixed
Parameters
$config : Config

VuFind configuration

$userService : UserServiceInterface

User database service

$userCardService : UserCardServiceInterface

UserCard database service

$name : string|null = null

The name of the command; passing null means it must be set in configure()

$pathResolver : PathResolver|null = null

Config file path resolver

Return values
mixed

configure()

Configure the command.

protected configure() : void
Return values
void

execute()

Run the command.

protected execute(InputInterface $input, OutputInterface $output) : int
Parameters
$input : InputInterface

Input object

$output : OutputInterface

Output object

Return values
int

0 for success

fixEntity()

Re-encrypt an entity.

protected fixEntity(AbstractDbService $service, UserEntityInterface|UserCardEntityInterface $entity, BlockCipher|null $oldcipher, BlockCipher $newcipher) : void
Parameters
$service : AbstractDbService

Database service

$entity : UserEntityInterface|UserCardEntityInterface

Row to update

$oldcipher : BlockCipher|null

Old cipher (null for none)

$newcipher : BlockCipher

New cipher

Tags
throws
InvalidArgumentException
Return values
void

getConfigWriter()

Get a config writer

protected getConfigWriter(string $path) : Writer
Parameters
$path : string

Path of file to write

Return values
Writer

getOpenSsl()

Get an OpenSsl object for the specified algorithm (or return null if the algorithm is 'none').

protected getOpenSsl(string $algorithm) : Openssl
Parameters
$algorithm : string

Encryption algorithm

Return values
Openssl

Search results