Overview

Namespaces

  • Chippyash
    • Authentication
      • Manager
        • Digest
        • Encoder
        • Exceptions
        • Traits

Classes

  • AbstractDigestCollection
  • BasicDigestCollection

Interfaces

  • DigestCollectionInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class AbstractDigestCollection

A collection of Digests

Chippyash\Authentication\Manager\Digest\AbstractDigestCollection implements Chippyash\Authentication\Manager\Digest\DigestCollectionInterface, Countable

Direct known subclasses

Chippyash\Authentication\Manager\Digest\BasicDigestCollection
Abstract
Namespace: Chippyash\Authentication\Manager\Digest
Located at Authentication/Manager/Digest/AbstractDigestCollection.php
Methods summary
public
# __construct( Chippyash\Type\String\StringType $fileName, array $digests = [] )
public Fluent
# setWriteOptions( Chippyash\Type\Number\IntType $options )

Set file writing options

Set file writing options

Parameters

$options
file_put_contents options

Returns

Fluent
Interface

See

\file_put_contents
public Fluent
# setEncoder( Chippyash\Authentication\Manager\Encoder\DigestEncoderInterface $encoder )

Set the encoder

Set the encoder

Parameters

$encoder

Returns

Fluent
Interface
public integer
# count( )

Returns

integer
int

Interface

\Countable

Implementation of

Countable::count()
public array
# get( Chippyash\Type\Number\IntType $index )

Get digest item

Get digest item

Parameters

$index

Returns

array
Digest item

Throws

Chippyash\Authentication\Manager\Exceptions\AuthManagerException
Chippyash\Authentication\Manager\Exceptions\AuthManagerException

Implementation of

Chippyash\Authentication\Manager\Digest\DigestCollectionInterface::get()
public Chippyash\Type\BoolType
# del( Chippyash\Type\Number\IntType $index )

Delete digest item

Delete digest item

Parameters

$index

Returns

Chippyash\Type\BoolType
true on success else false

Implementation of

Chippyash\Authentication\Manager\Digest\DigestCollectionInterface::del()
abstract public Chippyash\Type\Number\IntType|false
# findByUid( Chippyash\Type\String\StringType $uid )

Return index into collection for a digest given its uid

Return index into collection for a digest given its uid

Parameters

$uid
user id

Returns

Chippyash\Type\Number\IntType|false
Chippyash\Type\Number\IntType|false

Implementation of

Chippyash\Authentication\Manager\Digest\DigestCollectionInterface::findByUid()
abstract public Chippyash\Type\BoolType
# read( )

Read the digest into the collection from file

Read the digest into the collection from file

Returns

Chippyash\Type\BoolType
true on success else false

Implementation of

Chippyash\Authentication\Manager\Digest\DigestCollectionInterface::read()
abstract public Chippyash\Type\BoolType
# write( )

Write the collection to file

Write the collection to file

Returns

Chippyash\Type\BoolType
true on success else false

Implementation of

Chippyash\Authentication\Manager\Digest\DigestCollectionInterface::write()
abstract public Chippyash\Type\BoolType
# add( Chippyash\Type\String\StringType $uid, Chippyash\Type\String\StringType $pwd )

Add a digest line to the collection

Add a digest line to the collection

Parameters

$uid
user id
$pwd
password

Returns

Chippyash\Type\BoolType
true on success else false

Implementation of

Chippyash\Authentication\Manager\Digest\DigestCollectionInterface::add()
abstract public Chippyash\Type\String\StringType
# asString( Chippyash\Type\Number\IntType $index )

Return the collection item as a raw digest string

Return the collection item as a raw digest string

Parameters

$index
Index into collection

Returns

Chippyash\Type\String\StringType
StringType

Throws

chippyash\Authezntication\Manager\Exceptions\AuthManagerException
chippyash\Authezntication\Manager\Exceptions\AuthManagerException

Implementation of

Chippyash\Authentication\Manager\Digest\DigestCollectionInterface::asString()
Constants summary
string ERR_NO_DIGEST_TPL
#'No digest at index %d'
Properties summary
protected integer $writeOptions

File write options

File write options

See

\file_put_contents
#LOCK_EX
protected Chippyash\Type\String\StringType $fileName

Name of file that digest collection is stored in

Name of file that digest collection is stored in

#
protected Chippyash\Authentication\Manager\Encoder\DigestEncoderInterface $encoder

Digest encoder

Digest encoder

#
protected array $collection

Collection of digest items

Collection of digest items

#[]
Chippyash Authentication Manager Library API API documentation generated by ApiGen 2.8.0