Gush\Factory\AdapterFactory::getFactoryObject PHP Method

getFactoryObject() private method

private getFactoryObject ( string $name ) : Gush\Factory\IssueTrackerFactory | Gush\Factory\RepositoryManagerFactory
$name string
return Gush\Factory\IssueTrackerFactory | Gush\Factory\RepositoryManagerFactory
    private function getFactoryObject($name)
    {
        if (!isset($this->adapters[$name])) {
            throw new \InvalidArgumentException(sprintf('No Adapter with name "%s" is registered.', $name));
        }
        if (!is_object($this->adapters[$name]['factory'])) {
            $factory = $this->adapters[$name]['factory'];
            $this->adapters[$name]['factory'] = new $factory();
        }
        return $this->adapters[$name]['factory'];
    }