Overview
  • Namespace
  • Class
  • Tree

Namespaces

  • Modulework
    • Modules
      • Http
        • Exceptions
        • Utilities
  • PHP

Classes

  • ArrayCase
  • FileCase
  • HeaderCase
  • HeaderWrapper
  • IpValidator
  • ServerCase

Interfaces

  • ArrayCaseInterface
  • HeaderWrapperInterface
  • IpValidatorInterface
 1 <?php namespace Modulework\Modules\Http\Utilities;
 2 /*
 3  * (c) Christian Gärtner <christiangaertner.film@googlemail.com>
 4  * This file is part of the Modulework Framework
 5  * License: View distributed LICENSE file
 6  */
 7 
 8 /**
 9  * {@inheritdoc}
10  * Adds:
11  * - getHeaders()
12  */
13 class ServerCase extends ArrayCase {
14 
15     /**
16      * Returns the HTTP headers
17      * @return array The HTTP headers
18      */
19     public function getHeaders()
20     {
21         $headers = array();
22 
23         foreach($this->array as $header => $content) {
24             if (0 === strpos($header, 'HTTP_')) {
25                 $headers[substr($header, 5)] = $content;
26             }
27         }
28 
29         return $headers;
30     }
31 }
API documentation generated by ApiGen 2.8.0