User.php
24 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AC\Transient; |
| 4 | |
| 5 | use AC\Storage; |
| 6 | use AC\Transient; |
| 7 | use Exception; |
| 8 | |
| 9 | class User extends Transient { |
| 10 | |
| 11 | /** |
| 12 | * @param $key |
| 13 | * |
| 14 | * @throws Exception |
| 15 | */ |
| 16 | public function __construct( $key ) { |
| 17 | parent::__construct( $key ); |
| 18 | |
| 19 | $this->option = new Storage\UserMeta( $key ); |
| 20 | $this->timestamp = new Storage\Timestamp( |
| 21 | new Storage\UserMeta( $key . '_timestamp' ) |
| 22 | ); |
| 23 | } |
| 24 | } |