Class to represent a platform resource link share key. More...
Public Member Functions | |
| __construct ($resourceLink, $id=null) | |
| Class constructor. | |
| initialize () | |
| Initialise the resource link share key. | |
| initialise () | |
| Initialise the resource link share key. | |
| save () | |
| Save the resource link share key to the database. | |
| delete () | |
| Delete the resource link share key from the database. | |
| getId () | |
| Get share key value. | |
Data Fields | |
| const | MAX_SHARE_KEY_LIFE = 168 |
| Maximum permitted life for a share key value. | |
| const | DEFAULT_SHARE_KEY_LIFE = 24 |
| Default life for a share key value. | |
| const | MIN_SHARE_KEY_LENGTH = 5 |
| Minimum length for a share key value. | |
| const | MAX_SHARE_KEY_LENGTH = 32 |
| Maximum length for a share key value. | |
| $resourceLinkId = null | |
| ID for resource link being shared. | |
| $length = null | |
| Length of share key. | |
| $life = null | |
| Life of share key. | |
| $autoApprove = false | |
| Whether the sharing arrangement should be automatically approved when first used. | |
| $expires = null | |
| Timestamp for when the share key expires. | |
Class to represent a platform resource link share key.
Definition at line 14 of file ResourceLinkShareKey.php.
| __construct | ( | $resourceLink, | |
$id = null |
|||
| ) |
Class constructor.
| ResourceLink | $resourceLink | ResourceLink object |
| string | null | $id | Value of share key (optional, default is null) |
Definition at line 92 of file ResourceLinkShareKey.php.
References ResourceLinkShareKey\initialize().
| delete | ( | ) |
Delete the resource link share key from the database.
Definition at line 155 of file ResourceLinkShareKey.php.
| getId | ( | ) |
Get share key value.
Definition at line 165 of file ResourceLinkShareKey.php.
| initialise | ( | ) |
Initialise the resource link share key.
Synonym for initialize().
Definition at line 120 of file ResourceLinkShareKey.php.
References ResourceLinkShareKey\initialize().
| initialize | ( | ) |
Initialise the resource link share key.
Definition at line 107 of file ResourceLinkShareKey.php.
Referenced by ResourceLinkShareKey\__construct(), and ResourceLinkShareKey\initialise().
| save | ( | ) |
Save the resource link share key to the database.
Definition at line 130 of file ResourceLinkShareKey.php.
References ResourceLinkShareKey\DEFAULT_SHARE_KEY_LIFE, Util\getRandomString(), and ResourceLinkShareKey\MAX_SHARE_KEY_LENGTH.
| bool $autoApprove = false |
Whether the sharing arrangement should be automatically approved when first used.
Definition at line 63 of file ResourceLinkShareKey.php.
| int null $expires = null |
Timestamp for when the share key expires.
Definition at line 70 of file ResourceLinkShareKey.php.
| int null $length = null |
Length of share key.
Definition at line 49 of file ResourceLinkShareKey.php.
| int null $life = null |
Life of share key.
Definition at line 56 of file ResourceLinkShareKey.php.
| int null $resourceLinkId = null |
ID for resource link being shared.
Definition at line 42 of file ResourceLinkShareKey.php.
| const DEFAULT_SHARE_KEY_LIFE = 24 |
Default life for a share key value.
Definition at line 25 of file ResourceLinkShareKey.php.
Referenced by ResourceLinkShareKey\save().
| const MAX_SHARE_KEY_LENGTH = 32 |
Maximum length for a share key value.
Definition at line 35 of file ResourceLinkShareKey.php.
Referenced by ResourceLinkShareKey\save().
| const MAX_SHARE_KEY_LIFE = 168 |
Maximum permitted life for a share key value.
Definition at line 20 of file ResourceLinkShareKey.php.
| const MIN_SHARE_KEY_LENGTH = 5 |
Minimum length for a share key value.
Definition at line 30 of file ResourceLinkShareKey.php.