Update Slim Framework to Version 2.5.0.
This commit is contained in:
parent
c1440198b0
commit
ea8baa3d95
@ -89,7 +89,7 @@ class PrettyExceptions extends \Slim\Middleware
|
|||||||
$message = $exception->getMessage();
|
$message = $exception->getMessage();
|
||||||
$file = $exception->getFile();
|
$file = $exception->getFile();
|
||||||
$line = $exception->getLine();
|
$line = $exception->getLine();
|
||||||
$trace = str_replace(array('#', '\n'), array('<div>#', '</div>'), $exception->getTraceAsString());
|
$trace = str_replace(array('#', "\n"), array('<div>#', '</div>'), $exception->getTraceAsString());
|
||||||
$html = sprintf('<h1>%s</h1>', $title);
|
$html = sprintf('<h1>%s</h1>', $title);
|
||||||
$html .= '<p>The application could not run because of the following error:</p>';
|
$html .= '<p>The application could not run because of the following error:</p>';
|
||||||
$html .= '<h2>Details</h2>';
|
$html .= '<h2>Details</h2>';
|
||||||
|
@ -288,6 +288,9 @@ class Route
|
|||||||
public function appendHttpMethods()
|
public function appendHttpMethods()
|
||||||
{
|
{
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
|
if(count($args) && is_array($args[0])){
|
||||||
|
$args = $args[0];
|
||||||
|
}
|
||||||
$this->methods = array_merge($this->methods, $args);
|
$this->methods = array_merge($this->methods, $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -298,6 +301,9 @@ class Route
|
|||||||
public function via()
|
public function via()
|
||||||
{
|
{
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
|
if(count($args) && is_array($args[0])){
|
||||||
|
$args = $args[0];
|
||||||
|
}
|
||||||
$this->methods = array_merge($this->methods, $args);
|
$this->methods = array_merge($this->methods, $args);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -1099,6 +1099,18 @@ class Slim
|
|||||||
$this->response->redirect($url, $status);
|
$this->response->redirect($url, $status);
|
||||||
$this->halt($status);
|
$this->halt($status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RedirectTo
|
||||||
|
*
|
||||||
|
* Redirects to a specific named route
|
||||||
|
*
|
||||||
|
* @param string $route The route name
|
||||||
|
* @param array $params Associative array of URL parameters and replacement values
|
||||||
|
*/
|
||||||
|
public function redirectTo($route, $params = array(), $status = 302){
|
||||||
|
$this->redirect($this->urlFor($route, $params), $status);
|
||||||
|
}
|
||||||
|
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Flash Messages
|
* Flash Messages
|
||||||
|
@ -108,7 +108,7 @@ class View
|
|||||||
* @param string $key
|
* @param string $key
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
*/
|
*/
|
||||||
public function keep($key, Closure $value)
|
public function keep($key, \Closure $value)
|
||||||
{
|
{
|
||||||
$this->data->keep($key, $value);
|
$this->data->keep($key, $value);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user