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

Boxzilla – WordPress Popup Builder, version 3.2.18. 55 lines.

- Page: https://pluginprobe.com/plugins/boxzilla/3.2.18/code/src/di/class-container-with-property-access.php
- Raw: https://pluginprobe.com/plugins/boxzilla/3.2.18/raw/src/di/class-container-with-property-access.php
- Modified: 2019-11-15T10:39:14+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.2.18/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 );
	}
}

```
