本文整理汇总了PHP中Magento\Setup\Model\ObjectManagerProvider类的典型用法代码示例。如果您正苦于以下问题:PHP ObjectManagerProvider类的具体用法?PHP ObjectManagerProvider怎么用?PHP ObjectManagerProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ObjectManagerProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @param MagentoComposerApplicationFactory $applicationFactory
* @param \Magento\Framework\Filesystem $filesystem
* @param ComposerInformation $composerInformation
* @param ObjectManagerProvider $objectManagerProvider
* @throws \Exception
*/
public function __construct(MagentoComposerApplicationFactory $applicationFactory, Filesystem $filesystem, ComposerInformation $composerInformation, ObjectManagerProvider $objectManagerProvider)
{
$this->application = $applicationFactory->create();
$this->directory = $filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
$this->objectManager = $objectManagerProvider->get();
$this->composerInformation = $composerInformation;
}
示例2: __construct
/**
* Constructor
*
* @param ObjectManagerProvider $objectManagerProvider
* @param \Magento\Framework\Composer\Remove $remove
* @param UninstallCollector $collector
* @param \Magento\Setup\Module\SetupFactory $setupFactory
*/
public function __construct(ObjectManagerProvider $objectManagerProvider, \Magento\Framework\Composer\Remove $remove, UninstallCollector $collector, \Magento\Setup\Module\SetupFactory $setupFactory)
{
$this->objectManager = $objectManagerProvider->get();
$this->remove = $remove;
$this->collector = $collector;
$this->setupFactory = $setupFactory;
}
示例3: __construct
/**
* Constructor
*
* @param ObjectManagerProvider $objectManagerProvider
* @param WebLogger $logger
* @param DirectoryList $directoryList
* @param Filesystem $fileSystem
*/
public function __construct(ObjectManagerProvider $objectManagerProvider, WebLogger $logger, DirectoryList $directoryList, Filesystem $fileSystem)
{
$objectManager = $objectManagerProvider->get();
$this->backupHandler = $objectManager->create('Magento\\Framework\\Setup\\BackupRollback', ['log' => $logger]);
$this->directoryList = $directoryList;
$this->fileSystem = $fileSystem;
}
示例4: __construct
/**
* Inject dependencies
*
* @param InstallerFactory $installerFactory
* @param DeploymentConfig $deploymentConfig
* @param ObjectManagerProvider $objectManagerProvider
*/
public function __construct(InstallerFactory $installerFactory, DeploymentConfig $deploymentConfig, ObjectManagerProvider $objectManagerProvider)
{
$this->installerFactory = $installerFactory;
$this->deploymentConfig = $deploymentConfig;
$this->objectManager = $objectManagerProvider->get();
parent::__construct();
}
示例5: __construct
/**
* Constructor
*
* @param \Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider
* @param \Symfony\Component\Console\Output\OutputInterface $output
* @param \Magento\Setup\Model\Cron\Status $status
* @param array $name
* @param array $params
*/
public function __construct(\Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider, \Symfony\Component\Console\Output\OutputInterface $output, \Magento\Setup\Model\Cron\Status $status, $name, $params = [])
{
$this->cleanupFiles = $objectManagerProvider->get()->get('Magento\\Framework\\App\\State\\CleanupFiles');
$this->cache = $objectManagerProvider->get()->get('Magento\\Framework\\App\\Cache');
$this->output = $output;
$this->status = $status;
parent::__construct($output, $status, $objectManagerProvider, $name, $params);
}
示例6: __construct
/**
* Constructor
*
* @param ObjectManagerProvider $objectManagerProvider
* @param MaintenanceMode $maintenanceMode
* @param DeploymentConfig $deploymentConfig
*/
public function __construct(ObjectManagerProvider $objectManagerProvider, MaintenanceMode $maintenanceMode, DeploymentConfig $deploymentConfig)
{
$this->objectManager = $objectManagerProvider->get();
$this->maintenanceMode = $maintenanceMode;
$this->backupRollbackFactory = $this->objectManager->get('Magento\\Framework\\Setup\\BackupRollbackFactory');
$this->deploymentConfig = $deploymentConfig;
parent::__construct();
}
示例7: __construct
/**
* Constructor
*
* @param \Magento\Framework\Composer\ComposerInformation $composerInformation
* @param Helper\ModuleUninstall $moduleUninstall
* @param Helper\ThemeUninstall $themeUninstall
* @param \Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider
* @param \Symfony\Component\Console\Output\OutputInterface $output
* @param \Magento\Setup\Model\Cron\Queue $queue
* @param \Magento\Setup\Model\Cron\Status $status
* @param \Magento\Setup\Model\Updater $updater
* @param string $name
* @param array $params
*/
public function __construct(\Magento\Framework\Composer\ComposerInformation $composerInformation, Helper\ModuleUninstall $moduleUninstall, Helper\ThemeUninstall $themeUninstall, \Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider, \Symfony\Component\Console\Output\OutputInterface $output, \Magento\Setup\Model\Cron\Queue $queue, \Magento\Setup\Model\Cron\Status $status, \Magento\Setup\Model\Updater $updater, $name, $params = [])
{
$this->composerInformation = $composerInformation;
$this->moduleUninstall = $moduleUninstall;
$this->themeUninstall = $themeUninstall;
$this->objectManager = $objectManagerProvider->get();
$this->updater = $updater;
$this->queue = $queue;
parent::__construct($output, $status, $objectManagerProvider, $name, $params);
}
示例8: __construct
/**
* Constructor
*
* @param ModuleLoader $moduleLoader
* @param DeploymentConfig $deploymentConfig
* @param ObjectManagerProvider $objectManagerProvider
*/
public function __construct(ModuleLoader $moduleLoader, DeploymentConfig $deploymentConfig, ObjectManagerProvider $objectManagerProvider)
{
$this->allModules = $moduleLoader->load();
foreach (array_keys($this->allModules) as $module) {
$this->allModules[$module]['selected'] = true;
$this->allModules[$module]['disabled'] = true;
}
$this->deploymentConfig = $deploymentConfig;
$this->dependencyChecker = $objectManagerProvider->get()->get('Magento\\Framework\\Module\\DependencyChecker');
}
示例9: __construct
/**
* @param \Magento\Framework\Composer\ComposerInformation $composerInformation
* @param \Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider
* @param \Magento\Setup\Model\ConnectManager $connectManager
* @param \Magento\Setup\Model\UpdatePackagesCache $updatePackagesCache
*/
public function __construct(\Magento\Framework\Composer\ComposerInformation $composerInformation, \Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider, \Magento\Setup\Model\UpdatePackagesCache $updatePackagesCache, \Magento\Setup\Model\ConnectManager $connectManager)
{
$this->composerInformation = $composerInformation;
$objectManager = $objectManagerProvider->get();
$this->enabledModuleList = $objectManager->get('Magento\\Framework\\Module\\ModuleList');
$this->fullModuleList = $objectManager->get('Magento\\Framework\\Module\\FullModuleList');
$this->packageInfo = $objectManager->get('Magento\\Framework\\Module\\PackageInfoFactory')->create();
$this->connectManager = $connectManager;
$this->updatePackagesCache = $updatePackagesCache;
}
示例10: setUp
public function setUp()
{
$this->moduleLoader = $this->getMock('Magento\\Framework\\Module\\ModuleList\\Loader', [], [], '', false);
$this->dependencyChecker = $this->getMock('Magento\\Framework\\Module\\DependencyChecker', [], [], '', false);
$this->deploymentConfig = $this->getMock('Magento\\Framework\\App\\DeploymentConfig', [], [], '', false);
$this->objectManager = $this->getMockForAbstractClass('Magento\\Framework\\ObjectManagerInterface');
$this->objectManagerProvider = $this->getMock('Magento\\Setup\\Model\\ObjectManagerProvider', [], [], '', false);
$this->objectManagerProvider->expects($this->once())->method('get')->willReturn($this->objectManager);
$this->objectManager->expects($this->once())->method('get')->willReturn($this->dependencyChecker);
}
示例11: setup
public function setup()
{
$this->backupRollbackFactory = $this->getMock('Magento\\Framework\\Setup\\BackupRollbackFactory', [], [], '', false);
$this->backupRollback = $this->getMock('\\Magento\\Framework\\Setup\\BackupRollback', [], [], '', false);
$this->status = $this->getMock('Magento\\Setup\\Model\\Cron\\Status', [], [], '', false);
$output = $this->getMockForAbstractClass('Symfony\\Component\\Console\\Output\\OutputInterface', [], '', false);
$this->objectManagerProvider = $this->getMock('Magento\\Setup\\Model\\ObjectManagerProvider', [], [], '', false);
$objectManager = $this->getMockForAbstractClass('Magento\\Framework\\ObjectManagerInterface', [], '', false);
$this->objectManagerProvider->expects($this->once())->method('get')->willReturn($objectManager);
$this->jobDbRollback = new JobDbRollback($this->backupRollbackFactory, $output, $this->status, $this->objectManagerProvider, 'setup:rollback', ['backup_file_name' => 'someFileName']);
}
示例12: __construct
/**
* Constructor
*
* @param DeploymentConfig $deploymentConfig
* @param DirectoryList $directoryList
* @param Manager $taskManager
* @param ObjectManagerProvider $objectManagerProvider
* @param Filesystem $filesystem
* @param DriverInterface $fileDriver
* @param \Magento\Framework\Component\ComponentRegistrar $componentRegistrar
*/
public function __construct(DeploymentConfig $deploymentConfig, DirectoryList $directoryList, Manager $taskManager, ObjectManagerProvider $objectManagerProvider, Filesystem $filesystem, DriverInterface $fileDriver, ComponentRegistrar $componentRegistrar)
{
$this->deploymentConfig = $deploymentConfig;
$this->directoryList = $directoryList;
$this->objectManager = $objectManagerProvider->get();
$this->taskManager = $taskManager;
$this->filesystem = $filesystem;
$this->fileDriver = $fileDriver;
$this->componentRegistrar = $componentRegistrar;
parent::__construct();
}
示例13: setUp
protected function setUp()
{
$this->objectManagerProvider = $this->getMock('Magento\\Setup\\Model\\ObjectManagerProvider', [], [], '', false);
$objectManager = $this->getMockForAbstractClass('Magento\\Framework\\ObjectManagerInterface');
$this->objectManagerProvider->expects($this->any())->method('get')->will($this->returnValue($objectManager));
$this->status = $this->getMock('Magento\\Framework\\Module\\Status', [], [], '', false);
$this->cache = $this->getMock('Magento\\Framework\\App\\Cache', [], [], '', false);
$this->cleanupFiles = $this->getMock('Magento\\Framework\\App\\State\\CleanupFiles', [], [], '', false);
$this->fullModuleList = $this->getMock('Magento\\Framework\\Module\\FullModuleList', [], [], '', false);
$objectManager->expects($this->any())->method('get')->will($this->returnValueMap([['Magento\\Framework\\Module\\Status', $this->status], ['Magento\\Framework\\App\\Cache', $this->cache], ['Magento\\Framework\\App\\State\\CleanupFiles', $this->cleanupFiles], ['Magento\\Framework\\Module\\FullModuleList', $this->fullModuleList]]));
}
示例14: testCreate
public function testCreate()
{
$this->objectManagerProvider->expects($this->once())->method('get')->willReturn($this->objectManager);
$this->objectManager->expects($this->once())->method('get')->with('Magento\\Theme\\Model\\Theme\\ThemeDependencyChecker');
$this->themeDependencyCheckerFactory = new ThemeDependencyCheckerFactory($this->objectManagerProvider);
$this->themeDependencyCheckerFactory->create();
}
示例15: testGet
public function testGet()
{
$this->locator->expects($this->once())->method('get')->with(InitParamListener::BOOTSTRAP_PARAM)->willReturn([]);
$objectManager = $this->object->get();
$this->assertInstanceOf('Magento\\Framework\\ObjectManagerInterface', $objectManager);
$this->assertSame($objectManager, $this->object->get());
}