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;
    }
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;
    }
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 ; }
Creates a pre-configured instance of Wise.

@param array|string $paths The configuration directory path(s).
@param string       $cache The cache directory path.
@param boolean      $debug Enable debugging?

@return Wise The instance.
Creates a pre - configured instance of Wise .