ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ILIAS\Registration\DualOptIn\ValueObjects\PendingRegistrationHash Class Reference
+ Collaboration diagram for ILIAS\Registration\DualOptIn\ValueObjects\PendingRegistrationHash:

Public Member Functions

 __construct (string $value)
 
 equals (self $other)
 
 toString ()
 
 __toString ()
 

Private Attributes

string $value
 

Detailed Description

Definition at line 23 of file PendingRegistrationHash.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Registration\DualOptIn\ValueObjects\PendingRegistrationHash::__construct ( string  $value)

Definition at line 27 of file PendingRegistrationHash.php.

28 {
29 $value = trim($value);
30
31 if ($value === '') {
32 throw new \InvalidArgumentException('Registration hash must not be empty.');
33 }
34
35 if (mb_strlen($value) < 16) {
36 throw new \InvalidArgumentException('Registration hash must be 16 characters.');
37 }
38
39 $this->value = $value;
40 }

References ILIAS\Registration\DualOptIn\ValueObjects\PendingRegistrationHash\$value.

Member Function Documentation

◆ __toString()

ILIAS\Registration\DualOptIn\ValueObjects\PendingRegistrationHash::__toString ( )

Definition at line 52 of file PendingRegistrationHash.php.

References ILIAS\Registration\DualOptIn\ValueObjects\PendingRegistrationHash\toString().

+ Here is the call graph for this function:

◆ equals()

ILIAS\Registration\DualOptIn\ValueObjects\PendingRegistrationHash::equals ( self  $other)

Definition at line 42 of file PendingRegistrationHash.php.

42 : bool
43 {
44 return hash_equals($this->value, $other->value);
45 }

◆ toString()

ILIAS\Registration\DualOptIn\ValueObjects\PendingRegistrationHash::toString ( )

Field Documentation

◆ $value

string ILIAS\Registration\DualOptIn\ValueObjects\PendingRegistrationHash::$value
private

The documentation for this class was generated from the following file: