1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/* |
6
|
|
|
* This file is part of the Superdesk Web Publisher Facebook Instant Articles Bundle. |
7
|
|
|
* |
8
|
|
|
* Copyright 2016 Sourcefabric z.ú. and contributors. |
9
|
|
|
* |
10
|
|
|
* For the full copyright and license information, please see the |
11
|
|
|
* AUTHORS and LICENSE files distributed with this source code. |
12
|
|
|
* |
13
|
|
|
* @copyright 2016 Sourcefabric z.ú |
14
|
|
|
* @license http://www.superdesk.org/license |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
namespace SWP\Bundle\FacebookInstantArticlesBundle\Model; |
18
|
|
|
|
19
|
|
|
use SWP\Component\Common\Model\EnableableInterface; |
20
|
|
|
use SWP\Component\Common\Model\EnableableTrait; |
21
|
|
|
use SWP\Component\Common\Model\TimestampableInterface; |
22
|
|
|
use SWP\Component\Common\Model\TimestampableTrait; |
23
|
|
|
|
24
|
|
|
class Page implements TimestampableInterface, PageInterface, EnableableInterface |
25
|
|
|
{ |
26
|
|
|
use TimestampableTrait, EnableableTrait; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var int |
30
|
|
|
*/ |
31
|
|
|
protected $id; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var string |
35
|
|
|
*/ |
36
|
|
|
protected $pageId; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var string |
40
|
|
|
*/ |
41
|
|
|
protected $name; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var string |
45
|
|
|
*/ |
46
|
|
|
protected $accessToken; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var ApplicationInterface |
50
|
|
|
*/ |
51
|
|
|
protected $application; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* Page constructor. |
55
|
|
|
*/ |
56
|
5 |
|
public function __construct() |
57
|
|
|
{ |
58
|
5 |
|
$this->setEnabled(true); |
59
|
5 |
|
} |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* {@inheritdoc} |
63
|
|
|
*/ |
64
|
1 |
|
public function getId() |
65
|
|
|
{ |
66
|
1 |
|
return $this->id; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* {@inheritdoc} |
71
|
|
|
*/ |
72
|
5 |
|
public function getPageId() |
73
|
|
|
{ |
74
|
5 |
|
return $this->pageId; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @param string $pageId |
79
|
|
|
*/ |
80
|
5 |
|
public function setPageId(string $pageId) |
81
|
|
|
{ |
82
|
5 |
|
$this->pageId = $pageId; |
83
|
5 |
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* {@inheritdoc} |
87
|
|
|
*/ |
88
|
5 |
|
public function getName() |
89
|
|
|
{ |
90
|
5 |
|
return $this->name; |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @param string $name |
95
|
|
|
*/ |
96
|
5 |
|
public function setName(string $name) |
97
|
|
|
{ |
98
|
5 |
|
$this->name = $name; |
99
|
5 |
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* {@inheritdoc} |
103
|
|
|
*/ |
104
|
|
|
public function getAccessToken() |
105
|
|
|
{ |
106
|
|
|
return $this->accessToken; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* {@inheritdoc} |
111
|
|
|
*/ |
112
|
|
|
public function setAccessToken(string $accessToken) |
113
|
|
|
{ |
114
|
|
|
$this->accessToken = $accessToken; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* @return ApplicationInterface |
119
|
|
|
*/ |
120
|
1 |
|
public function getApplication() |
121
|
|
|
{ |
122
|
1 |
|
return $this->application; |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @param ApplicationInterface $application |
127
|
|
|
*/ |
128
|
|
|
public function setApplication(ApplicationInterface $application) |
129
|
|
|
{ |
130
|
|
|
$this->application = $application; |
131
|
|
|
} |
132
|
|
|
} |
133
|
|
|
|