Overview
  • Namespace
  • Class

Namespaces

  • Slim
    • Exception
    • Handlers
      • Strategies
    • Http
    • Interfaces
      • Http

Classes

  • Body
  • Cookies
  • Environment
  • Headers
  • Message
  • Request
  • RequestBody
  • Response
  • Stream
  • UploadedFile
  • Uri

Class Environment

Environment

This class decouples the Slim application from the global PHP environment. This is particularly useful for unit testing, but it also lets us create custom sub-requests.

Slim\Collection implements Slim\Interfaces\CollectionInterface
Extended by Slim\Http\Environment implements Slim\Interfaces\Http\EnvironmentInterface
Namespace: Slim\Http
Located at Http/Environment.php

Methods summary

public static Slim\Http\Environment
# mock( array $userData = [] )

Create mock environment

Create mock environment

Parameters

$userData
Array of custom environment keys and values

Returns

Slim\Http\Environment

Implementation of

Slim\Interfaces\Http\EnvironmentInterface::mock()

Methods inherited from Slim\Collection

__construct(), all(), clear(), count(), get(), getIterator(), has(), keys(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), remove(), replace(), set()

Properties summary

Properties inherited from Slim\Collection

$data

API documentation generated by ApiGen