public function accessor(callable $getter, callable $setter): GetterSetterColumnDefiner
    {
        return new GetterSetterColumnDefiner($this, function (Column $column) use ($getter, $setter) {
            $this->columnGetterMap[$column->getName()] = $getter;
            $this->columnSetterMap[$column->getName()] = $setter;
            $this->addColumn($column);

            $this->verifyAllPropertiesMapped = false;
        });
    }
public function accessor(callable $getter, callable $setter): GetterSetterColumnDefiner
    {
        return new GetterSetterColumnDefiner($this, function (Column $column) use ($getter, $setter) {
            $this->columnGetterMap[$column->getName()] = $getter;
            $this->columnSetterMap[$column->getName()] = $setter;
            $this->addColumn($column);

            $this->verifyAllPropertiesMapped = false;
        });
    }
public function accessor ( callable $ getter , callable $ setter ) : GetterSetterColumnDefiner { return new GetterSetterColumnDefiner ( $ this , function ( Column $ column ) use ( $ getter , $ setter ) { $ this -> columnGetterMap [ $ column -> getName ( ) ] = $ getter ; $ this -> columnSetterMap [ $ column -> getName ( ) ] = $ setter ; $ this -> addColumn ( $ column ) ; $ this -> verifyAllPropertiesMapped = false ; } ) ; }
Defines a mapping between a getter and setter callback and a column.

Example:
<code>
->accessor(
function (SomeEntity $entity) {
return $entity->getData();
},
function (SomeEntity $entity, $data) {
$entity->setData($data);
}
)
->to('column_name')->asText();
</code>

@param callable $getter
@param callable $setter

@return GetterSetterColumnDefiner
Defines a mapping between a getter and setter callback and a column .