• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Model\ObjectManagerProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Magento\Setup\Model\ObjectManagerProvider的典型用法代码示例。如果您正苦于以下问题:PHP ObjectManagerProvider类的具体用法?PHP ObjectManagerProvider怎么用?PHP ObjectManagerProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ObjectManagerProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: __construct

 /**
  * @param \Magento\Framework\Composer\ComposerInformation $composerInformation
  * @param \Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider
  * @param \Magento\Setup\Model\MarketplaceManager $marketplaceManager
  * @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\MarketplaceManager $marketplaceManager)
 {
     $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->marketplaceManager = $marketplaceManager;
     $this->updatePackagesCache = $updatePackagesCache;
     $this->timezone = $objectManager->get('Magento\\Framework\\Stdlib\\DateTime\\TimezoneInterface');
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:17,代码来源:ComponentGrid.php


示例15: setUp

 public function setUp()
 {
     $this->serviceLocatorMock = $this->getMockForAbstractClass('Zend\\ServiceManager\\ServiceLocatorInterface', ['get']);
     $deploymentConfig = $this->getMock('Magento\\Framework\\App\\DeploymentConfig', [], [], '', false);
     $deploymentConfig->expects($this->once())->method('isAvailable')->willReturn(false);
     $objectManager = $this->getMock('Magento\\Framework\\ObjectManagerInterface', [], [], '', false);
     $objectManager->expects($this->once())->method('get')->willReturn($deploymentConfig);
     $this->objectManagerProvider = $this->getMock('Magento\\Setup\\Model\\ObjectManagerProvider', [], [], '', false);
     $this->objectManagerProvider->expects($this->once())->method('get')->willReturn($objectManager);
     $this->serviceLocatorMock->expects($this->exactly(2))->method('get')->with('config')->will($this->returnValue(['navInstallerTitles' => ['install' => 'SomeTitle'], 'navInstaller' => [['key1' => 'value1'], ['key2' => 'value2'], ['nav' => 'abc', 'key3' => 'value3'], ['nav' => ''], ['nav' => false], ['main' => 'abc', 'key3' => 'value3'], ['main' => ''], ['main' => false]]]));
     $this->navigation = new Navigation($this->serviceLocatorMock, $this->objectManagerProvider);
 }
开发者ID:whoople,项目名称:magento2-testing,代码行数:12,代码来源:NavigationTest.php


示例16: __construct

 /**
  * @param ServiceLocatorInterface $serviceLocator
  * @param ObjectManagerProvider $objectManagerProvider
  */
 public function __construct(ServiceLocatorInterface $serviceLocator, ObjectManagerProvider $objectManagerProvider)
 {
     $objectManager = $objectManagerProvider->get();
     if ($objectManager->get('Magento\\Framework\\App\\DeploymentConfig')->isAvailable()) {
         $this->navStates = $serviceLocator->get('config')[self::NAV_UPDATER];
         $this->navType = self::NAV_UPDATER;
         $this->titles = $serviceLocator->get('config')[self::NAV_UPDATER . 'Titles'];
     } else {
         $this->navStates = $serviceLocator->get('config')[self::NAV_INSTALLER];
         $this->navType = self::NAV_INSTALLER;
         $this->titles = $serviceLocator->get('config')[self::NAV_INSTALLER . 'Titles'];
     }
 }
开发者ID:whoople,项目名称:magento2-testing,代码行数:17,代码来源:Navigation.php


示例17: setUp

 protected function setUp()
 {
     $this->objectManagerProviderMock = $this->getMock('Magento\\Setup\\Model\\ObjectManagerProvider', [], [], '', false);
     $objectManager = $this->getMockForAbstractClass('Magento\\Framework\\ObjectManagerInterface');
     $this->objectManagerProviderMock->expects($this->any())->method('get')->will($this->returnValue($objectManager));
     $this->statusMock = $this->getMock('Magento\\Framework\\Module\\Status', [], [], '', false);
     $this->cacheMock = $this->getMock('Magento\\Framework\\App\\Cache', [], [], '', false);
     $this->cleanupFilesMock = $this->getMock('Magento\\Framework\\App\\State\\CleanupFiles', [], [], '', false);
     $this->fullModuleListMock = $this->getMock('Magento\\Framework\\Module\\FullModuleList', [], [], '', false);
     $this->deploymentConfigMock = $this->getMock(\Magento\Framework\App\DeploymentConfig::class, [], [], '', false);
     $this->generatedFiles = $this->getMock('\\Magento\\Framework\\Code\\GeneratedFiles', [], [], '', false);
     $objectManager->expects($this->any())->method('get')->will($this->returnValueMap([['Magento\\Framework\\Module\\Status', $this->statusMock], ['Magento\\Framework\\App\\Cache', $this->cacheMock], ['Magento\\Framework\\App\\State\\CleanupFiles', $this->cleanupFilesMock], ['Magento\\Framework\\Module\\FullModuleList', $this->fullModuleListMock]]));
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:13,代码来源:ModuleEnableDisableCommandTest.php


示例18: testIndexAction

 public function testIndexAction()
 {
     $this->objectManager = $this->getMockForAbstractClass('Magento\\Framework\\ObjectManagerInterface');
     $this->objectManagerProvider = $this->getMock('Magento\\Setup\\Model\\ObjectManagerProvider', ['get'], [], '', false);
     $this->deploymentConfig = $this->getMock('Magento\\Framework\\App\\DeploymentConfig', [], [], '', false);
     $this->objectManagerProvider->expects($this->once())->method('get')->willReturn($this->objectManager);
     $this->objectManager->expects($this->once())->method('get')->willReturn($this->deploymentConfig);
     $this->deploymentConfig->expects($this->once())->method('isAvailable')->willReturn(false);
     /** @var $controller Index */
     $controller = new Index($this->objectManagerProvider);
     $viewModel = $controller->indexAction();
     $this->assertInstanceOf('Zend\\View\\Model\\ViewModel', $viewModel);
     $this->assertFalse($viewModel->terminate());
 }
开发者ID:whoople,项目名称:magento2-testing,代码行数:14,代码来源:IndexTest.php


示例19: __construct

 /**
  * Constructor
  *
  * @param DeploymentConfig $deploymentConfig
  * @param DirectoryList $directoryList
  * @param Manager $taskManager
  * @param ObjectManagerProvider $objectManagerProvider
  * @param Filesystem $filesystem
  */
 public function __construct(
     DeploymentConfig $deploymentConfig,
     DirectoryList $directoryList,
     Manager $taskManager,
     ObjectManagerProvider $objectManagerProvider,
     Filesystem $filesystem
 ) {
     $this->deploymentConfig = $deploymentConfig;
     $this->directoryList    = $directoryList;
     $this->objectManager    = $objectManagerProvider->get();
     $this->taskManager      = $taskManager;
     $this->filesystem       = $filesystem;
     parent::__construct();
 }
开发者ID:nja78,项目名称:magento2,代码行数:23,代码来源:DiCompileCommand.php


示例20: 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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Order\ShipmentLoader类代码示例发布时间:2022-05-23
下一篇:
PHP adminhtml\OrderIndex类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap