PluginProbe
Boxzilla – WordPress Popup Builder / 3.2.18
Boxzilla – WordPress Popup Builder v3.2.18
3.4.11 3.4.10 3.4.9 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 trunk 3.0 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 All 72 releases
boxzilla / src / di / class-container-with-property-access.php

class-container-with-property-access.php in Boxzilla – WordPress Popup Builder 3.2.18, at src/di/class-container-with-property-access.php

55 lines 897 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Boxzilla\DI;
4
5 /**
6 * Class ContainerWithPropertyAccess
7 *
8 * This modifies Pimple so it is PSR-11 compatible and can be accessed using property accessors.
9 *
10 * @package Boxzilla\DI
11 */
12 class ContainerWithPropertyAccess extends Container {
13
14
15 /**
16 * @param string $name
17 * @return mixed
18 */
19 public function __get( $name ) {
20 return $this->offsetGet( $name );
21 }
22
23 /**
24 * @param string $name
25 * @param mixed $value
26 */
27 public function __set( $name, $value ) {
28 $this[ $name ] = $value;
29 }
30
31 /**
32 * @param string $name
33 * @return bool
34 */
35 public function __isset( $name ) {
36 return $this->offsetExists( $name );
37 }
38
39 /**
40 * @param string $name
41 * @return bool
42 */
43 public function has( $name ) {
44 return $this->offsetExists( $name );
45 }
46
47 /**
48 * @param string $name
49 * @return mixed
50 */
51 public function get( $name ) {
52 return $this->offsetGet( $name );
53 }
54 }
55