/**
  * Sets the format of the column.
  *
  * @param  int                $colIndex
  * @param  Format             $formatter
  * @throws InvalidColumnIndex
  * @return DataTable
  */
 public function formatColumn($colIndex, Format $formatter)
 {
     if (is_int($colIndex) && $colIndex > 0) {
         $this->formats[$colIndex] = $formatter->toArray();
     } else {
         throw new InvalidColumnIndex($colIndex);
     }
     return $this;
 }
Esempio n. 2
0
 /**
  * Builds the NumberFormat object with specified options
  *
  * @param  array                 $config
  * @throws InvalidConfigValue
  * @throws InvalidConfigProperty
  * @return NumberFormat
  */
 public function __construct($config = array())
 {
     parent::__construct($this, $config);
 }