Sitemap/Url/GoogleImage.php
public function toXML()
    {
        $xml = '<image:image>';

        $xml .= '<image:loc>' . Utils::encode($this->getLoc()) . '</image:loc>';

        if ($this->getCaption()) {
            $xml .= '<image:caption>' . Utils::render($this->getCaption()) . '</image:caption>';
        }

        if ($this->getGeoLocation()) {
            $xml .= '<image:geo_location>' . Utils::render($this->getGeoLocation()) . '</image:geo_location>';
        }

        if ($this->getTitle()) {
            $xml .= '<image:title>' . Utils::render($this->getTitle()) . '</image:title>';
        }

        if ($this->getLicense()) {
            $xml .= '<image:license>' . Utils::render($this->getLicense()) . '</image:license>';
        }

        $xml .= '</image:image>';

        return $xml;
    }
public function toXML()
    {
        $xml = '<image:image>';

        $xml .= '<image:loc>' . Utils::encode($this->getLoc()) . '</image:loc>';

        if ($this->getCaption()) {
            $xml .= '<image:caption>' . Utils::render($this->getCaption()) . '</image:caption>';
        }

        if ($this->getGeoLocation()) {
            $xml .= '<image:geo_location>' . Utils::render($this->getGeoLocation()) . '</image:geo_location>';
        }

        if ($this->getTitle()) {
            $xml .= '<image:title>' . Utils::render($this->getTitle()) . '</image:title>';
        }

        if ($this->getLicense()) {
            $xml .= '<image:license>' . Utils::render($this->getLicense()) . '</image:license>';
        }

        $xml .= '</image:image>';

        return $xml;
    }
public function toXML ( ) { $ xml = '<image:image>' ; $ xml .= '<image:loc>' . Utils :: encode ( $ this -> getLoc ( ) ) . '</image:loc>' ; if ( $ this -> getCaption ( ) ) { $ xml .= '<image:caption>' . Utils :: render ( $ this -> getCaption ( ) ) . '</image:caption>' ; } if ( $ this -> getGeoLocation ( ) ) { $ xml .= '<image:geo_location>' . Utils :: render ( $ this -> getGeoLocation ( ) ) . '</image:geo_location>' ; } if ( $ this -> getTitle ( ) ) { $ xml .= '<image:title>' . Utils :: render ( $ this -> getTitle ( ) ) . '</image:title>' ; } if ( $ this -> getLicense ( ) ) { $ xml .= '<image:license>' . Utils :: render ( $ this -> getLicense ( ) ) . '</image:license>' ; } $ xml .= '</image:image>' ; return $ xml ; }
Return the xml representation for the image

@return string
Return the xml representation for the image