ExpatParser::getLocation PHP Méthode

getLocation() public méthode

Returns the location object of the current parsed element. It describes the location of the element within the XML file (line, char)
public getLocation ( ) : object
Résultat object the location of the current parser
    function getLocation()
    {
        if ($this->file !== null) {
            $path = $this->file->getAbsolutePath();
        } else {
            $path = $this->reader->getResource();
        }
        $this->location = new Location($path, xml_get_current_line_number($this->parser), xml_get_current_column_number($this->parser));
        return $this->location;
    }