function app($component = null, $parameters = []) { if (is_null($component)) { return Container::getInstance(); } return Container::getInstance()->make($component, $parameters); }
public function __construct($basePath = null) { parent::__construct(); static::setInstance($this); $this->instance('app', $this); $this->initConfig($basePath); $this->registerBaseComponent(); $this->bootstrap(); }