Last active
December 11, 2015 04:48
-
-
Save zluiten/4547622 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Zend Framework (http://framework.zend.com/) | |
* | |
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository | |
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | |
* @license http://framework.zend.com/license/new-bsd New BSD License | |
*/ | |
namespace Application\Controller; | |
use Zend\Mvc\Controller\AbstractActionController; | |
use Zend\View\Model\ViewModel; | |
use Zend\Session\SessionManager; | |
use Zend\Session\Storage\SessionArrayStorage; | |
use Zend\Session\Storage\SessionStorage; | |
use Zend\Authentication\Storage\Session as AuthSession; | |
class IndexController extends AbstractActionController | |
{ | |
public function indexAction() | |
{ | |
//$manager = new SessionManager(); | |
//$manager->setStorage(new SessionStorage()); | |
//$storage = new AuthSession(get_class($this), null, $manager); | |
$storage = new AuthSession(get_class($this)); | |
$storage->write(array('message' => 'is this message stored?')); | |
return new ViewModel(); | |
} | |
public function testAction() | |
{ | |
//$manager = new SessionManager(); | |
//$manager->setStorage(new SessionStorage()); | |
//$manager->setStorage(new SessionStorage()); | |
//$storage = new AuthSession(get_class($this), null, $manager); | |
$storage = new AuthSession(get_class($this)); | |
$message = $storage->read(); //null | |
return array('message' => $message); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment