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


PHP Configuration\ConfigurationManager类代码示例

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


在下文中一共展示了ConfigurationManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initializeObject

 /**
  * Called by the Flow object framework after creating the object and resolving all dependencies.
  *
  * @param integer $cause Creation cause
  */
 public function initializeObject($cause)
 {
     if ($cause === \TYPO3\Flow\Object\ObjectManagerInterface::INITIALIZATIONCAUSE_CREATED) {
         $settings = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.TYPO3CR.Search');
         $this->indexName = $settings['elasticSearch']['indexName'];
     }
 }
开发者ID:kdambekalns,项目名称:Flowpack.ElasticSearch.ContentRepositoryAdaptor,代码行数:12,代码来源:ElasticSearchClient.php

示例2: setUp

 public function setUp()
 {
     $this->nodeTypeManager = new NodeTypeManager();
     $this->mockConfigurationManager = $this->getMockBuilder(ConfigurationManager::class)->disableOriginalConstructor()->getMock();
     $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->with('NodeTypes')->will($this->returnValue($this->nodeTypesFixture));
     $this->inject($this->nodeTypeManager, 'configurationManager', $this->mockConfigurationManager);
 }
开发者ID:testbird,项目名称:neos-development-collection,代码行数:7,代码来源:NodeTypeManagerTest.php

示例3: initializeObject

 /**
  * Called by the Flow object framework after creating the object and resolving all dependencies.
  *
  * @param integer $cause Creation cause
  */
 public function initializeObject($cause)
 {
     if ($cause === \TYPO3\Flow\Object\ObjectManagerInterface::INITIALIZATIONCAUSE_CREATED) {
         $settings = $this->configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.TYPO3CR.Search');
         $this->defaultConfigurationPerType = $settings['defaultConfigurationPerType'];
     }
 }
开发者ID:kdambekalns,项目名称:Flowpack.ElasticSearch.ContentRepositoryAdaptor,代码行数:12,代码来源:NodeTypeMappingBuilder.php

示例4: initializeObject

 /**
  * Gets the authentication provider configuration needed
  *
  * @return void
  */
 public function initializeObject()
 {
     $settings = $this->configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.Flow');
     if (isset($settings['security']['authentication']['providers']['Typo3SetupProvider']['providerOptions']['keyName'])) {
         $this->keyName = $settings['security']['authentication']['providers']['Typo3SetupProvider']['providerOptions']['keyName'];
     }
 }
开发者ID:kdambekalns,项目名称:setup,代码行数:12,代码来源:LoginController.php

示例5: getSettings

 /**
  * Get package settings
  */
 public function getSettings()
 {
     if (!is_array($this->settings)) {
         $this->settings = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Ttree.JobButler');
     }
     return $this->settings;
 }
开发者ID:johannessteu,项目名称:JobButler,代码行数:10,代码来源:AbstractJobConfiguration.php

示例6: setUp

 public function setUp($nodeTypesFixture = NULL)
 {
     if ($nodeTypesFixture === NULL) {
         $nodeTypesFixture = $this->nodeTypesFixture;
     }
     $this->configurationManager = $this->getMockBuilder('TYPO3\\Flow\\Configuration\\ConfigurationManager')->disableOriginalConstructor()->getMock();
     $this->configurationManager->expects($this->any())->method('getConfiguration')->with('NodeTypes')->will($this->returnValue($nodeTypesFixture));
 }
开发者ID:radmiraal,项目名称:TYPO3.TYPO3CR,代码行数:8,代码来源:NodeTypeManagerTest.php

示例7: handleStoresRouterMatchResultsInTheComponentContext

 /**
  * @test
  */
 public function handleStoresRouterMatchResultsInTheComponentContext()
 {
     $mockMatchResults = array('someRouterMatchResults');
     $this->mockConfigurationManager->expects($this->atLeastOnce())->method('getConfiguration')->will($this->returnValue(array()));
     $this->mockRouter->expects($this->atLeastOnce())->method('route')->with($this->mockHttpRequest)->will($this->returnValue($mockMatchResults));
     $this->mockComponentContext->expects($this->atLeastOnce())->method('setParameter')->with('TYPO3\\Flow\\Mvc\\Routing\\RoutingComponent', 'matchResults', $mockMatchResults);
     $this->routingComponent->handle($this->mockComponentContext);
 }
