/** * **Make a new View.** * * Note: __This method is used internally to make views.__ * * The purpose for this is to allow making changes to the View * object before rendering. ie: * * $view = app('blade.view')->makeView('test',['data'=>'some data']); * $view->nest('key','view',['test' => 'test data']); * return $view->render(); * * @param $view * @param array $data * * @return View */ public function makeView($view, array $data) { $data = parent::collectScope($data); return $this->context->factory()->make($view, $data); }
/** * @param string $name * @param mixed $value * * @return AbstractView|static */ public function with($name, $value) : AbstractView { $this->scope->merge([$name => $value]); return $this; }
/** * GlobalScope constructor. * * @param FactoryInterface $factory Requires the AppFactory for access to the environment. */ public function __construct(FactoryInterface $factory = NULL) { parent::__construct($factory ? $factory::getEnvironment() : ['developing' => env('APP_ENV', 'PRODUCTION') !== 'PRODUCTION', 'app_key' => env('APP_KEY', '[set me]'), 'debugging' => env('DEBUG', FALSE), 'testing' => env('TESTING', FALSE)]); }
/** * BladeScope constructor. * * @param array $twig_settings */ public function __construct($twig_settings) { parent::__construct($twig_settings); }
/** * BladeScope constructor. * * @param array $context_settings - */ public function __construct($context_settings) { parent::__construct($context_settings); }