Cartalyst\Sentinel\Sessions\CISession::get PHP Method

get() public method

{@inheritDoc}
public get ( )
    public function get()
    {
        $value = $this->store->userdata($this->key);
        if ($value) {
            return unserialize($value);
        }
    }

Usage Example

 public function testGet()
 {
     $session = new CISession($store = m::mock('CI_Session'), 'foo');
     $store->shouldReceive('userdata')->with('foo')->once()->andReturn(serialize('bar'));
     $this->assertEquals('bar', $session->get());
 }