1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-14 17:14:22 +02:00

refactor(core): add Container to the core #414

This commit is contained in:
Awilum
2020-03-17 15:00:18 +03:00
parent 6791d0796d
commit 98af809758

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
/**
* Flextype (http://flextype.org)
* Founded by Sergey Romanenko and maintained by Flextype Community.
*/
namespace Flextype;
class Container
{
/**
* Flextype Dependency Container
*/
protected $container;
/**
* __construct
*/
public function __construct($container)
{
$this->container = $container;
}
/**
* __get
*/
public function __get($property)
{
if ($this->container->{$property}) {
return $this->container->{$property};
}
}
}