Created
April 19, 2009 19:15
-
-
Save colinmollenhour/98178 to your computer and use it in GitHub Desktop.
This file contains 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
class Kohana extends Kohana_Core { | |
// Se the active component in the Router | |
public static $component; | |
/** | |
* A wrapper for Kohana::find_file, this is to be used where the component path should be searched first | |
*/ | |
public static function find_file($directory, $filename, $required = FALSE, $ext = FALSE) | |
{ | |
$file = FALSE; | |
if(self::$component) | |
{ | |
$file = parent::find_file(self::$component.'/'.$directory, $filename, FALSE, $ext); | |
} | |
if( ! $file) | |
{ | |
$file = parent::find_file($directory, $filename, $required, $ext); | |
} | |
return $file; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment