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  * ArrayCase is an OOP way of handling arrays
10  */
11 interface ArrayCaseInterface
12 {
13     /**
14      * Constructor.
15      * @param array $array The array to "wrap"
16      */
17     public function __construct(array $array = array());
18 
19     /**
20      * Returns the array
21      * @return array The array
22      */
23     public function all();
24 
25     /**
26      * Returns the value for a specific key
27      * @param  string   $key     The key
28      * @param  mixed    $default This returns when the key wasn' t found
29      * @return mixed
30      */
31     public function get($key, $default = null);
32 
33     /**
34      * Sets a parameter for a specific key
35      * @param string    $key        The key
36      * @param mixed     $value      The value to store
37      * @param boolean   $override   FALSE will force the method to not override existing keys
38      * @return boolean  Whether the setting was successful
39      */
40     public function set($key, $value, $override = true);
41 
42     /**
43      * Checks if a key parameter exists
44      * @param  string  $key The key
45      * @return boolean      TRUE if found
46      */
47     public function has($key);
48 
49     /**
50      * Removes a parameter from the array
51      * @param  string $key The key
52      */
53     public function remove($key);
54 
55     /**
56      * Merge the internal array with the new one
57      * @param  array  $array The array to merge
58      */
59     public function merge(array $array = array());
60 
61     /**
62      * Replace the internal completly with the new one
63      * It' s just a assigning, no magic things!
64      * @param  array  $array The array
65      */
66     public function mock(array $array = array());
67 
68     /**
69      * Return all keys from the array
70      * @return array The keys in a array
71      */
72     public function keys();
73 
74     /**
75      * Pushes a parameter
76      * @param mixed $value  The value to store
77      */
78     public function push($value);
79 }
API documentation generated by ApiGen 2.8.0