forked from ThePixelDeveloper/Sitemap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Link.php
65 lines (57 loc) · 1.1 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 Aterbonus\Sitemap\Extensions;
use Aterbonus\Sitemap\Interfaces\DriverInterface;
use Aterbonus\Sitemap\Interfaces\VisitorInterface;
/**
* Class Link
*
* @package Aterbonus\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($hrefLang, $href)
{
$this->hrefLang = $hrefLang;
$this->href = $href;
}
/**
* Location of the translated page.
*
* @return string
*/
public function getHref()
{
return $this->href;
}
/**
* Language code for the page.
*
* @return string
*/
public function getHrefLang()
{
return $this->hrefLang;
}
public function accept(DriverInterface $driver)
{
$driver->visitLinkExtension($this);
}
}