Basic layout and login functioning
This commit is contained in:
31
application/classes/PLA/Exception.php
Normal file
31
application/classes/PLA/Exception.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class extends the core Kohana exception handling
|
||||
*
|
||||
* @package PLA
|
||||
* @category Exceptions
|
||||
* @author Deon George
|
||||
* @copyright (c) phpLDAPadmin Development Team
|
||||
* @license http://dev.phpldapadmin.org/license.html
|
||||
*/
|
||||
class PLA_Exception extends Kohana_Exception {
|
||||
public function __construct($message, array $variables = NULL, $code = 0) {
|
||||
parent::__construct($message,$variables,$code);
|
||||
|
||||
switch ($code) {
|
||||
case '400':
|
||||
SystemMessage::add('warn',$message);
|
||||
Request::current()->redirect('login');
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
echo debug::vars(array('m'=>$message,'v'=>$variables,'c'=>$code,'t'=>$this));die();
|
||||
}
|
||||
|
||||
public function __toString() {
|
||||
echo __METHOD__;die();
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user