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\Worksheet;
4
 
5
class ProtectedRange
6
{
7
    private string $name = '';
8
 
9
    private string $password = '';
10
 
11
    private string $sqref;
12
 
13
    private string $securityDescriptor = '';
14
 
15
    /**
16
     * No setters aside from constructor.
17
     */
18
    public function __construct(string $sqref, string $password = '', string $name = '', string $securityDescriptor = '')
19
    {
20
        $this->sqref = $sqref;
21
        $this->name = $name;
22
        $this->password = $password;
23
        $this->securityDescriptor = $securityDescriptor;
24
    }
25
 
26
    public function getSqref(): string
27
    {
28
        return $this->sqref;
29
    }
30
 
31
    public function getName(): string
32
    {
33
        return $this->name ?: ('p' . md5($this->sqref));
34
    }
35
 
36
    public function getPassword(): string
37
    {
38
        return $this->password;
39
    }
40
 
41
    public function getSecurityDescriptor(): string
42
    {
43
        return $this->securityDescriptor;
44
    }
45
}