/** * Construct a compatible environment for Blade template rendering by * connecting to COGS resources and the illuminate/container/container. * * @param array|NULL $settings */ public function __construct(array $settings = NULL) { # settings are located in the `config/views.php` configuration file. $this->settings = $settings ? $settings : $this->forge->get('config')['views.blade']; # construct with decorated settings parent::__construct($this->settings); # assign the blade symbol collection from the global context /** @var Context $global_context */ $global_context = $this->forge->get('context'); $this->storage = $global_context->copy(); # obtain the core template paths from `view.blade.template_paths` settings $this->template_paths = $this->settings['template_paths']; # Illuminate View requires an illuminate container. # note that forge->service serves as a controlled gateway to # the encapsulated illuminate/container/container. $this->illuminate_container = $this->forge->container(); # assign the COGS illuminate-compatible event handler to BladeView $this->events = $this->forge->get('events'); # construct the blade factory and register classes $this->build_blade_factory(); }
/** * View constructor. */ public function __construct() { parent::__construct(); }