protected function bindCommands(CommandCollection $commands, IContainer $container)
    {
        // Resolve and add each command class
        foreach (self::$commandClasses as $commandClass) {
            $commands->add($container->resolve($commandClass));
        }

        // The command to run Opulence locally requires a path to the router file
        $commands->add(new RunAppLocallyCommand(Config::get('paths', 'root') . '/localhost_router.php'));

        // The flush-cache command requires some special configuration
        try {
            $flushCacheCommand = new FlushFrameworkCacheCommand(
                new FileCache(Config::get('paths', 'tmp.framework.http') . '/cachedBootstrapperRegistry.json'),
                new FileCache(Config::get('paths', 'tmp.framework.console') . '/cachedBootstrapperRegistry.json'),
                $container->resolve(RouteCache::class),
                $container->resolve(ViewCache::class)
            );
            $commands->add($flushCacheCommand);
        } catch (IocException $ex) {
            throw new RuntimeException('Failed to resolve ' . FlushFrameworkCacheCommand::class, 0, $ex);
        }
    }