SitemapDefinitionInterface
last analyzed

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 38
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
getType() 0 1 ?
getTtl() 0 1 ?
setSettings() 0 1 ?
getSettings() 0 1 ?
getSetting() 0 1 ?
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * (c) Christian Gripp <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Core23\SitemapBundle\Definition;
13
14
interface SitemapDefinitionInterface
15
{
16
    /**
17
     * Returns the type.
18
     *
19
     * @return string $type
20
     */
21
    public function getType(): string;
22
23
    /**
24
     * Returns the block cache TTL.
25
     */
26
    public function getTtl(): int;
27
28
    /**
29
     * Sets the block settings.
30
     *
31
     * @param array $settings An array of key/value
32
     */
33
    public function setSettings(array $settings = []): void;
34
35
    /**
36
     * Returns the block settings.
37
     *
38
     * @return array $settings An array of key/value
39
     */
40
    public function getSettings(): array;
41
42
    /**
43
     * Returns one block setting or the given default value if no value is found.
44
     *
45
     * @param string     $name    Key name
46
     * @param mixed|null $default Default value
47
     *
48
     * @return mixed|null
49
     */
50
    public function getSetting(string $name, $default = null);
51
}
52