当前位置: 首页>>代码示例>>PHP>>正文


PHP Model\ObjectManagerProvider类代码示例

本文整理汇总了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;
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:16,代码来源:UpdatePackagesCache.php

示例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;
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:15,代码来源:ModuleUninstaller.php

示例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;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:15,代码来源:BackupActionItems.php

示例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();
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:14,代码来源:InstallStoreConfigurationCommand.php

示例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);
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:17,代码来源:JobStaticRegenerate.php

示例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();
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:15,代码来源:RollbackCommand.php

示例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);
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:24,代码来源:JobComponentUninstall.php

示例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');
 }
开发者ID:opexsw,项目名称:magento2,代码行数:17,代码来源:ModuleStatus.php

示例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;
 }
开发者ID:whoople,项目名称:magento2-testing,代码行数:16,代码来源:ComponentGrid.php

示例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);
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:10,代码来源:ModuleStatusTest.php

示例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']);
 }
开发者ID:whoople,项目名称:magento2-testing,代码行数:11,代码来源:JobDbRollbackTest.php

示例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();
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:22,代码来源:DiCompileCommand.php

示例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]]));
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:11,代码来源:ModuleEnableDisableCommandTest.php

示例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();
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:7,代码来源:ThemeDependencyCheckerFactoryTest.php

示例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());
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:7,代码来源:ObjectManagerProviderTest.php


注:本文中的Magento\Setup\Model\ObjectManagerProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。