phpDocumentor

MydbRegistry
in package
implements ArrayAccess, Countable, Traversable, Iterator, Serializable

Singleton or registry helper to manage multiple Mydb instances

Tags
author

Sergei Shilko contact@sshilko.com

license

https://opensource.org/licenses/mit-license.php MIT

see
https://github.com/sshilko/php-sql-mydb
psalm-suppress

MissingTemplateParam

Table of Contents

Interfaces

ArrayAccess
Countable
Traversable
Iterator
Serializable

Properties

$instance  : array<string, MydbInterface>

Methods

__clone()  : mixed
__serialize()  : array<string|int, mixed>
__unserialize()  : void
count()  : int
current()  : MydbInterface|null
Return the current element
key()  : string|null
Return the key of the current element
next()  : void
Move forward to next element
offsetExists()  : bool
Whether an offset exists
offsetGet()  : MydbInterface
Offset to retrieve
offsetSet()  : void
Offset to set
offsetUnset()  : void
Offset to unset
rewind()  : void
Rewind the Iterator to the first element
serialize()  : string|null
unserialize()  : void
valid()  : bool
Checks if current position is valid

Properties

Methods

__unserialize()

public __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>
Tags
throws
RegistryException

key()

Return the key of the current element

public key() : string|null
Return values
string|null

next()

Move forward to next element

public next() : void

offsetExists()

Whether an offset exists

public offsetExists(string $offset) : bool
Parameters
$offset : string
Tags
phpcs:disable

SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint

Return values
bool

true on success or false on failure.

offsetUnset()

Offset to unset

public offsetUnset(string $offset) : void
Parameters
$offset : string
Tags
phpcs:disable

SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint

rewind()

Rewind the Iterator to the first element

public rewind() : void

unserialize()

public unserialize(mixed $data) : void
Parameters
$data : mixed
Tags
throws
RegistryException
phpcs:disable

SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter

valid()

Checks if current position is valid

public valid() : bool
Return values
bool

The return value will be boolean and then evaluated. Returns true on success or false on failure.


        
On this page

Search results