Skip to content

Commit

Permalink
Merge pull request #1 from fiahfy/patch-1
Browse files Browse the repository at this point in the history
Add trait for setter injection
  • Loading branch information
koriym authored Sep 5, 2016
2 parents d155c20 + 978539b commit 858c4c9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/AuraSessionInject.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
/**
* This file is part of the Ray.AuraSessionModule package
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\AuraSessionModule;

use Aura\Session\Session;

trait AuraSessionInject
{
/**
* @var Session
*/
protected $session;

/**
* @param Session $session
*
* @\Ray\Di\Di\Inject
*/
public function setSession(Session $session)
{
$this->session = $session;
}
}
2 changes: 2 additions & 0 deletions src/SessionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class SessionProvider implements ProviderInterface
{
/**
* {@inheritdoc}
*
* @SuppressWarnings(PHPMD.Superglobals)
*/
public function get()
{
Expand Down

0 comments on commit 858c4c9

Please sign in to comment.