public function getFactory()
{
if (!$this->started) {
throw new LogicException('Puli was not started');
}
if (!$this->factory && $this->context instanceof ProjectContext) {
$this->factory = $this->getFactoryManager()->createFactory();
}
return $this->factory;
}