convertToDatabaseValue() 공개 메소드

public convertToDatabaseValue ( CrEOF\Spatial\DBAL\Types\AbstractSpatialType $type, CrEOF\Spatial\PHP\Types\Geometry\GeometryInterface $value ) : string
$type CrEOF\Spatial\DBAL\Types\AbstractSpatialType
$value CrEOF\Spatial\PHP\Types\Geometry\GeometryInterface
리턴 string
 /**
  * @param AbstractGeometryType $type
  * @param GeometryInterface    $value
  *
  * @return string
  */
 public function convertToDatabaseValue(AbstractGeometryType $type, GeometryInterface $value)
 {
     $sridSQL = null;
     if ($type instanceof GeographyType && null === $value->getSrid()) {
         $value->setSrid(self::DEFAULT_SRID);
     }
     if (($srid = $value->getSrid()) !== null || $type instanceof GeographyType) {
         $sridSQL = sprintf('SRID=%d;', $srid);
     }
     return sprintf('%s%s', $sridSQL, parent::convertToDatabaseValue($type, $value));
 }