forked from netgen/ezpublish-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConfigResolverInterface.php
58 lines (53 loc) · 1.94 KB
/
ConfigResolverInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* File containing the ConfigResolverInterface interface.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Publish\Core\MVC;
/**
* Interface for config resolvers.
*
* Classes implementing this interface will help you get settings for a specific scope.
* In eZ Publish context, this is useful to get a setting for a specific siteaccess for example.
*
* The idea is to check the different scopes available for a given namespace to find the appropriate parameter.
* To work, the dynamic setting must comply internally to the following name format : "<namespace>.<scope>.parameter.name".
*/
interface ConfigResolverInterface
{
/**
* Returns value for $paramName, in $namespace.
*
* @param string $paramName The parameter name, without $prefix and the current scope (i.e. siteaccess name).
* @param string $namespace Namespace for the parameter name. If null, the default namespace should be used.
* @param string $scope The scope you need $paramName value for.
*
* @return mixed
*/
public function getParameter( $paramName, $namespace = null, $scope = null );
/**
* Checks if $paramName exists in $namespace
*
* @param string $paramName
* @param string $namespace If null, the default namespace should be used.
* @param string $scope The scope you need $paramName value for.
*
* @return boolean
*/
public function hasParameter( $paramName, $namespace = null, $scope = null );
/**
* Changes the default namespace to look parameter into.
*
* @param string $defaultNamespace
*/
public function setDefaultNamespace( $defaultNamespace );
/**
* Returns the current default namespace.
*
* @return string
*/
public function getDefaultNamespace();
}