Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
 
3
namespace Packback\Lti1p3\DeepLinkResources;
4
 
5
use Packback\Lti1p3\Concerns\Arrayable;
6
 
7
class Window
8
{
9
    use Arrayable, HasDimensions;
10
 
11
    public function __construct(
12
        private ?string $target_name = null,
13
        private ?int $width = null,
14
        private ?int $height = null,
15
        private ?string $window_features = null
16
    ) {
17
    }
18
 
19
    public static function new(): self
20
    {
21
        return new Window();
22
    }
23
 
24
    public function getArray(): array
25
    {
26
        return [
27
            'targetName' => $this->target_name,
28
            'width' => $this->width,
29
            'height' => $this->height,
30
            'windowFeatures' => $this->window_features,
31
        ];
32
    }
33
 
34
    public function setTargetName(?string $targetName): self
35
    {
36
        $this->target_name = $targetName;
37
 
38
        return $this;
39
    }
40
 
41
    public function getTargetName(): ?string
42
    {
43
        return $this->target_name;
44
    }
45
 
46
    public function setWindowFeatures(?string $windowFeatures): self
47
    {
48
        $this->window_features = $windowFeatures;
49
 
50
        return $this;
51
    }
52
 
53
    public function getWindowFeatures(): ?string
54
    {
55
        return $this->window_features;
56
    }
57
}