classSpatialAttribute
final class SpatialAttribute
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.One attribute of CREATE SPATIAL REFERENCE SYSTEM: NAME 'text', DEFINITION 'text', ORGANIZATION 'text' IDENTIFIED BY id, DESCRIPTION 'text'.
The text is a quoted string without a line feed. ORGANIZATION also names the identifier the organization gives the system. Source: https://dev.mysql.com/doc/refman/8.4/en/create-spatial-reference-system.html.
$attribute = new \SqlSemantics\Platform\MySql\Statement\Server\Spatial\SpatialAttribute(\SqlSemantics\Platform\MySql\Statement\Server\Spatial\SpatialAttributeKind::Organization, new \SqlSemantics\Platform\MySql\Statement\Literal\Text('EPSG'), new \SqlSemantics\Platform\MySql\Statement\Literal\Numeral('4326'));
[$attribute->value->value, $attribute->identifier?->text] // => ['EPSG', '4326']Properties§
public SpatialAttributeKind $kindpublic Text $valuepublic Numeral|null $identifier = nullMethods§
public function __construct(
public SpatialAttributeKind $kind,
public Text $value,
public Numeral|null $identifier = null,
)Parameters
$kind | SpatialAttributeKind | The attribute |
$value | Text | The text of the attribute |
$identifier | Numeral|null | The identifier of IDENTIFIED BY; written exactly for ORGANIZATION |
Throws
InvalidConstruction When the identifier is written for another attribute or missing for ORGANIZATIONCalls 2
- static-call Check::input() line 39
- class-const SpatialAttributeKind::Organization() line 39
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
SpatialAttributeTestcalls