Session Class

Aurora\Http\Session Namespace

Interfaces


Methods

start

Start session

Return Value

  • $this

Signature

public function start()

get

Get session item

Parameters

  • string $name — Item name
  • mixed $default — Default value

Return Value

  • mixed

Signature

public function get(string $name, mixed $default = '')

set

Set a session item

Parameters

  • string $name — Item name
  • mixed $value — Item data

Signature

public function set(string $name, mixed $value)

delete

Delete a session item

Parameters

  • string $name — Item name

Return Value

  • $this

Signature

public function delete(string $name)

clear

Clear session data

Return Value

  • $this

Signature

public function clear()

regenerate

Regenerate session data

Return Value

  • $this

Signature

public function regenerate()

all

Get all session items

Return Value

  • array

Signature

public function all(): array

has

Check if the session item exists and is not null

Parameters

  • string $name — Item name

Return Value

  • bool

Signature

public function has(string $name): bool

exists

Check if the session item exists

Parameters

  • string $name — Item name

Return Value

  • bool

Signature

public function exists(string $name): bool

push

Push a session item

Parameters

  • string $name — Item name
  • mixed $value — Item value

Return Value

  • $this

Signature

public function push(string $name, mixed $value)

pull

Pull a session item

Parameters

  • string $name — Item name
  • mixed $default — Default value

Return Value

  • mixed

Signature

public function pull(string $name, mixed $default = '')

flash

Flash a session item

Parameters

  • string $name — Item name
  • mixed $value — Item value

Return Value

  • $this

Signature

public function flash(string $name, mixed $value)

reflash

Reflash session

Return Value

  • $this

Signature

public function reflash()

keep

Keep a flashed item

Parameters

  • mixed $name — Item name

Return Value

  • $this

Signature

public function keep(mixed $name)

Go to top