BaseList::getPath PHP Method

getPath() final protected method

Get path for file - try in subclass folder, fallback in baseclass folder
final protected getPath ( string $filename ) : string | null
$filename string
return string | null
    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;
    }