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 TipyIOWrapper

Base class to wrap input/output superglobals for sanitation/validation

For example if you want extra XSS protection on input or output you may use controller's executeBefore() or executeAfter() hooks:

class MyController extends TipyController {
    public function executeAfter() {
        foreach ($this->out->getAll() as $key => $value) {
            $this->out->set($key, htmlspecialchars($value));
        }
    }
}

Direct known subclasses

TipyCliSession, TipyConfig, TipyInput, TipyOutput, TipyRequest
Package: tipy
Located at src/TipyIOWrapper.php
Methods summary
public
# __construct( )

Construct empty TipyIOWrapper instance

Construct empty TipyIOWrapper instance

public
# bind( array $map )

Specify array to wrap in TipyIOWrapper

Specify array to wrap in TipyIOWrapper

This array should be a hash with string keys. This may be superglobal array like $_GET, $_POST, etc...

Parameters

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

Return value from internal hash by key name

Return value from internal hash by key name

If key does not exist return defaultValue

Parameters

$key
$defaultValue

Returns

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

Parameters

$key
$value
public
# getAll( )

Return all data from internal map

Return all data from internal map

public
# clear( )

Clear all data in internal map

Clear all data in internal map

tipy API documentation generated by ApiGen