Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Spatie\Ignition\Contracts;
4
 
5
class BaseSolution implements Solution
6
{
7
    protected string $title;
8
 
9
    protected string $description = '';
10
 
11
    /** @var array<string, string> */
12
    protected array $links = [];
13
 
14
    public static function create(string $title = ''): static
15
    {
16
        // It's important to keep the return type as static because
17
        // the old Facade Ignition contracts extend from this method.
18
 
19
        /** @phpstan-ignore-next-line */
20
        return new static($title);
21
    }
22
 
23
    public function __construct(string $title = '')
24
    {
25
        $this->title = $title;
26
    }
27
 
28
    public function getSolutionTitle(): string
29
    {
30
        return $this->title;
31
    }
32
 
33
    public function setSolutionTitle(string $title): self
34
    {
35
        $this->title = $title;
36
 
37
        return $this;
38
    }
39
 
40
    public function getSolutionDescription(): string
41
    {
42
        return $this->description;
43
    }
44
 
45
    public function setSolutionDescription(string $description): self
46
    {
47
        $this->description = $description;
48
 
49
        return $this;
50
    }
51
 
52
    /** @return array<string, string> */
53
    public function getDocumentationLinks(): array
54
    {
55
        return $this->links;
56
    }
57
 
58
    /** @param array<string, string> $links */
59
    public function setDocumentationLinks(array $links): self
60
    {
61
        $this->links = $links;
62
 
63
        return $this;
64
    }
65
}