public function loadFactories($paths)
    {
        foreach ((array) $paths as $path) {
            $real = realpath($path);

            if (!$real) {
                throw new DirectoryNotFoundException($path);
            }

            if (!is_dir($real)) {
                throw new DirectoryNotFoundException($real);
            }

            $this->loadDirectory($real);
        }

        return $this;
    }