InfoParamTableDefCenterNodeClass.php 1.16 KB
<?php

define ("INFOPARAMTABLEDEFCENTER_TAGNAME", "centerTable");
define ("INFOPARAMTABLEDEFCENTER_CENTERNAME", "centerName");
define ("INFOPARAMTABLEDEFCENTER_SIZE", "size");

/**
 * @class InfoParamTableDefCenterNodeClass
 * @brief Definition of a center table with a constant "width" for all channels
 * @details
 */
class InfoParamTableDefCenterNodeClass extends InfoParamTableDefNodeClass
{
	public function __construct()
	{
		parent::__construct(INFOPARAMTABLEDEFCENTER_TAGNAME);
	}

	public function setCenterName($centerName)
	{
		$this->setAttribute(INFOPARAMTABLEDEFCENTER_CENTERNAME,$centerName);
	}

	public function getCenterName()
	{
		return $this->getAttribute(INFOPARAMTABLEDEFCENTER_CENTERNAME);
	}
	
	public function setSize($size)
	{
		$this->setAttribute(INFOPARAMTABLEDEFCENTER_SIZE,$size);
	}
	
	public function getSize()
	{
		return $this->getAttribute(INFOPARAMTABLEDEFCENTER_SIZE);
	}
	
	public function loadFromNode($xmlNode)
	{
		parent::loadFromNode($xmlNode);
		$this->setCenterName($this->getXmlNodeAttribute($xmlNode, INFOPARAMTABLEDEFCENTER_CENTERNAME));
		$this->setSize($this->getXmlNodeAttribute($xmlNode, INFOPARAMTABLEDEFCENTER_SIZE));
	}
}

?>