Overview

Namespaces

  • Deimos
    • Request
      • Adapter
  • PHP

Classes

  • Deimos\Request\Request

Interfaces

  • Throwable

Traits

  • Deimos\Request\Adapter\Data
  • Deimos\Request\Adapter\Other
  • Deimos\Request\Adapter\Query
  • Deimos\Request\Adapter\Request
  • Deimos\Request\Adapter\Router
  • Deimos\Request\Adapter\Server
  • Deimos\Request\AdapterExtension
  • Deimos\Request\DefaultAdapter
  • Deimos\Request\RequestExtension

Exceptions

  • BadFunctionCallException
  • Exception
  • InvalidArgumentException
  • LogicException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: 
 3: namespace Deimos\Request\Adapter;
 4: 
 5: trait Server
 6: {
 7: 
 8:     /**
 9:      * @var array
10:      */
11:     private $serverData;
12: 
13:     /**
14:      * @param string $path
15:      * @param mixed  $default
16:      *
17:      * @return mixed
18:      */
19:     public function server($path = null, $default = null)
20:     {
21:         $path = $this->normalizeUpp($path);
22: 
23:         return $this->arrGet($this->serverData(), $path, $default);
24:     }
25: 
26:     /**
27:      * @return array
28:      */
29:     private function serverData()
30:     {
31:         if (!$this->serverData)
32:         {
33:             $this->serverData = $this->inputArray(INPUT_SERVER);
34:         }
35: 
36:         return $this->serverData;
37:     }
38: 
39: }
API documentation generated by ApiGen