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 * HeaderWrapper
10 * This class wraps header releated methods:
11 * - headers_sent()
12 * - header()
13 * - setcookie()
14 */
15 interface HeaderWrapperInterface
16 {
17     /**
18      * Wrapper for PHP' s headers_sent()
19      * @param  string $file filename (optional)
20      * @param  string $line linenumber (optional)
21      * @return bool       The return value of PHP' s headers send
22      */
23     public static function headers_sent(&$file = null, &$line = null);
24     
25     /**
26      * Wrapper for PHP' s header()
27      * @param  string  $string             Der Header-String.
28      * @param  boolean $replace            Replace existing headers
29      * @param  int     $http_response_code The HTTP response code
30      * @return void 
31      */
32     public static function header($string, $replace = true, $http_response_code = null);
33 
34     /**
35      * Wrapper for PHP' s setcookie()
36      * @param  strign  $name     The name of the cookie
37      * @param  string  $value    The value of the cookie
38      * @param  integer $expire   Expire date of the cookie
39      * @param  string  $path     Valid path for the cookie
40      * @param  string  $domain   Domain name of the cookie
41      * @param  bool    $secure   Only accessable with SSL (HTTPS)
42      * @param  bool    $httponly Only accessable through HTTP protocol
43      * @return bool
44      */
45     public static function setcookie($name, $value = null, $expire = 0, $path = null, $domain = null, $secure = false, $httponly = false);
46     
47 }
API documentation generated by ApiGen 2.8.0