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

  • Session

Interfaces

  • SessionBagInterface
  • SessionInterface
  • Overview
  • Namespace
  • Class
  • Tree

Interface SessionInterface

Interface for the session.

Direct known implementers

Symfony\Component\HttpFoundation\Session\Session
Namespace: Symfony\Component\HttpFoundation\Session
Author: Drak drak@zikula.org
Located at Session/SessionInterface.php
Methods summary
public boolean
# start( )

Starts the session storage.

Starts the session storage.

Returns

boolean
True if session started.

Throws

RuntimeException
If session fails to start.

Api

public string
# getId( )

Returns the session ID.

Returns the session ID.

Returns

string
The session ID.

Api

public
# setId( string $id )

Sets the session ID.

Sets the session ID.

Parameters

$id

Api

public mixed
# getName( )

Returns the session name.

Returns the session name.

Returns

mixed
The session name.

Api

public
# setName( string $name )

Sets the session name.

Sets the session name.

Parameters

$name

Api

public boolean
# invalidate( integer $lifetime = null )

Invalidates the current session.

Invalidates the current session.

Clears all session attributes and flashes and regenerates the session and deletes the old session from persistence.

Parameters

$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 invalidated, false if error.

Api

public boolean
# migrate( boolean $destroy = false, integer $lifetime = null )

Migrates the current session to a new session id while maintaining all session attributes.

Migrates the current session to a new session id while maintaining all session attributes.

Parameters

$destroy
Whether to delete the old session or leave it to garbage collection.
$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 migrated, false if error.

Api

public
# save( )

Force the session to be saved and closed.

Force the session to be saved and closed.

This method is generally not required for real sessions as the session will be automatically saved at the end of code execution.

public boolean
# has( string $name )

Checks if an attribute is defined.

Checks if an attribute is defined.

Parameters

$name
The attribute name

Returns

boolean
true if the attribute is defined, false otherwise

Api

public mixed
# get( string $name, mixed $default = null )

Returns an attribute.

Returns an attribute.

Parameters

$name
The attribute name
$default
The default value if not found.

Returns

mixed

Api

public
# set( string $name, mixed $value )

Sets an attribute.

Sets an attribute.

Parameters

$name
$value

Api

public array
# all( )

Returns attributes.

Returns attributes.

Returns

array
Attributes

Api

public
# replace( array $attributes )

Sets attributes.

Sets attributes.

Parameters

$attributes
Attributes
public mixed
# remove( string $name )

Removes an attribute.

Removes an attribute.

Parameters

$name

Returns

mixed
The removed value or null when it does not exist

Api

public
# clear( )

Clears all attributes.

Clears all attributes.

Api

public boolean
# isStarted( )

Checks if the session was started.

Checks if the session was started.

Returns

boolean
public
# registerBag( Symfony\Component\HttpFoundation\Session\SessionBagInterface $bag )

Registers a SessionBagInterface with the session.

Registers a SessionBagInterface with the session.

Parameters

$bag
public Symfony\Component\HttpFoundation\Session\SessionBagInterface
# getBag( string $name )

Gets a bag instance by name.

Gets a bag instance by name.

Parameters

$name

Returns

Symfony\Component\HttpFoundation\Session\SessionBagInterface
public Symfony\Component\HttpFoundation\Session\Storage\MetadataBag
# getMetadataBag( )

Gets session meta.

Gets session meta.

Returns

Symfony\Component\HttpFoundation\Session\Storage\MetadataBag
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen