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

Boxzilla – WordPress Popup Builder, version 3.4.11. 59 lines.

- Page: https://pluginprobe.com/plugins/boxzilla/3.4.11/code/src/di/class-container-with-property-access.php
- Raw: https://pluginprobe.com/plugins/boxzilla/3.4.11/raw/src/di/class-container-with-property-access.php
- Modified: 2025-03-24T08:35: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.4.11/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);
    }
}

```
