public function setSrid($srid)
{
if ($srid !== null) {
$this->srid = (int) $srid;
}
return $this;
}
/** * {@inheritdoc} */ public function convertToDatabaseValue(AbstractGeometry $value) { if (!$value instanceof GeographyInterface) { throw InvalidValueException::invalidValueNotGeography(); } if ($value->getSrid() === null) { $value->setSrid(self::DEFAULT_SRID); } return sprintf('SRID=%d;%s(%s)', $value->getSrid(), strtoupper($value->getType()), $value); }