Added KH 3.3.0
This commit is contained in:
10
includes/kohana/system/classes/Kohana/HTTP/Exception/300.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/300.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_300 extends HTTP_Exception_Redirect {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 300 Multiple Choices
|
||||
*/
|
||||
protected $_code = 300;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/301.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/301.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_301 extends HTTP_Exception_Redirect {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 301 Moved Permanently
|
||||
*/
|
||||
protected $_code = 301;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/302.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/302.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_302 extends HTTP_Exception_Redirect {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 302 Found
|
||||
*/
|
||||
protected $_code = 302;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/303.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/303.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_303 extends HTTP_Exception_Redirect {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 303 See Other
|
||||
*/
|
||||
protected $_code = 303;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/304.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/304.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_304 extends HTTP_Exception_Expected {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 304 Not Modified
|
||||
*/
|
||||
protected $_code = 304;
|
||||
|
||||
}
|
41
includes/kohana/system/classes/Kohana/HTTP/Exception/305.php
Normal file
41
includes/kohana/system/classes/Kohana/HTTP/Exception/305.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_305 extends HTTP_Exception_Expected {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 305 Use Proxy
|
||||
*/
|
||||
protected $_code = 305;
|
||||
|
||||
/**
|
||||
* Specifies the proxy to replay this request via
|
||||
*
|
||||
* @param string $location URI of the proxy
|
||||
*/
|
||||
public function location($uri = NULL)
|
||||
{
|
||||
if ($uri === NULL)
|
||||
return $this->headers('Location');
|
||||
|
||||
$this->headers('Location', $uri);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate this exception contains everything needed to continue.
|
||||
*
|
||||
* @throws Kohana_Exception
|
||||
* @return bool
|
||||
*/
|
||||
public function check()
|
||||
{
|
||||
if ($location = $this->headers('location') === NULL)
|
||||
throw new Kohana_Exception('A \'location\' must be specified for a redirect');
|
||||
|
||||
if (strpos($location, '://') === FALSE)
|
||||
throw new Kohana_Exception('An absolute URI to the proxy server must be specified');
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/307.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/307.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_307 extends HTTP_Exception_Redirect {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 307 Temporary Redirect
|
||||
*/
|
||||
protected $_code = 307;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/400.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/400.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_400 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 400 Bad Request
|
||||
*/
|
||||
protected $_code = 400;
|
||||
|
||||
}
|
38
includes/kohana/system/classes/Kohana/HTTP/Exception/401.php
Normal file
38
includes/kohana/system/classes/Kohana/HTTP/Exception/401.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_401 extends HTTP_Exception_Expected {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 401 Unauthorized
|
||||
*/
|
||||
protected $_code = 401;
|
||||
|
||||
/**
|
||||
* Specifies the WWW-Authenticate challenge.
|
||||
*
|
||||
* @param string $challenge WWW-Authenticate challenge (eg `Basic realm="Control Panel"`)
|
||||
*/
|
||||
public function authenticate($challenge = NULL)
|
||||
{
|
||||
if ($challenge === NULL)
|
||||
return $this->headers('www-authenticate');
|
||||
|
||||
$this->headers('www-authenticate', $challenge);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate this exception contains everything needed to continue.
|
||||
*
|
||||
* @throws Kohana_Exception
|
||||
* @return bool
|
||||
*/
|
||||
public function check()
|
||||
{
|
||||
if ($this->headers('www-authenticate') === NULL)
|
||||
throw new Kohana_Exception('A \'www-authenticate\' header must be specified for a HTTP 401 Unauthorized');
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/402.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/402.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_402 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 402 Payment Required
|
||||
*/
|
||||
protected $_code = 402;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/403.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/403.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_403 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 403 Forbidden
|
||||
*/
|
||||
protected $_code = 403;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/404.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/404.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_404 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 404 Not Found
|
||||
*/
|
||||
protected $_code = 404;
|
||||
|
||||
}
|
41
includes/kohana/system/classes/Kohana/HTTP/Exception/405.php
Normal file
41
includes/kohana/system/classes/Kohana/HTTP/Exception/405.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_405 extends HTTP_Exception_Expected {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 405 Method Not Allowed
|
||||
*/
|
||||
protected $_code = 405;
|
||||
|
||||
/**
|
||||
* Specifies the list of allowed HTTP methods
|
||||
*
|
||||
* @param array $methods List of allowed methods
|
||||
*/
|
||||
public function allowed($methods)
|
||||
{
|
||||
if (is_array($methods))
|
||||
{
|
||||
$methods = implode(',', $methods);
|
||||
}
|
||||
|
||||
$this->headers('allow', $methods);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate this exception contains everything needed to continue.
|
||||
*
|
||||
* @throws Kohana_Exception
|
||||
* @return bool
|
||||
*/
|
||||
public function check()
|
||||
{
|
||||
if ($location = $this->headers('allow') === NULL)
|
||||
throw new Kohana_Exception('A list of allowed methods must be specified');
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/406.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/406.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_406 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 406 Not Acceptable
|
||||
*/
|
||||
protected $_code = 406;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/407.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/407.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_407 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 407 Proxy Authentication Required
|
||||
*/
|
||||
protected $_code = 407;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/408.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/408.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_408 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 408 Request Timeout
|
||||
*/
|
||||
protected $_code = 408;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/409.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/409.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_409 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 409 Conflict
|
||||
*/
|
||||
protected $_code = 409;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/410.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/410.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_410 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 410 Gone
|
||||
*/
|
||||
protected $_code = 410;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/411.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/411.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_411 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 411 Length Required
|
||||
*/
|
||||
protected $_code = 411;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/412.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/412.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_412 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 412 Precondition Failed
|
||||
*/
|
||||
protected $_code = 412;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/413.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/413.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_413 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 413 Request Entity Too Large
|
||||
*/
|
||||
protected $_code = 413;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/414.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/414.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_414 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 414 Request-URI Too Long
|
||||
*/
|
||||
protected $_code = 414;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/415.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/415.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_415 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 415 Unsupported Media Type
|
||||
*/
|
||||
protected $_code = 415;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/416.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/416.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_416 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 416 Request Range Not Satisfiable
|
||||
*/
|
||||
protected $_code = 416;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/417.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/417.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_417 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 417 Expectation Failed
|
||||
*/
|
||||
protected $_code = 417;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/500.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/500.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_500 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 500 Internal Server Error
|
||||
*/
|
||||
protected $_code = 500;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/501.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/501.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_501 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 501 Not Implemented
|
||||
*/
|
||||
protected $_code = 501;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/502.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/502.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_502 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 502 Bad Gateway
|
||||
*/
|
||||
protected $_code = 502;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/503.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/503.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_503 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 503 Service Unavailable
|
||||
*/
|
||||
protected $_code = 503;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/504.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/504.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_504 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 504 Gateway Timeout
|
||||
*/
|
||||
protected $_code = 504;
|
||||
|
||||
}
|
10
includes/kohana/system/classes/Kohana/HTTP/Exception/505.php
Normal file
10
includes/kohana/system/classes/Kohana/HTTP/Exception/505.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Kohana_HTTP_Exception_505 extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var integer HTTP 505 HTTP Version Not Supported
|
||||
*/
|
||||
protected $_code = 505;
|
||||
|
||||
}
|
@@ -0,0 +1,82 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
/**
|
||||
* "Expected" HTTP exception class. Used for all [HTTP_Exception]'s where a standard
|
||||
* Kohana error page should never be shown.
|
||||
*
|
||||
* Eg [HTTP_Exception_301], [HTTP_Exception_302] etc
|
||||
*
|
||||
* @package Kohana
|
||||
* @category Exceptions
|
||||
* @author Kohana Team
|
||||
* @copyright (c) 2008-2012 Kohana Team
|
||||
* @license http://kohanaframework.org/license
|
||||
*/
|
||||
abstract class Kohana_HTTP_Exception_Expected extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* @var Response Response Object
|
||||
*/
|
||||
protected $_response;
|
||||
|
||||
/**
|
||||
* Creates a new translated exception.
|
||||
*
|
||||
* throw new Kohana_Exception('Something went terrible wrong, :user',
|
||||
* array(':user' => $user));
|
||||
*
|
||||
* @param string $message status message, custom content to display with error
|
||||
* @param array $variables translation variables
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($message = NULL, array $variables = NULL, Exception $previous = NULL)
|
||||
{
|
||||
parent::__construct($message, $variables, $previous);
|
||||
|
||||
// Prepare our response object and set the correct status code.
|
||||
$this->_response = Response::factory()
|
||||
->status($this->_code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets and sets headers to the [Response].
|
||||
*
|
||||
* @see [Response::headers]
|
||||
* @param mixed $key
|
||||
* @param string $value
|
||||
* @return mixed
|
||||
*/
|
||||
public function headers($key = NULL, $value = NULL)
|
||||
{
|
||||
$result = $this->_response->headers($key, $value);
|
||||
|
||||
if ( ! $result instanceof Response)
|
||||
return $result;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate this exception contains everything needed to continue.
|
||||
*
|
||||
* @throws Kohana_Exception
|
||||
* @return bool
|
||||
*/
|
||||
public function check()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a Response for the current Exception
|
||||
*
|
||||
* @uses Kohana_Exception::response()
|
||||
* @return Response
|
||||
*/
|
||||
public function get_response()
|
||||
{
|
||||
$this->check();
|
||||
|
||||
return $this->_response;
|
||||
}
|
||||
|
||||
} // End Kohana_HTTP_Exception
|
@@ -0,0 +1,51 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
/**
|
||||
* Redirect HTTP exception class. Used for all [HTTP_Exception]'s where the status
|
||||
* code indicates a redirect.
|
||||
*
|
||||
* Eg [HTTP_Exception_301], [HTTP_Exception_302] and most of the other 30x's
|
||||
*
|
||||
* @package Kohana
|
||||
* @category Exceptions
|
||||
* @author Kohana Team
|
||||
* @copyright (c) 2008-2012 Kohana Team
|
||||
* @license http://kohanaframework.org/license
|
||||
*/
|
||||
abstract class Kohana_HTTP_Exception_Redirect extends HTTP_Exception_Expected {
|
||||
|
||||
/**
|
||||
* Specifies the URI to redirect to.
|
||||
*
|
||||
* @param string $location URI of the proxy
|
||||
*/
|
||||
public function location($uri = NULL)
|
||||
{
|
||||
if ($uri === NULL)
|
||||
return $this->headers('Location');
|
||||
|
||||
if (strpos($uri, '://') === FALSE)
|
||||
{
|
||||
// Make the URI into a URL
|
||||
$uri = URL::site($uri, TRUE, ! empty(Kohana::$index_file));
|
||||
}
|
||||
|
||||
$this->headers('Location', $uri);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate this exception contains everything needed to continue.
|
||||
*
|
||||
* @throws Kohana_Exception
|
||||
* @return bool
|
||||
*/
|
||||
public function check()
|
||||
{
|
||||
if ($this->headers('location') === NULL)
|
||||
throw new Kohana_Exception('A \'location\' must be specified for a redirect');
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
} // End Kohana_HTTP_Exception_Redirect
|
Reference in New Issue
Block a user