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ý
*/
final class Source extends \stdClass implements IXmlConvertible {
use \Nette\SmartObject;
public string $url;
public string $title;
public function __construct(string $url = "", string $title = "") {
$this->url = $url;
$this->title = $title;
}
public function appendToXml(\SimpleXMLElement &$parent): void {
if($this->url !== "") {
$element = $parent->addChild("source", $this->title);
$element->addAttribute("url", $this->url);
?>