PluginProbe
Boxzilla – WordPress Popup Builder / 3.0.3
Boxzilla – WordPress Popup Builder v3.0.3
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.0.3, at src/di/class-container-with-property-access.php

54 lines 1006 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 * @param string $name
16 * @return mixed
17 */
18 public function __get( $name ) {
19 return $this->offsetGet( $name );
20 }
21
22 /**
23 * @param string $name
24 * @param mixed $value
25 */
26 public function __set( $name, $value ) {
27 $this[ $name ] = $value;
28 }
29
30 /**
31 * @param string $name
32 * @return bool
33 */
34 public function __isset( $name ) {
35 return $this->offsetExists( $name );
36 }
37
38 /**
39 * @param string $name
40 * @return bool
41 */
42 public function has( $name ) {
43 return $this->offsetExists( $name );
44 }
45
46 /**
47 * @param string $name
48 * @return mixed
49 */
50 public function get( $name ) {
51 return $this->offsetGet( $name );
52 }
53
54 }