|
@@ -7,7 +7,7 @@ namespace Tools\Model\Entity;
|
|
|
* @property int $user_id
|
|
* @property int $user_id
|
|
|
* @property string $type
|
|
* @property string $type
|
|
|
* @property string $token_key
|
|
* @property string $token_key
|
|
|
- * @property-read string $key
|
|
|
|
|
|
|
+ * @property string $key Deprecated, use token_key instead.
|
|
|
* @property string $content
|
|
* @property string $content
|
|
|
* @property int $used
|
|
* @property int $used
|
|
|
* @property \Cake\I18n\Time $created
|
|
* @property \Cake\I18n\Time $created
|
|
@@ -29,4 +29,19 @@ class Token extends Entity {
|
|
|
return $this->token_key;
|
|
return $this->token_key;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Shim to allow ->key access for ->token_key.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @deprecated Use token_key instead.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param string|null $key
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return void
|
|
|
|
|
+ */
|
|
|
|
|
+ public function _setKey(?string $key): void {
|
|
|
|
|
+ trigger_error('Deprecated. Use ->token_key instead.', E_USER_DEPRECATED);
|
|
|
|
|
+
|
|
|
|
|
+ $this->token_key = $key;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|