public static function getFilePath($path) {
        if (empty($path)) {
            return false;
        }

        if (is_file($path)) {
            return $path;
        }

        if (is_file($result = self::mapPath($path))) {
            return $result;
        }

        if (($result = self::appendPhpExtension($path)) !== false) {
            return self::getFilePath($result);
        }

        return false;
    }