public static function create($paths, $cache = null, $debug = false)
    {
        $wise = new self($debug);

        if ($cache) {
            $wise->setCacheDir($cache);
        }

        $locator = new FileLocator($paths);
        $resolver = new LoaderResolver(
            array(
                new Loader\IniFileLoader($locator),
                new Loader\JsonFileLoader($locator),
                new Loader\PhpFileLoader($locator),
                new Loader\XmlFileLoader($locator),
                new Loader\YamlFileLoader($locator),
            )
        );

        $wise->setCollector(new Resource\ResourceCollector());
        $wise->setLoader(new DelegatingLoader($resolver));

        $resolver->setResourceCollector($wise->getCollector());
        $resolver->setWise($wise);

        return $wise;
    }