Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
890bb76f
Commit
890bb76f
authored
Feb 07, 2017
by
Alex Pott
Browse files
Issue
#2845666
by dpi, ritzz, dawehner: *TempStore's missing @throws documentation
parent
0a7b3e6d
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/modules/user/src/PrivateTempStore.php
View file @
890bb76f
...
...
@@ -112,6 +112,9 @@ public function get($key) {
* The key of the data to store.
* @param mixed $value
* The data to store.
*
* @throws \Drupal\user\TempStoreException
* Thrown when a lock for the backend storage could not be acquired.
*/
public
function
set
(
$key
,
$value
)
{
$key
=
$this
->
createkey
(
$key
);
...
...
@@ -161,6 +164,9 @@ public function getMetadata($key) {
* @return bool
* TRUE if the object was deleted or does not exist, FALSE if it exists but
* is not owned by $this->owner.
*
* @throws \Drupal\user\TempStoreException
* Thrown when a lock for the backend storage could not be acquired.
*/
public
function
delete
(
$key
)
{
$key
=
$this
->
createkey
(
$key
);
...
...
core/modules/user/src/SharedTempStore.php
View file @
890bb76f
...
...
@@ -164,6 +164,9 @@ public function setIfNotExists($key, $value) {
* @return bool
* TRUE if the data was set, or FALSE if it already exists and is not owned
* by $this->user.
*
* @throws \Drupal\user\TempStoreException
* Thrown when a lock for the backend storage could not be acquired.
*/
public
function
setIfOwner
(
$key
,
$value
)
{
if
(
$this
->
setIfNotExists
(
$key
,
$value
))
{
...
...
@@ -185,6 +188,9 @@ public function setIfOwner($key, $value) {
* The key of the data to store.
* @param mixed $value
* The data to store.
*
* @throws \Drupal\user\TempStoreException
* Thrown when a lock for the backend storage could not be acquired.
*/
public
function
set
(
$key
,
$value
)
{
if
(
!
$this
->
lockBackend
->
acquire
(
$key
))
{
...
...
@@ -228,6 +234,9 @@ public function getMetadata($key) {
*
* @param string $key
* The key of the data to delete.
*
* @throws \Drupal\user\TempStoreException
* Thrown when a lock for the backend storage could not be acquired.
*/
public
function
delete
(
$key
)
{
if
(
!
$this
->
lockBackend
->
acquire
(
$key
))
{
...
...
@@ -251,6 +260,9 @@ public function delete($key) {
* @return bool
* TRUE if the object was deleted or does not exist, FALSE if it exists but
* is not owned by $this->owner.
*
* @throws \Drupal\user\TempStoreException
* Thrown when a lock for the backend storage could not be acquired.
*/
public
function
deleteIfOwner
(
$key
)
{
if
(
!
$object
=
$this
->
storage
->
get
(
$key
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment