public function apply($transformer, $media_container, $node) { $geo_tag = GeoTag::create(); // Builds the image $script = $this->getProperty(self::PROPERTY_MAP_GEOTAG, $node); if ($script) { $geo_tag->withScript($script); $media_container->withGeoTag($geo_tag); } else { $transformer->addWarning(new InvalidSelector(self::PROPERTY_MAP_GEOTAG, $media_container, $node, $this)); } return $media_container; }
/** * Sets the geotag on the video. * * @see {link:http://geojson.org/} * * @param string $geoTag * * @return $this */ public function withGeoTag($geoTag) { Type::enforce($geoTag, [Type::STRING, GeoTag::getClassName()]); if (Type::is($geoTag, Type::STRING)) { $this->geoTag = GeoTag::create()->withScript($geoTag); } elseif (Type::is($geoTag, GeoTag::getClassName())) { $this->geoTag = $geoTag; } return $this; }