public function addColumn(array $properties = array())
{
foreach ($this->colModelValidators as $validator) {
$validator->validate($properties);
}
if (in_array('frozen', $properties)) {
$this->frozenColumn = true;
}
if (!isset($properties['name']) && !isset($properties['index'])) {
$properties = array_add($properties, 'name', 'Col. ' . (count($this->colModel) + 1));
$properties = array_add($properties, 'index', 'Col. ' . (count($this->colModel) + 1));
}
if (!isset($properties['name']) && isset($properties['index'])) {
$properties = array_add($properties, 'name', $properties['index']);
}
if (isset($properties['name']) && !isset($properties['index'])) {
$properties = array_add($properties, 'index', $properties['name']);
}
$this->markFunctionTypeProperty($properties);
array_push($this->colModel, array_merge($this->defaultColModelProperties, $properties));
return $this;
}