开发者ID:sokunthearith,项目名称:Intern-Project-Week-2,代码行数:11,代码来源:RoutingComponentTest.php

示例8: injectConfigurationManager

 /**
  * Injects the configuration manager
  *
  * @param \TYPO3\Flow\Configuration\ConfigurationManager $configurationManager
  * @return void
  */
 public function injectConfigurationManager(\TYPO3\Flow\Configuration\ConfigurationManager $configurationManager)
 {
     $this->configurationManager = $configurationManager;
     $this->matches = $this->configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Debug.Profiling.Classes');
     foreach ($this->matches as $key => $value) {
         $this->matches[$key] = '/^' . str_replace('\\', '\\\\', $value) . '$/';
     }
 }
开发者ID:radmiraal,项目名称:Debug.Toolbar,代码行数:14,代码来源:PointcutSettingsClassFilter.php

示例9: getTokenEndpointForProvider

 /**
  * @param string $providerName The provider name as given in Settings.yaml
  * @throws \InvalidArgumentException
  * @return TokenEndpointInterface
  */
 public function getTokenEndpointForProvider($providerName)
 {
     $tokenEndpointClassName = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, sprintf('TYPO3.Flow.security.authentication.providers.%s.providerOptions.tokenEndpointClassName', $providerName));
     if ($tokenEndpointClassName === NULL) {
         throw new \InvalidArgumentException(sprintf('In Settings.yaml, there was no "tokenEndpointClassName" option given for the provider "%s".', $providerName), 1383743372);
     }
     return $this->objectManager->get($tokenEndpointClassName);
 }
开发者ID:avency,项目名称:Flowpack.OAuth2.Client,代码行数:13,代码来源:Resolver.php

示例10: handle

 /**
  * Resolve a route for the request
  *
  * Stores the resolved route values in the ComponentContext to pass them
  * to other components. They can be accessed via ComponentContext::getParameter('TYPO3\Flow\Mvc\Routing\RoutingComponent', 'matchResults');
  *
  * @param ComponentContext $componentContext
  * @return void
  */
 public function handle(ComponentContext $componentContext)
 {
     if ($componentContext->getParameter('TYPO3\\Flow\\Mvc\\Routing\\RoutingComponent', 'skipRouterInitialization') !== TRUE) {
         $routesConfiguration = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_ROUTES);
         $this->router->setRoutesConfiguration($routesConfiguration);
     }
     $matchResults = $this->router->route($componentContext->getHttpRequest());
     $componentContext->setParameter('TYPO3\\Flow\\Mvc\\Routing\\RoutingComponent', 'matchResults', $matchResults);
 }
开发者ID:sokunthearith,项目名称:Intern-Project-Week-2,代码行数:18,代码来源:RoutingComponent.php

示例11: prepareRealtimeIndexing

 /**
  * @param \TYPO3\Flow\Core\Bootstrap $bootstrap
  */
 public function prepareRealtimeIndexing(\TYPO3\Flow\Core\Bootstrap $bootstrap)
 {
     $this->configurationManager = $bootstrap->getObjectManager()->get('TYPO3\\Flow\\Configuration\\ConfigurationManager');
     $settings = $this->configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, $this->getPackageKey());
     if (isset($settings['realtimeIndexing']['enabled']) && $settings['realtimeIndexing']['enabled'] === TRUE) {
         $bootstrap->getSignalSlotDispatcher()->connect('Flowpack\\ElasticSearch\\Indexer\\Object\\Signal\\SignalEmitter', 'objectUpdated', 'Flowpack\\ElasticSearch\\Indexer\\Object\\ObjectIndexer', 'indexObject');
         $bootstrap->getSignalSlotDispatcher()->connect('Flowpack\\ElasticSearch\\Indexer\\Object\\Signal\\SignalEmitter', 'objectPersisted', 'Flowpack\\ElasticSearch\\Indexer\\Object\\ObjectIndexer', 'indexObject');
         $bootstrap->getSignalSlotDispatcher()->connect('Flowpack\\ElasticSearch\\Indexer\\Object\\Signal\\SignalEmitter', 'objectRemoved', 'Flowpack\\ElasticSearch\\Indexer\\Object\\ObjectIndexer', 'removeObject');
     }
 }
