EntryPoint::setHttpMethod()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * (c) 2019, Wesley O. Nichols
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Wesnick\WorkflowBundle\Model;
13
14
use ApiPlatform\Core\Annotation\ApiProperty;
15
use Symfony\Component\Validator\Constraints as Assert;
16
17
/**
18
 * An entry point, within some Web-based protocol.
19
 *
20
 * @see http://schema.org/EntryPoint Documentation on Schema.org
21
 *
22
 * @author Wesley O. Nichols <[email protected]>
23
 */
24
class EntryPoint
25
{
26
    /**
27
     * @var string|null An HTTP method that specifies the appropriate HTTP method for a request to an HTTP EntryPoint. Values are capitalized strings as used in HTTP.
28
     *
29
     * @ApiProperty(iri="http://schema.org/httpMethod")
30
     * @Assert\Type(type="string")
31
     */
32
    private $httpMethod;
33
34
    /**
35
     * @var string|null an url template (RFC6570) that will be used to construct the target of the execution of the action
36
     *
37
     * @ApiProperty(iri="http://schema.org/urlTemplate")
38
     * @Assert\Type(type="string")
39
     */
40
    private $urlTemplate;
41
42
    /**
43
     * @var string|null URL of the item
44
     *
45
     * @ApiProperty(iri="http://schema.org/url")
46
     * @Assert\Url
47
     */
48
    private $url;
49
50
    public function setHttpMethod(?string $httpMethod): void
51
    {
52
        $this->httpMethod = $httpMethod;
53
    }
54
55
    public function getHttpMethod(): ?string
56
    {
57
        return $this->httpMethod;
58
    }
59
60
    public function setUrlTemplate(?string $urlTemplate): void
61
    {
62
        $this->urlTemplate = $urlTemplate;
63
    }
64
65
    public function getUrlTemplate(): ?string
66
    {
67
        return $this->urlTemplate;
68
    }
69
70
    public function setUrl(?string $url): void
71
    {
72
        $this->url = $url;
73
    }
74
75
    public function getUrl(): ?string
76
    {
77
        return $this->url;
78
    }
79
}
80