1: <?php
2: /**
3: * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
4: * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
5: *
6: * Licensed under The MIT License
7: * For full copyright and license information, please see the LICENSE.txt
8: * Redistributions of files must retain the above copyright notice.
9: *
10: * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
11: * @link https://cakephp.org CakePHP(tm) Project
12: * @since 3.1.0
13: * @license https://opensource.org/licenses/mit-license.php MIT License
14: */
15: namespace Cake\Auth\Storage;
16:
17: /**
18: * Describes the methods that any class representing an Auth data storage should
19: * comply with.
20: */
21: interface StorageInterface
22: {
23: /**
24: * Read user record.
25: *
26: * @return \ArrayAccess|array|null
27: */
28: public function read();
29:
30: /**
31: * Write user record.
32: *
33: * @param array|\ArrayAccess $user User record.
34: * @return void
35: */
36: public function write($user);
37:
38: /**
39: * Delete user record.
40: *
41: * @return void
42: */
43: public function delete();
44:
45: /**
46: * Get/set redirect URL.
47: *
48: * @param mixed $url Redirect URL. If `null` returns current URL. If `false`
49: * deletes currently set URL.
50: * @return mixed
51: */
52: public function redirectUrl($url = null);
53: }
54: