ManaPHP\Http\Session\Bag::get PHP Метод

get() публичный Метод

echo $user->get('name', 'Kimbra');
public get ( string $property = null, string $defaultValue = null ) : mixed
$property string
$defaultValue string
Результат mixed
    public function get($property = null, $defaultValue = null)
    {
        $defaultCurrentValue = [];
        $data = $this->session->get($this->_name, $defaultCurrentValue);
        if ($property === null) {
            return $data;
        } else {
            return isset($data[$property]) ? $data[$property] : $defaultValue;
        }
    }