public getDiscoveryManager ( ) : Puli\Manager\Api\Discovery\DiscoveryManager | ||
리턴 | Puli\Manager\Api\Discovery\DiscoveryManager | The discovery manager. |
public function getDiscoveryManager()
{
if (!$this->started) {
throw new LogicException('Puli was not started');
}
if (!$this->discoveryManager && $this->context instanceof ProjectContext) {
$this->discoveryManager = new DiscoveryManagerImpl($this->context, $this->getDiscovery(), $this->getModuleManager()->findModules(Expr::method('isEnabled', Expr::same(true))), $this->getJsonStorage(), $this->logger);
}
return $this->discoveryManager;
}
/** * {@inheritdoc} */ public function clearDiscovery() { $this->puli->getDiscoveryManager()->clearDiscovery(); }