protected final function getPath($filename)
{
$reflector = new ReflectionObject($this);
$paths = array(dirname($reflector->getFileName()) . '/' . (string) $filename, dirname(__FILE__) . '/' . (string) $filename);
foreach ($paths as $path) {
if (file_exists($path)) {
return $path;
}
}
return NULL;
}