for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Phossa Project
*
* PHP version 5.4
* @category Library
* @package Phossa2\Session
* @copyright Copyright (c) 2016 phossa.com
* @license http://mit-license.org/ MIT License
* @link http://www.phossa.com/
*/
/*# declare(strict_types=1); */
namespace Phossa2\Session\Traits;
use SessionHandlerInterface;
use Phossa2\Session\Handler\FileHandler;
use Phossa2\Session\Interfaces\HandlerAwareInterface;
* HandlerAwareTrait
* Implemetation of HandlerAwareInterface
* @author Hong Zhang <[email protected]>
* @see HandlerAwareInterface
* @version 2.1.0
* @since 2.1.0 added
trait HandlerAwareTrait
{
* @var SessionHandlerInterface
* @access protected
protected $handler;
* {@inheritDoc}
public function setHandler(SessionHandlerInterface $handler = null)
$this->handler = $handler;
return $this;
}
public function getHandler()/*# : SessionHandlerInterface */
if (null === $this->handler) {
$this->handler = new FileHandler();
return $this->handler;