-
Notifications
You must be signed in to change notification settings - Fork 37
/
Link.php
65 lines (57 loc) · 1.16 KB
/
Link.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
<?php
namespace Thepixeldeveloper\Sitemap\Extensions;
use Thepixeldeveloper\Sitemap\Interfaces\DriverInterface;
use Thepixeldeveloper\Sitemap\Interfaces\VisitorInterface;
/**
* Class Link
*
* @package Thepixeldeveloper\Sitemap\Subelements
*/
class Link implements VisitorInterface
{
/**
* Language code for the page.
*
* @var string
*/
protected $hrefLang;
/**
* Location of the translated page.
*
* @var string
*/
protected $href;
/**
* Link constructor.
*
* @param string $hrefLang
* @param string $href
*/
public function __construct(string $hrefLang, string $href)
{
$this->hrefLang = $hrefLang;
$this->href = $href;
}
/**
* Location of the translated page.
*
* @return string
*/
public function getHref(): string
{
return $this->href;
}
/**
* Language code for the page.
*
* @return string
*/
public function getHrefLang(): string
{
return $this->hrefLang;
}
public function accept(DriverInterface $driver)
{
$driver->visitLinkExtension($this);
}
}