本文整理汇总了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);
}
示例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'];
}
}
示例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;
}
示例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));
}
示例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);
}
示例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) . '$/';
}
}
示例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);
}
示例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);
}
示例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');
}
}
示例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 "";
}
示例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);
}
示例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];
}
示例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;
}