Overview

Packages

  • tipy

Classes

  • Tipy
  • TipyApp
  • TipyCli
  • TipyCliSession
  • TipyConfig
  • TipyController
  • TipyCookie
  • TipyDAO
  • TipyEnv
  • TipyFlash
  • TipyInflector
  • TipyInput
  • TipyIOWrapper
  • TipyLogger
  • TipyMailer
  • TipyModel
  • TipyOutput
  • TipyRequest
  • TipySession
  • TipyTestCase
  • TipyTestRunner
  • TipyView

Exceptions

  • AssertionFailedException
  • CompileErrorException
  • CompileWarningException
  • CoreErrorException
  • CoreWarningException
  • DeprecatedException
  • NoMethodException
  • NoticeException
  • ParseException
  • RecoverableErrorException
  • StrictException
  • TipyDaoException
  • TipyException
  • TipyModelException
  • TipyRollbackException
  • TipyValidationException
  • UserDeprecatedException
  • UserErrorException
  • UserNoticeException
  • UserWarningException
  • WarningException
  • Overview
  • Package
  • Class
  • Deprecated
  • Todo

Class TipySession

Access session data the same way as any other tipy input/output objects

class MyController extends TipyController {
    public function index() {
        $userId = $this->session->get('userId');
        $this->session->set('my_variable', 'Hello World!');
        // ...
    }
}
Package: tipy
Located at src/TipySession.php
Methods summary
public
# __construct( )

Construct TipySession instance from $_SESSION. If session is not yet started it will be started immediately. If session is already started if will be resumed.

Construct TipySession instance from $_SESSION. If session is not yet started it will be started immediately. If session is already started if will be resumed.

public
# start( )

Start new or resume existing session

Start new or resume existing session

public
# setLifetime( integer $time = 0 )

Set session lifetime in seconds

Set session lifetime in seconds

Parameters

$time
public
# close( )

Destroy the session and delete all session data

Destroy the session and delete all session data

public
# bind( array $map )

The way to set many variables at once

The way to set many variables at once

NOTE: This will overwrite existing session data

Parameters

$map
public mixed
# get( string $key, mixed $defaultValue,… )

Get session variable by its name

Get session variable by its name

Parameters

$key
$defaultValue,…

Returns

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

Set session variable

Set session variable

Parameters

$key
$value
public array
# getAll( )

Get all data stored in session

Get all data stored in session

Returns

array
tipy API documentation generated by ApiGen