/**
  * @param mixed $object
  * @param Column $column
  * @param DataToStringConverter $dataToStringConverter
  * @return string
  * @throws \Exception
  */
 private static function getColumnProperty($object, Column $column, DataToStringConverter $dataToStringConverter)
 {
     $data = null;
     if ($column instanceof EntityColumn) {
         $object = self::callGetterByColumName($object, $column->getField(), $column);
         if (null !== $object) {
             $data = self::callGetterByColumName($object, $column->getEntityField(), $column);
         }
     } else {
         if (true === $column->getOptions()['unbound']) {
             $data = $object;
         } else {
             $data = self::callGetterByColumName($object, $column->getField(), $column);
         }
     }
     if (isset($column->getOptions()['format_data_callback'])) {
         $callback = $column->getOptions()['format_data_callback'];
         if ($callback instanceof \Closure) {
             return call_user_func($callback, $data, $object, $column);
         }
         throw new \Exception(sprintf('invalid "format_data_callback" of type "%s"', get_class($callback)));
     }
     return $dataToStringConverter->convertDataToString($data);
 }
 public function testConvertObjectToString()
 {
     $converter = new DataToStringConverter('en');
     $data = new \stdClass();
     $this->assertEquals('stdClass', $converter->convertDataToString($data));
 }