/**
  * {@inheritdoc}
  */
 public function convertStringToPHPValue($sqlExpr)
 {
     $parser = new StringParser($sqlExpr);
     $value = $parser->parse();
     $class = sprintf('CrEOF\\Spatial\\PHP\\Types\\%s\\%s', $this->getBaseType(), $value['type']);
     return new $class($value['value'], $value['srid']);
 }
 /**
  * @expectedException        \CrEOF\Spatial\Exception\InvalidValueException
  * @expectedExceptionMessage [Syntax Error] line 0, col 19: Error: Expected CrEOF\Spatial\DBAL\Types\StringLexer::T_TYPE, got "PNT" in value "GEOMETRYCOLLECTION(PNT(10 10), POINT(30 30), LINESTRING(15 15, 20 20))"
  */
 public function testParsingGeometryCollectionValueWithBadType()
 {
     $value = 'GEOMETRYCOLLECTION(PNT(10 10), POINT(30 30), LINESTRING(15 15, 20 20))';
     $parser = new StringParser($value);
     $parser->parse();
 }
 /**
  * {@inheritdoc}
  */
 public function convertStringToPHPValue($sqlExpr)
 {
     $parser = new StringParser($sqlExpr);
     return $this->newObjectFromValue($parser->parse());
 }