Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updating for kohana 3.0

  • Loading branch information...
commit af9e1c703a6f7e5e019e8e6d687e793f9c0d58f3 1 parent 10bc85f
@jheathco authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 classes/controller/twig.php
View
12 classes/controller/twig.php
@@ -22,7 +22,7 @@
*/
public $context;
- public function __construct(Request $request, Response $response)
+ public function __construct(Request $request)
{
// Setup the Twig loader environment
$this->twig = Kohana_Twig::instance();
@@ -39,15 +39,15 @@ public function __construct(Request $request, Response $response)
}
// Auto-generate template filename ('index' method called on Controller_Admin_Users looks for 'admin/users/index')
- $this->template = $request->controller().'/'.$request->action().Kohana_Twig::$config->suffix;
+ $this->template = $request->controller.'/'.$request->action.Kohana_Twig::$config->suffix;
- if ($request->directory())
+ if ($request->directory)
{
// Preprend directory if needed
- $this->template = $request->directory().'/'.$this->template;
+ $this->template = $request->directory.'/'.$this->template;
}
- parent::__construct($request, $response);
+ parent::__construct($request);
}
public function after()
@@ -55,7 +55,7 @@ public function after()
if ($this->auto_render)
{
// Auto-render the template
- $this->response->body($this->twig->loadTemplate($this->template)->render((array) $this->context));
+ $this->request->response = $this->twig->loadTemplate($this->template)->render((array) $this->context);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.