-
Notifications
You must be signed in to change notification settings - Fork 49
/
SeoTwitter.php
117 lines (98 loc) · 2.37 KB
/
SeoTwitter.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?php
declare(strict_types=1);
namespace Arcanedev\SeoHelper\Contracts;
use Arcanedev\SeoHelper\Contracts\Entities\TwitterCard as CardContract;
/**
* Interface SeoTwitter
*
* @author ARCANEDEV <arcanedev.maroc@gmail.com>
*/
interface SeoTwitter extends Renderable
{
/* -----------------------------------------------------------------
| Getters & Setters
| -----------------------------------------------------------------
*/
/**
* Set the twitter card instance.
*
* @return $this
*/
public function setCard(CardContract $card): static;
/**
* Set the card type.
*
* @return $this
*/
public function setType(string $type): static;
/**
* Set the card site.
*
* @return $this
*/
public function setSite(string $site): static;
/**
* Set the card title.
*
* @return $this
*/
public function setTitle(string $title): static;
/**
* Set the card description.
*
* @return $this
*/
public function setDescription(string $description): static;
/**
* Add the image to the card.
*
* @return $this
*/
public function addImage(string $url): static;
/**
* Add many metas to the card.
*
* @return $this
*/
public function addMetas(array $metas): static;
/**
* Add a meta to the twitter card.
*
* @return $this
*/
public function addMeta(string $name, string $content): static;
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/
/**
* Reset the twitter card.
*
* @return $this
*/
public function reset(): static;
/**
* Enable the Twitter Card.
*
* @return $this
*/
public function enable(): static;
/**
* Disable the Twitter Card.
*
* @return $this
*/
public function disable(): static;
/* -----------------------------------------------------------------
| Check Methods
| -----------------------------------------------------------------
*/
/**
* Check if the Twitter Card is enabled.
*/
public function isEnabled(): bool;
/**
* Check if the Twitter Card is disabled.
*/
public function isDisabled(): bool;
}