Created
September 12, 2011 12:17
-
-
Save chardcastle/1211130 to your computer and use it in GitHub Desktop.
Kohana 1.3.1 useful snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get current controller | |
Request::current()->controller(); | |
// Throw errors | |
throw new Http_Exception_404('File not found!'); | |
throw new Http_Exception_500('Server tantrum'); | |
// Last query | |
ORM::factory([MODEL_NAME])->last_query(); | |
// Redirect | |
$this->request->redirect('foo/bar'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment