Overview

Namespaces

  • Composer
    • Autoload
  • Guzzle
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Mock
    • Stream
  • Mockery
    • Adapter
      • Phpunit
    • CountValidator
    • Exception
    • Generator
      • StringManipulation
        • Pass
    • Loader
    • Matcher
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • Fatzebra
      • Message
  • PHP
  • Symfony
    • Component
      • EventDispatcher
        • Debug
        • DependencyInjection
        • Tests
          • Debug
          • DependencyInjection
      • HttpFoundation
        • File
          • Exception
          • MimeType
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
        • Tests
          • File
            • MimeType
          • Session
            • Attribute
            • Flash
            • Storage
              • Handler
              • Proxy
      • Yaml
        • Exception
        • Tests

Classes

  • Symfony\Component\Yaml\Tests\A
  • Symfony\Component\Yaml\Tests\B
  • Symfony\Component\Yaml\Tests\DumperTest
  • Symfony\Component\Yaml\Tests\InlineTest
  • Symfony\Component\Yaml\Tests\ParseExceptionTest
  • Symfony\Component\Yaml\Tests\ParserTest
  • Symfony\Component\Yaml\Tests\YamlTest
  • Overview
  • Namespace
  • Function
  • Tree
 1: <?php
 2: 
 3: /*
 4:  * This file is part of the Symfony package.
 5:  *
 6:  * (c) Fabien Potencier <fabien@symfony.com>
 7:  *
 8:  * For the full copyright and license information, please view the LICENSE
 9:  * file that was distributed with this source code.
10:  */
11: 
12: namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
13: 
14: /**
15:  * NativeFileSessionHandler.
16:  *
17:  * Native session handler using PHP's built in file storage.
18:  *
19:  * @author Drak <drak@zikula.org>
20:  */
21: class NativeFileSessionHandler extends NativeSessionHandler
22: {
23:     /**
24:      * Constructor.
25:      *
26:      * @param string $savePath Path of directory to save session files.
27:      *                         Default null will leave setting as defined by PHP.
28:      *                         '/path', 'N;/path', or 'N;octal-mode;/path
29:      *
30:      * @see http://php.net/session.configuration.php#ini.session.save-path for further details.
31:      *
32:      * @throws \InvalidArgumentException On invalid $savePath
33:      */
34:     public function __construct($savePath = null)
35:     {
36:         if (null === $savePath) {
37:             $savePath = ini_get('session.save_path');
38:         }
39: 
40:         $baseDir = $savePath;
41: 
42:         if ($count = substr_count($savePath, ';')) {
43:             if ($count > 2) {
44:                 throw new \InvalidArgumentException(sprintf('Invalid argument $savePath \'%s\'', $savePath));
45:             }
46: 
47:             // characters after last ';' are the path
48:             $baseDir = ltrim(strrchr($savePath, ';'), ';');
49:         }
50: 
51:         if ($baseDir && !is_dir($baseDir)) {
52:             mkdir($baseDir, 0777, true);
53:         }
54: 
55:         ini_set('session.save_path', $savePath);
56:         ini_set('session.save_handler', 'files');
57:     }
58: }
59: 
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen