Exemplo n.º 1
0
 /**
  * Class constructor.
  *
  * Method retrieves and initializes extension XML parser instance
  * @throws \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException
  */
 public function __construct()
 {
     // @todo catch parser exception
     $this->parser = \TYPO3\CMS\Extensionmanager\Utility\Parser\XmlParserFactory::getParserInstance('mirror');
     if (is_object($this->parser)) {
         $this->parser->attach($this);
     } else {
         throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(get_class($this) . ': No XML parser available.', 1476108687);
     }
 }
Exemplo n.º 2
0
 /**
  * Class constructor.
  *
  * Method retrieves and initializes extension XML parser instance.
  *
  * @throws \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException
  */
 public function __construct()
 {
     /** @var $objectManager \TYPO3\CMS\Extbase\Object\ObjectManager */
     $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
     $this->repositoryRepository = $this->objectManager->get(\TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository::class);
     $this->extensionRepository = $this->objectManager->get(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::class);
     $this->extensionModel = $this->objectManager->get(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
     // @todo catch parser exception
     $this->parser = \TYPO3\CMS\Extensionmanager\Utility\Parser\XmlParserFactory::getParserInstance('extension');
     if (is_object($this->parser)) {
         $this->parser->attach($this);
     } else {
         throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(get_class($this) . ': No XML parser available.');
     }
 }