public function __toString() { $ret = "" . $this->name; $ret .= "<"; $ret .= squashToString($this->t_args, '<', '>'); $ret .= ">"; return $ret; }
private static function GetTypeDeclaration_Helper($name, $targs, $stack) { $name = \strtoupper($name); grokit_logic_assert(!in_array($name, $stack), "Cicular type definition detected: type({$name}), stack(" . squashToString($stack) . ")"); grokit_logic_assert(self::HasTypeDeclaration($name), 'Attempting to get unknown type declaration ' . $name); $stack[] = $name; $decltype = self::$declaredTypes[$name]; if (self::HasTypeDeclaration($decltype['name'])) { $decltype = self::GetTypeDeclaration_Helper($decltype['name'], $decltype['targs'], $stack); } // Replace default arguments with those given higher up $decltype['targs'] = array_replace($decltype['targs'], $targs); return $decltype; }