/** * @param Geometry $component * * @throws \Kdyby\Extension\GeoJson\InvalidArgumentException */ protected function add(Geometry $component) { if (!$component instanceof Point) { throw new InvalidArgumentException('LineString composes of Points, ' . get_class($component) . ' given.'); } parent::add($component); }
/** * @param Geometry $component * * @throws \Kdyby\Extension\GeoJson\InvalidArgumentException */ protected function add(Geometry $component) { if (!$component instanceof Polygon) { throw new InvalidArgumentException('MultiPolygon composes of Polygons, ' . get_class($component) . ' given.'); } parent::add($component); }