# boxzilla/3.0.3/src/di/class-container-with-property-access.php

Boxzilla – WordPress Popup Builder, version 3.0.3. 54 lines.

- Page: https://pluginprobe.com/plugins/boxzilla/3.0.3/code/src/di/class-container-with-property-access.php
- Raw: https://pluginprobe.com/plugins/boxzilla/3.0.3/raw/src/di/class-container-with-property-access.php
- Modified: 2016-05-23T09:06:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/boxzilla/3.0.3/code/src/di/class-container-with-property-access.php#L10-L20`.

```php
<?php

namespace Boxzilla\DI;

/**
 * Class ContainerWithPropertyAccess
 *
 * This modifies Pimple so it is PSR-11 compatible and can be accessed using property accessors.
 *
 * @package Boxzilla\DI
 */
class ContainerWithPropertyAccess extends Container {
    
   /**
    * @param string $name
    * @return mixed
    */
   public function __get( $name ) {
       return $this->offsetGet( $name );
   }

   /**
    * @param string $name
    * @param mixed $value
    */
   public function __set( $name, $value ) {
       $this[ $name ] = $value;
   }

    /**
     * @param string $name
     * @return bool
     */
    public function __isset( $name ) {
        return $this->offsetExists( $name );
    }

    /**
     * @param string $name
     * @return bool
     */
    public function has( $name ) {
        return $this->offsetExists( $name );
    }

    /**
     * @param string $name
     * @return mixed
     */
    public function get( $name ) {
        return $this->offsetGet( $name );
    }

}
```
