-
Notifications
You must be signed in to change notification settings - Fork 91
/
FeedModule.php
79 lines (67 loc) · 1.25 KB
/
FeedModule.php
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
declare(strict_types=1);
namespace Shopsys\FrameworkBundle\Model\Feed;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="feed_modules")
* @ORM\Entity
*/
class FeedModule
{
/**
* @var string
* @ORM\Column(type="string", length=255)
* @ORM\Id
*/
protected $name;
/**
* @var int
* @ORM\Column(type="integer")
* @ORM\Id
*/
protected $domainId;
/**
* @var bool
* @ORM\Column(type="boolean")
*/
protected $scheduled;
/**
* @param string $name
* @param int $domainId
*/
public function __construct(string $name, int $domainId)
{
$this->name = $name;
$this->domainId = $domainId;
$this->scheduled = false;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @return int
*/
public function getDomainId(): int
{
return $this->domainId;
}
public function schedule(): void
{
$this->scheduled = true;
}
public function unschedule(): void
{
$this->scheduled = false;
}
/**
* @return bool
*/
public function isScheduled(): bool
{
return $this->scheduled;
}
}