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

  • MetadataBag
  • MockArraySessionStorage
  • MockFileSessionStorage
  • NativeSessionStorage
  • PhpBridgeSessionStorage

Interfaces

  • SessionStorageInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class MockFileSessionStorage

MockFileSessionStorage is used to mock sessions for functional testing when done in a single PHP process.

No PHP session is actually started since a session can be initialized and shutdown only once per PHP execution cycle and this class does not pollute any session related globals, including session_() functions or session. PHP ini directives.

Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage implements Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface
Extended by Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage
Namespace: Symfony\Component\HttpFoundation\Session\Storage
Author: Drak drak@zikula.org
Located at Session/Storage/MockFileSessionStorage.php
Methods summary
public
# __construct( string $savePath = null, string $name = 'MOCKSESSID', Symfony\Component\HttpFoundation\Session\Storage\MetadataBag $metaBag = null )

Constructor.

Constructor.

Parameters

$savePath
Path of directory to save session files.
$name
Session name.
$metaBag
MetadataBag instance.

Overrides

Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage::__construct()
public boolean
# start( )

Starts the session.

Starts the session.

Returns

boolean
True if started.

Throws

RuntimeException
If something goes wrong starting the session.

Overrides

Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage::start()
public boolean
# regenerate( boolean $destroy = false, integer $lifetime = null )

Regenerates id that represents this storage.

Regenerates id that represents this storage.

Parameters

$destroy
Destroy session when regenerating?
$lifetime

Sets the cookie lifetime for the session cookie. A null value will leave the system settings unchanged, 0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp.

Returns

boolean
True if session regenerated, false if error

Throws

RuntimeException
If an error occurs while regenerating this storage

Overrides

Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage::regenerate()
public
# save( )

Force the session to be saved and closed.

Force the session to be saved and closed.

Throws

RuntimeException

If the session is saved without being started, or if the session is already closed.

Overrides

Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage::save()
Methods inherited from Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage
clear(), generateId(), getBag(), getId(), getMetadataBag(), getName(), isStarted(), loadSession(), registerBag(), setId(), setMetadataBag(), setName(), setSessionData()
Properties inherited from Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage
$bags, $closed, $data, $id, $metadataBag, $name, $started
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen