chengkun
2025-09-09 774d962b76d63366ed26c395e0a33cdbec309242
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
59
60
<?php
 
namespace PhpOffice\PhpSpreadsheet\Shared\Escher;
 
use PhpOffice\PhpSpreadsheet\Exception as SpreadsheetException;
use PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer\SpgrContainer;
 
class DgContainer
{
    /**
     * Drawing index, 1-based.
     */
    private ?int $dgId = null;
 
    /**
     * Last shape index in this drawing.
     */
    private ?int $lastSpId = null;
 
    private ?SpgrContainer $spgrContainer = null;
 
    public function getDgId(): ?int
    {
        return $this->dgId;
    }
 
    public function setDgId(int $value): void
    {
        $this->dgId = $value;
    }
 
    public function getLastSpId(): ?int
    {
        return $this->lastSpId;
    }
 
    public function setLastSpId(int $value): void
    {
        $this->lastSpId = $value;
    }
 
    public function getSpgrContainer(): ?SpgrContainer
    {
        return $this->spgrContainer;
    }
 
    public function getSpgrContainerOrThrow(): SpgrContainer
    {
        if ($this->spgrContainer !== null) {
            return $this->spgrContainer;
        }
 
        throw new SpreadsheetException('spgrContainer is unexpectedly null');
    }
 
    public function setSpgrContainer(SpgrContainer $spgrContainer): SpgrContainer
    {
        return $this->spgrContainer = $spgrContainer;
    }
}