| 1 | <?php |
||
| 8 | abstract class AbstractAdapter implements ChainableAdapter |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var StorageInterface |
||
| 12 | */ |
||
| 13 | protected $storage; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Returns the persistent storage handler |
||
| 17 | * |
||
| 18 | * Session storage is used by default unless a different storage adapter has been set. |
||
| 19 | * |
||
| 20 | * @return StorageInterface |
||
| 21 | */ |
||
| 22 | public function getStorage() |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Sets the persistent storage handler |
||
| 33 | * |
||
| 34 | * @param StorageInterface $storage |
||
| 35 | * @return AbstractAdapter Provides a fluent interface |
||
| 36 | */ |
||
| 37 | public function setStorage(StorageInterface $storage) |
||
| 38 | { |
||
| 39 | $this->storage = $storage; |
||
| 40 | return $this; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Check if this adapter is satisfied or not |
||
| 45 | * |
||
| 46 | * @return bool |
||
| 47 | */ |
||
| 48 | public function isSatisfied() |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Set if this adapter is satisfied or not |
||
| 56 | * |
||
| 57 | * @param bool $bool |
||
| 58 | * @return AbstractAdapter |
||
| 59 | */ |
||
| 60 | public function setSatisfied($bool = true) |
||
| 70 | } |
||
| 71 |