Container.php 262 Bytes
Newer Older
Avris's avatar
Avris committed
1 2 3 4 5 6
<?php
namespace Picco;class Container{
protected $s=[],$r=[];
function __set($n,$v){$this->s[$n]=$v;}
function __get($n){return isset($this->r[$n])?$this->r[$n]:$this->r[$n]=$this->b($this->s[$n]);}
protected function b($s){return is_callable($s)?$s($this):$s;}}