number = (int)$xml['number']; $this->numberEx = (int)$xml['numberEx']; $this->name = (string)$xml['name']; $this->var = (string)$xml['var']; } /** * Retuns the type identifier * * @return int */ public function getNumber(): int { return $this->number; } /** * Returns the name, e.g «clody». * * @return string */ public function getName(): string { return $this->name; } /** * Return the var-variable * * @return string */ public function getVar(): string { return $this->var; } /** * {@inheritDoc} */ public function diff(DiffInterface $s): int { if ($s instanceof Symbol) return $this->number - $s->getNumber(); return 0; } public function __toString(): string { return sprintf( "%s (%d, %d, %s)", $this->name, $this->number, $this->numberEx, $this->var ); } }