本文整理汇总了PHP中Illuminate\View\Factory::getShared方法的典型用法代码示例。如果您正苦于以下问题:PHP Factory::getShared方法的具体用法?PHP Factory::getShared怎么用?PHP Factory::getShared使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\View\Factory
的用法示例。
在下文中一共展示了Factory::getShared方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: string
/**
* Compile from string.
*
* @param string $str
* @param array $args
* @param string $type
* @return Theme
*/
public function string($str, $args = array(), $type = 'blade')
{
$shared = $this->view->getShared();
$data['errors'] = $shared['errors'];
$args = array_merge($data, $args);
return $this->of($str, $args, $type);
}
示例2: gatherData
/**
* Get the data bound to the view instance.
*
* @return array
*/
protected function gatherData()
{
$data = array_merge($this->factory->getShared(), $this->data);
foreach ($data as $key => $value) {
if ($value instanceof Renderable) {
$data[$key] = $value->render();
}
}
return $data;
}
示例3: getShared
/**
* Get all of the shared data for the environment.
*
* @return array
* @static
*/
public static function getShared()
{
return \Illuminate\View\Factory::getShared();
}