public function buildMarshalMap($marshaller, $map, $options)
    {
        $bundle = !empty($options['bundle']) ? $options['bundle'] : null;
        $attrs = $this->_toolbox->attributes($bundle);
        $map = [];

        foreach ($attrs as $name => $info) {
            $map[$name] = function ($value, $entity) use ($info) {
                return $this->_toolbox->marshal($value, $info['type']);
            };
        }

        return $map;
    }