2017 © Pedro Peláez
 

library aura-session-module

Aura Session module for Ray.Di

image

ray/aura-session-module

Aura Session module for Ray.Di

  • Thursday, September 7, 2017
  • by koriym
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13,786 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 12 % Grown

The README.md

Ray.AuraSessionModule

Continuous Integration, (*1)

An Aura.Session module for Ray.Di., (*2)

Installation

Composer install

$ composer require ray/aura-session-module

Module install

use Ray\Di\AbstractModule;
use Ray\AuraSessionModule\AuraSessionModule;

class AppModule extends AbstractModule
{
    protected function configure(): void
    {
        $this->install(new AuraSessionModule);
    }
}

Usage

use Aura\Session\Session;
use MyVendor\MyPackage\MyClass;

class Index extends ResourceObject
{
    public function __construct(
        private readonly Session $session
    ) {}

    public function onGet() : static
    {
        // get a _Segment_ object
        $segment = $this->session->getSegment(MyClass::class);

        // try to get a value from the segment;
        // if it does not exist, return an alternative value
        echo $segment->get('foo'); // null
        echo $segment->get('baz', 'not set'); // 'not set'
    }
}

The Versions

07/09 2017

1.x-dev

1.9999999.9999999.9999999-dev

Aura Session module for Ray.Di

  Sources   Download

MIT

The Requires

 

The Development Requires

aura session ray.di

05/09 2016

1.1.0

1.1.0.0

Aura Session module for Ray.Di

  Sources   Download

MIT

The Requires

 

aura session ray.di

05/09 2015

1.0.0

1.0.0.0

Aura Session module for Ray.Di

  Sources   Download

MIT

The Requires

 

aura session ray.di