@@ -43,23 +43,39 @@ discard block |
||
| 43 | 43 | public function updateCredential($credential) { |
| 44 | 44 | return $this->credentialMapper->updateCredential($credential); |
| 45 | 45 | } |
| 46 | + |
|
| 47 | + /** |
|
| 48 | + * @param Credential $credential |
|
| 49 | + */ |
|
| 46 | 50 | public function upd($credential) { |
| 47 | 51 | return $this->credentialMapper->upd($credential); |
| 48 | 52 | } |
| 49 | 53 | |
| 54 | + /** |
|
| 55 | + * @param Credential $credential |
|
| 56 | + */ |
|
| 50 | 57 | public function deleteCredential($credential){ |
| 51 | 58 | return $this->credentialMapper->deleteCredential($credential); |
| 52 | 59 | } |
| 53 | 60 | |
| 61 | + /** |
|
| 62 | + * @param integer $vault_id |
|
| 63 | + */ |
|
| 54 | 64 | public function getCredentialsByVaultId($vault_id, $user_id) { |
| 55 | 65 | return $this->credentialMapper->getCredentialsByVaultId($vault_id, $user_id); |
| 56 | 66 | } |
| 57 | 67 | |
| 68 | + /** |
|
| 69 | + * @param integer $vault_id |
|
| 70 | + */ |
|
| 58 | 71 | public function getRandomCredentialByVaultId($vault_id, $user_id) { |
| 59 | 72 | $credentials = $this->credentialMapper->getRandomCredentialByVaultId($vault_id, $user_id); |
| 60 | 73 | return array_pop($credentials); |
| 61 | 74 | } |
| 62 | 75 | |
| 76 | + /** |
|
| 77 | + * @param integer $timestamp |
|
| 78 | + */ |
|
| 63 | 79 | public function getExpiredCredentials($timestamp) { |
| 64 | 80 | return $this->credentialMapper->getExpiredCredentials($timestamp); |
| 65 | 81 | } |
@@ -77,6 +93,10 @@ discard block |
||
| 77 | 93 | |
| 78 | 94 | throw new DoesNotExistException("Did expect one result but found none when executing"); |
| 79 | 95 | } |
| 96 | + |
|
| 97 | + /** |
|
| 98 | + * @param integer $credential_id |
|
| 99 | + */ |
|
| 80 | 100 | public function getCredentialLabelById($credential_id){ |
| 81 | 101 | return $this->credentialMapper->getCredentialLabelById($credential_id); |
| 82 | 102 | } |