PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / mrclay / props-dic / src / Props / Pimple.php

Pimple.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 4.7.0, at vendor/mrclay/props-dic/src/Props/Pimple.php

57 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Props;
4
5 /**
6 * A version of Pimple that uses property access instead of array access
7 *
8 * @author Steve Clay <[email protected]>
9 */
10 class Pimple extends \Pimple\Container
11 {
12 /**
13 * Sets a parameter or an object.
14 *
15 * @param string $id The unique identifier for the parameter or object
16 * @param mixed $value The value of the parameter or a closure to define an object
17 * @throws \RuntimeException Prevent override of a frozen service
18 */
19 public function __set($id, $value)
20 {
21 $this->offsetSet($id, $value);
22 }
23
24 /**
25 * Gets a parameter or an object.
26 *
27 * @param string $id The unique identifier for the parameter or object
28 * @return mixed The value of the parameter or an object
29 * @throws \InvalidArgumentException if the identifier is not defined
30 */
31 public function __get($id)
32 {
33 return $this->offsetGet($id);
34 }
35
36 /**
37 * Checks if a parameter or an object is set.
38 *
39 * @param string $id The unique identifier for the parameter or object
40 * @return Boolean
41 */
42 public function __isset($id)
43 {
44 return $this->offsetExists($id);
45 }
46
47 /**
48 * Unsets a parameter or an object.
49 *
50 * @param string $id The unique identifier for the parameter or object
51 */
52 public function __unset($id)
53 {
54 $this->offsetUnset($id);
55 }
56 }
57