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