Lock.php in Drupal 8
File
core/lib/Drupal/Core/TempStore/Lock.php
View source
<?php
namespace Drupal\Core\TempStore;
final class Lock {
private $ownerId;
private $updated;
public function __construct($owner_id, $updated) {
$this->ownerId = $owner_id;
$this->updated = $updated;
}
public function getOwnerId() {
return $this->ownerId;
}
public function getUpdated() {
return $this->updated;
}
public function __get($name) {
if ($name === 'owner') {
@trigger_error('Using the "owner" public property of a TempStore lock is deprecated in Drupal 8.7.0 and will not be allowed in Drupal 9.0.0. Use \\Drupal\\Core\\TempStore\\Lock::getOwnerId() instead. See https://www.drupal.org/node/3025869.', E_USER_DEPRECATED);
return $this
->getOwnerId();
}
if ($name === 'updated') {
@trigger_error('Using the "updated" public property of a TempStore lock is deprecated in Drupal 8.7.0 and will not be allowed in Drupal 9.0.0. Use \\Drupal\\Core\\TempStore\\Lock::getUpdated() instead. See https://www.drupal.org/node/3025869.', E_USER_DEPRECATED);
return $this
->getUpdated();
}
throw new \InvalidArgumentException($name);
}
}
Classes
Name |
Description |
Lock |
Provides a value object representing the lock from a TempStore. |