-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
igor
committed
Feb 26, 2016
1 parent
39b2e5b
commit 6eaa360
Showing
2 changed files
with
137 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?php | ||
/** | ||
* @author Igor Nikolaev <[email protected]> | ||
* @copyright Copyright (c) 2016, Darvin Studio | ||
* @link https://www.darvin-studio.ru | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Darvin\SitemapBundle\Url; | ||
|
||
use Symfony\Component\Validator\Constraints as Assert; | ||
|
||
/** | ||
* Sitemap URL alternate link | ||
*/ | ||
class AlternateLink | ||
{ | ||
/** | ||
* @var string | ||
* | ||
* @Assert\NotBlank | ||
*/ | ||
private $hrefLanguage; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @Assert\NotBlank | ||
* @Assert\Url | ||
*/ | ||
private $href; | ||
|
||
/** | ||
* @param string $hrefLanguage Href language | ||
* @param string $href Href | ||
*/ | ||
public function __construct($hrefLanguage, $href) | ||
{ | ||
$this->hrefLanguage = $hrefLanguage; | ||
$this->href = $href; | ||
} | ||
|
||
/** | ||
* @param string $hrefLanguage hrefLanguage | ||
* | ||
* @return AlternateLink | ||
*/ | ||
public function setHrefLanguage($hrefLanguage) | ||
{ | ||
$this->hrefLanguage = $hrefLanguage; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getHrefLanguage() | ||
{ | ||
return $this->hrefLanguage; | ||
} | ||
|
||
/** | ||
* @param string $href href | ||
* | ||
* @return AlternateLink | ||
*/ | ||
public function setHref($href) | ||
{ | ||
$this->href = $href; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getHref() | ||
{ | ||
return $this->href; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters