| Total Complexity | 4 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | class Flow extends Base implements \Aimeos\MW\Session\Iface |
||
| 21 | { |
||
| 22 | private $object; |
||
| 23 | |||
| 24 | |||
| 25 | /** |
||
| 26 | * Initializes the object. |
||
| 27 | * |
||
| 28 | * @param \Neos\Flow\Session\SessionInterface $object Flow session object |
||
| 29 | */ |
||
| 30 | public function __construct( \Neos\Flow\Session\SessionInterface $object ) |
||
| 31 | { |
||
| 32 | $this->object = $object; |
||
| 33 | } |
||
| 34 | |||
| 35 | |||
| 36 | /** |
||
| 37 | * Returns the value of the requested session key. |
||
| 38 | * |
||
| 39 | * If the returned value wasn't a string, it's decoded from its string representation. |
||
| 40 | * |
||
| 41 | * @param string $name Key of the requested value in the session |
||
| 42 | * @param mixed $default Value returned if requested key isn't found |
||
| 43 | * @return mixed Value associated to the requested key |
||
| 44 | */ |
||
| 45 | public function get( string $name, $default = null ) |
||
| 52 | } |
||
| 53 | |||
| 54 | |||
| 55 | /** |
||
| 56 | * Sets the value for the specified key. |
||
| 57 | * |
||
| 58 | * If the value isn't a string, it's serialized and decoded again when using the get() method. |
||
| 59 | * |
||
| 60 | * @param string $name Key to the value which should be stored in the session |
||
| 61 | * @param mixed $value Value that should be associated with the given key |
||
| 62 | */ |
||
| 63 | public function set( string $name, $value ) : Iface |
||
| 69 |