Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
<?php
2
 
3
namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx;
4
 
5
class Theme
6
{
7
    /**
8
     * Theme Name.
9
     */
10
    private string $themeName;
11
 
12
    /**
13
     * Colour Scheme Name.
14
     */
15
    private string $colourSchemeName;
16
 
17
    /**
18
     * Colour Map.
19
     *
20
     * @var string[]
21
     */
22
    private array $colourMap;
23
 
24
    /**
25
     * Create a new Theme.
26
     *
27
     * @param string[] $colourMap
28
     */
29
    public function __construct(string $themeName, string $colourSchemeName, array $colourMap)
30
    {
31
        // Initialise values
32
        $this->themeName = $themeName;
33
        $this->colourSchemeName = $colourSchemeName;
34
        $this->colourMap = $colourMap;
35
    }
36
 
37
    /**
38
     * Not called by Reader, never accessible any other time.
39
     *
40
     * @codeCoverageIgnore
41
     */
42
    public function getThemeName(): string
43
    {
44
        return $this->themeName;
45
    }
46
 
47
    /**
48
     * Not called by Reader, never accessible any other time.
49
     *
50
     * @codeCoverageIgnore
51
     */
52
    public function getColourSchemeName(): string
53
    {
54
        return $this->colourSchemeName;
55
    }
56
 
57
    /**
58
     * Get colour Map Value by Position.
59
     */
60
    public function getColourByIndex(int $index): ?string
61
    {
62
        return $this->colourMap[$index] ?? null;
63
    }
64
}