public function __construct(AbstractConfiguration $configuration)
 {
     $this->configuration = $configuration;
     $this->configuration->apply($this);
     $this->userInfo = new UserInfo();
     $this->arrayCache = new ArrayCache();
 }
 public function apply(AbstractConnection $connection)
 {
     parent::apply($connection);
     $finder = new Finder();
     $uri = 'file://' . $this->getContentArchiveFolder() . '/cmdl';
     $finder->in($uri)->depth(0);
     /** @var SplFileInfo $file */
     foreach ($finder->files('*.cmdl') as $file) {
         $contentTypeName = $file->getBasename('.cmdl');
         $this->contentTypes[$contentTypeName] = [];
     }
     $finder = new Finder();
     $uri = 'file://' . $this->getContentArchiveFolder() . '/cmdl/config';
     if (file_exists($uri)) {
         $finder->in($uri)->depth(0);
         /** @var SplFileInfo $file */
         foreach ($finder->files('*.cmdl') as $file) {
             $configTypeName = $file->getBasename('.cmdl');
             $this->configTypes[$configTypeName] = [];
         }
     }
 }
 public function apply(AbstractConnection $connection)
 {
     parent::apply($connection);
     $connection->setDatabase($this->getDatabase());
 }