public static function build($file, $searchPath)
    {
        $builder = self::getInstance();

        $searchPath = empty($searchPath) ? __DIR__ : $searchPath;
        $searchPath = (array) $searchPath;

        $builder->setFile($file);
        $builder->readMap();

        foreach ($searchPath as $folder) {
            $files = $builder->getIterator($folder);
            $builder->iterateOverFiles($files);
        }

        $builder->save();
    }