/** * __get * decorates \dirp\helper::__get to fetch instance * data on demand, as opposed to using one big array * in the __construct call, which would mean a large * overhead for every loaded file. * * known parameters are mapped to their correct SplFileInfo * method, while everything else works as expected. * * @param string $name * @return mixed */ public function __get($name) { // custom case for this extension's icon: if ($name == 'icon' && parent::__get('icon') === null) { parent::__set('icon', $this->_get_icon()); } elseif (parent::__get($name) === null) { if (isset(static::$_map[$name])) { parent::__set($name, call_user_func(array($this->_instance, static::$_map[$name]))); } } return parent::__get($name); }