public function getType($asString = false, $canonical = false) { if ($asString) { return self::getTypeAsString($this->type, $canonical); } return $this->type; }