SaveHandler
6 years ago
SessionAuth.php
6 years ago
SessionFingerprint.php
6 years ago
SessionInitializer.php
6 years ago
SessionNamespace.php
6 years ago
SessionNamespace.php
38 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Piwik - free/libre analytics platform |
| 4 | * |
| 5 | * @link https://matomo.org |
| 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 7 | * |
| 8 | */ |
| 9 | namespace Piwik\Session; |
| 10 | |
| 11 | use Piwik\Common; |
| 12 | use Piwik\Session; |
| 13 | use Zend_Session_Namespace; |
| 14 | |
| 15 | /** |
| 16 | * Session namespace. |
| 17 | * |
| 18 | */ |
| 19 | class SessionNamespace extends Zend_Session_Namespace |
| 20 | { |
| 21 | /** |
| 22 | * @param string $namespace |
| 23 | * @param bool $singleInstance |
| 24 | */ |
| 25 | public function __construct($namespace = 'Default', $singleInstance = false) |
| 26 | { |
| 27 | if (Common::isPhpCliMode()) { |
| 28 | self::$_readable = true; |
| 29 | self::$_writable = true; |
| 30 | return; |
| 31 | } |
| 32 | |
| 33 | Session::start(); |
| 34 | |
| 35 | parent::__construct($namespace, $singleInstance); |
| 36 | } |
| 37 | } |
| 38 |