开发者ID:johannessteu,项目名称:Flowpack.ElasticSearch,代码行数:13,代码来源:Package.php

示例12: render

 /**
  * Renders an HTML tag from a given asset.
  *
  * @param string $layout
  * @param int $columnNo
  * @return string
  */
 public function render($layout, $columnNo = 1)
 {
     $settings = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'JohannesSteu.Bootstrap.GridSystem.Layouts');
     if (array_key_exists($layout, $settings)) {
         if (array_key_exists("col-" . $columnNo, $settings[$layout])) {
             return $settings[$layout]["col-" . $columnNo];
         }
     }
     return "";
 }
开发者ID:OwlAsh,项目名称:JohannesSteu.Bootstrap.GridSystem,代码行数:17,代码来源:GridLayoutViewHelper.php

示例13: prepareNodeTypeManager

 /**
  * Prepares $this->nodeTypeManager with a fresh instance with all mocks and makes the given fixture data available as NodeTypes configuration
  *
  * @param array $nodeTypesFixtureData
  */
 protected function prepareNodeTypeManager(array $nodeTypesFixtureData)
 {
     $this->nodeTypeManager = new NodeTypeManager();
     $this->mockConfigurationManager = $this->getMockBuilder(ConfigurationManager::class)->disableOriginalConstructor()->getMock();
     $mockCache = $this->getMock(\TYPO3\Flow\Cache\Frontend\StringFrontend::class, [], [], '', false);
     $mockCache->expects($this->any())->method('get')->willReturn(null);
     $this->inject($this->nodeTypeManager, 'fullConfigurationCache', $mockCache);
     $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->with('NodeTypes')->will($this->returnValue($nodeTypesFixtureData));
     $this->inject($this->nodeTypeManager, 'configurationManager', $this->mockConfigurationManager);
 }
开发者ID:mgoldbeck,项目名称:neos-development-collection,代码行数:15,代码来源:NodeTypeManagerTest.php

示例14: getConfiguredOptionsByProviderName

 /**
  * @param string $providerName
  * @throws \InvalidArgumentException
  * @return array
  */
 protected function getConfiguredOptionsByProviderName($providerName)
 {
     if (!array_key_exists($providerName, $this->providerOptionsByProviderName)) {
         $providerOptions = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, sprintf('TYPO3.Flow.security.authentication.providers.%s.providerOptions', $providerName));
         if (!is_array($providerOptions)) {
             throw new \InvalidArgumentException(sprintf('The given provider name "%s" was not properly defined in the Settings (i.e. being defined and having a "providerOptions" key).', $providerName), 1383739910);
         }
         $this->providerOptionsByProviderName[$providerName] = $providerOptions;
     }
     return $this->providerOptionsByProviderName[$providerName];
 }
开发者ID:avency,项目名称:Flowpack.OAuth2.Client,代码行数:16,代码来源:UriBuilder.php

示例15: getGuides

 /**
  * @return array
  */
 protected function getGuides()
 {
     $out = [];
     $chartSettings = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'WMDB.Forger.Charts');
     foreach ($chartSettings['Phases'] as $version => $phases) {
         foreach ($phases as $phaseName => $dates) {
             $out[] = ['fillAlpha' => 0.5, 'date' => $dates['start'], 'toDate' => $dates['end'], 'label' => $phaseName, 'position' => 'top', 'inside' => TRUE, 'fillColor' => $chartSettings['Colors'][$phaseName]];
         }
     }
     return $out;
 }
开发者ID:randomresult,项目名称:WMDB.Forger,代码行数:14,代码来源:AbstractGraph.php


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