if ($this->files->exists($viewPath = $path.'/'.$file))
{
return $viewPath;
}
}
}
throw new \InvalidArgumentException("View [$name] not found.");
}
if (isset($this->views[$name])) return $this->views[$name];
if (strpos($name, '::') !== false)
{
return $this->views[$name] = $this->findNamedPathView($name);
}
return $this->views[$name] = $this->findInPaths($name, $this->paths);
}
* @param string $view
* @param array $data
* @param array $mergeData
* @return \Illuminate\View\View
*/
public function make($view, $data = array(), $mergeData = array())
{
$path = $this->finder->find($view);
$data = array_merge($mergeData, $this->parseData($data));
case 0:
return $instance->$method();
case 1:
return $instance->$method($args[0]);
case 2:
return $instance->$method($args[0], $args[1]);
case 3:
else{
$data['related_videos'] = array();
}
View::share('active_parent', $active_parent);
$this->layout->content = View::make($view_path, $data);
}
else{
$data['related_videos'] = array();
}
View::share('active_parent', $active_parent);
$this->layout->content = View::make($view_path, $data);
}
*
* @param string $method
* @param array $parameters
* @return mixed
*/
protected function callMethod($method, $parameters)
{
return call_user_func_array(array($this, $method), $parameters);
}
// after filters on the controller to wrap up any last minute processing.
$response = $this->callBeforeFilters($router, $method);
$this->setupLayout();
if (is_null($response))
{
$response = $this->callMethod($method, $parameters);
}
// We will extract the passed in parameters off of the route object so we will
// pass them off to the controller method as arguments. We will not get the
// defaults so that the controllers will be able to use its own defaults.
$args = array_values($route->getParametersWithoutDefaults());
$instance = $ioc->make($controller);
return $instance->callAction($ioc, $me, $method, $args);
};
}
*
* @return mixed
*/
protected function callCallable()
{
$variables = array_values($this->getParametersWithoutDefaults());
return call_user_func_array($this->getOption('_call'), $variables);
}
// We will only call the router callable if no "before" middlewares returned
// a response. If they do, we will consider that the response to requests
// so that the request "lifecycle" will be easily halted for filtering.
$response = $this->callBeforeFilters($request);
if ( ! isset($response))
{
$response = $this->callCallable();
}
// Once we have the route, we can just run it to get the responses, which will
// always be instances of the Response class. Once we have the responses we
// will execute the global "after" middlewares to finish off the request.
else
{
$this->currentRoute = $route = $this->findRoute($request);
$response = $route->run($request);
}
if ($this->isDownForMaintenance())
{
$response = $this['events']->until('illuminate.app.down');
if ( ! is_null($response)) return $this->prepareResponse($response, $request);
}
return $this['router']->dispatch($this->prepareRequest($request));
}
/**
* Handles the given request and delivers the response.
*
* @return void
*/
public function run()
{
$response = $this->dispatch($this['request']);
$this['router']->callCloseFilter($this['request'], $response);
| and wonderful applications we have created for them.
|
*/
$app->run();