for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Nexendrie\Rss;
/**
* Source
*
* @author Jakub Konečný
* @property string $url
* @property string $title
*/
final class Source extends \stdClass implements IXmlConvertible {
use \Nette\SmartObject;
/** @var string */
protected $url;
protected $title;
public function __construct(string $url = "", string $title = "") {
$this->url = $url;
$this->title = $title;
}
protected function getUrl(): string {
return $this->url;
protected function setUrl(string $url): void {
protected function getTitle(): string {
return $this->title;
protected function setTitle(string $title): void {
public function appendToXml(\SimpleXMLElement &$parent): void {
if($this->url !== "") {
$element = $parent->addChild("source", $this->title);
$element->addAttribute("url", $this->url);
?>