Puli\Manager\Api\Container::getDiscoveryManager PHP 메소드

getDiscoveryManager() 공개 메소드

Returns the resource discovery manager.
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;
    }

Usage Example

예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function clearDiscovery()
 {
     $this->puli->getDiscoveryManager()->clearDiscovery();
 }