|
const | TABLE = 'tmplinks' |
|
const | PK = 'hash' |
|
const | TARGET_MEMBERCARD = 1 |
|
const | TARGET_INVOICE = 2 |
|
const | TARGET_RECEIPT = 3 |
|
Temporary links for galette, to send direct links to invoices, receipts, and member cards directly by email
- Author
- Johan Cwiklinski johan.nosp@m.@x-t.nosp@m.nd.be
◆ __construct()
Galette\Core\Links::__construct |
( |
Db |
$zdb, |
|
|
bool |
$clean = true |
|
) |
| |
Default constructor
- Parameters
-
Db | $zdb | Database instance: |
boolean | $clean | Whether we should clean expired links in database |
◆ cleanExpired()
Galette\Core\Links::cleanExpired |
( |
| ) |
|
|
protected |
Remove expired links queries (older than 1 week)
- Returns
- boolean
◆ generateNewLink()
Galette\Core\Links::generateNewLink |
( |
int |
$target, |
|
|
int |
$id |
|
) |
| |
Generates a new link for specified target
- Parameters
-
int | $target | Target (one of self::TARGET_* constants) |
int | $id | Target identifier |
- Returns
- string
◆ isHashValid()
Galette\Core\Links::isHashValid |
( |
string |
$hash, |
|
|
string |
$code |
|
) |
| |
Check if requested hash is valid
- Parameters
-
string | $hash | the hash, base64 encoded |
string | $code | Code sent to validate link |
- Returns
- array<int,int>|false false if hash is not valid, array otherwise
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/galette-apidoc/checkouts/develop/galette/lib/Galette/Core/Links.php