Skip to content

Commit

Permalink
Do not include the template name in Kostache::factory, do all templat…
Browse files Browse the repository at this point in the history
…e detection in __construct, fixes #22
  • Loading branch information
shadowhand committed Apr 2, 2011
1 parent 2d8b2c2 commit d2eadd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions classes/kohana/kostache.php
Expand Up @@ -23,9 +23,9 @@ abstract class Kohana_Kostache {
* @return Kostache
* @throws Kohana_Exception if the view class does not exist
*/
public static function factory($template, array $partials = NULL)
public static function factory($path, array $partials = NULL)
{
$class = 'View_'.str_replace('/', '_', $template);
$class = 'View_'.str_replace('/', '_', $path);

if ( ! class_exists($class))
{
Expand All @@ -34,7 +34,7 @@ public static function factory($template, array $partials = NULL)
));
}

return new $class($template, $partials);
return new $class(NULL, $partials);
}

/**
Expand Down

0 comments on commit d2eadd3

Please sign in to comment.