1 | <?php |
||
16 | class JailedDocument implements \ArrayAccess, \IteratorAggregate |
||
17 | { |
||
18 | /** |
||
19 | * @var string[] |
||
20 | */ |
||
21 | private $whiteListFunctions; |
||
22 | |||
23 | /** |
||
24 | * @var string[] |
||
25 | */ |
||
26 | private $jailedFunctions; |
||
27 | |||
28 | /** |
||
29 | * @var JailedDocumentInterface |
||
30 | */ |
||
31 | private $object; |
||
32 | |||
33 | /** |
||
34 | * JailObject constructor. |
||
35 | * |
||
36 | * @param JailedDocumentInterface $object The object that will be jailed |
||
37 | * @param array $whiteListFunctions A list of function names that can be called |
||
38 | * @param array $jailedFunctions |
||
39 | */ |
||
40 | 55 | public function __construct(&$object, array $whiteListFunctions, array $jailedFunctions = array()) |
|
53 | |||
54 | 11 | public function __call($name, $arguments) |
|
76 | |||
77 | 4 | public function coreInstanceOf($class) |
|
81 | |||
82 | // |
||
83 | // ArrayAccess Implementation |
||
84 | // |
||
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | */ |
||
89 | 22 | public function offsetExists($offset) |
|
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | 32 | public function offsetGet($offset) |
|
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | public function offsetSet($offset, $value) |
||
109 | |||
110 | /** |
||
111 | * {@inheritdoc} |
||
112 | */ |
||
113 | public function offsetUnset($offset) |
||
117 | |||
118 | // |
||
119 | // IteratorAggregate implementation |
||
120 | // |
||
121 | |||
122 | /** |
||
123 | * {@inheritdoc} |
||
124 | */ |
||
125 | 19 | public function getIterator() |
|
129 | } |
||
130 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.