for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace hamburgscleanest\DataTables\Models;
use hamburgscleanest\DataTables\Interfaces\HeaderFormatter;
/**
* Class Header
* @package hamburgscleanest\hamburgscleanest\DataTables\Models
*/
class Header {
/** @var string */
public $key;
private $_attributeName;
* Header constructor.
* @param string $columnKey
public function __construct(string $columnKey)
{
$this->_attributeName = $this->key = $columnKey;
}
* Get the original attribute name.
*
* @return string
public function getAttributeName() : string
return $this->_attributeName;
* @param array $headerFormatters
* @return Header
public function formatArray(array $headerFormatters) : Header
foreach ($headerFormatters as $formatter)
$this->format($formatter);
return $this;
* @param HeaderFormatter $headerFormatter
public function format(HeaderFormatter $headerFormatter) : Header
$headerFormatter->format($this);
public function print() : string
return '<th>' . $this->key . '</th>';