1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Mpyw\OpenGraph; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Class holding data for a single Open Graph property on a web page. |
7
|
|
|
*/ |
8
|
|
|
class Property |
9
|
|
|
{ |
10
|
|
|
public const AUDIO = 'og:audio'; |
11
|
|
|
public const AUDIO_SECURE_URL = 'og:audio:secure_url'; |
12
|
|
|
public const AUDIO_TYPE = 'og:audio:type'; |
13
|
|
|
public const AUDIO_URL = 'og:audio:url'; |
14
|
|
|
public const DESCRIPTION = 'og:description'; |
15
|
|
|
public const DETERMINER = 'og:determiner'; |
16
|
|
|
public const IMAGE = 'og:image'; |
17
|
|
|
public const IMAGE_HEIGHT = 'og:image:height'; |
18
|
|
|
public const IMAGE_SECURE_URL = 'og:image:secure_url'; |
19
|
|
|
public const IMAGE_TYPE = 'og:image:type'; |
20
|
|
|
public const IMAGE_URL = 'og:image:url'; |
21
|
|
|
public const IMAGE_WIDTH = 'og:image:width'; |
22
|
|
|
public const IMAGE_USER_GENERATED = 'og:image:user_generated'; |
23
|
|
|
public const LOCALE = 'og:locale'; |
24
|
|
|
public const LOCALE_ALTERNATE = 'og:locale:alternate'; |
25
|
|
|
public const PRICE_AMOUNT = 'og:price:amount'; |
26
|
|
|
public const PRICE_CURRENCY = 'og:price:currency'; |
27
|
|
|
public const RICH_ATTACHMENT = 'og:rich_attachment'; |
28
|
|
|
public const SEE_ALSO = 'og:see_also'; |
29
|
|
|
public const SITE_NAME = 'og:site_name'; |
30
|
|
|
public const TITLE = 'og:title'; |
31
|
|
|
public const TYPE = 'og:type'; |
32
|
|
|
public const UPDATED_TIME = 'og:updated_time'; |
33
|
|
|
public const URL = 'og:url'; |
34
|
|
|
public const VIDEO = 'og:video'; |
35
|
|
|
public const VIDEO_HEIGHT = 'og:video:height'; |
36
|
|
|
public const VIDEO_SECURE_URL = 'og:video:secure_url'; |
37
|
|
|
public const VIDEO_TYPE = 'og:video:type'; |
38
|
|
|
public const VIDEO_URL = 'og:video:url'; |
39
|
|
|
public const VIDEO_WIDTH = 'og:video:width'; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* Key of the property without "og:" prefix. |
43
|
|
|
* |
44
|
|
|
* @var mixed |
45
|
|
|
*/ |
46
|
|
|
public $key; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* Value of the property. |
50
|
|
|
* |
51
|
|
|
* @var mixed |
52
|
|
|
*/ |
53
|
|
|
public $value; |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Property constructor. |
57
|
|
|
* |
58
|
|
|
* @param mixed $key |
59
|
|
|
* @param mixed $value |
60
|
|
|
*/ |
61
|
25 |
|
public function __construct($key, $value) |
62
|
|
|
{ |
63
|
25 |
|
$this->key = $key; |
64
|
25 |
|
$this->value = $value; |
65
|
25 |
|
} |
66
|
|
|
} |
67
|
|
|
|