for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the feed-io package.
*
* (c) Alexandre Debril <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FeedIo\Feed\Node;
use FeedIo\Feed\ElementsAwareTrait;
class Element implements ElementInterface
{
use ElementsAwareTrait;
/**
* @var string
protected $name;
protected $value;
* @var array
protected $attributes = array();
public function __construct()
$this->initElements();
}
* @return string
public function getName()
return $this->name;
* @param string $name
* @return $this
public function setName($name)
$this->name = $name;
return $this;
public function getValue()
return $this->value;
* @param string $value
public function setValue($value)
$this->value = $value;
public function getAttribute($name)
if (array_key_exists($name, $this->attributes)) {
return $this->attributes[$name];
return;
* @return array
public function getAttributes()
return $this->attributes;
public function setAttribute($name, $value)
$this->attributes[$name] = $value;