lib/SteamCondenser/Community/GameInventory.php
public static function create($appId, $steamId, $fetchNow = true, $bypassCache = false) {
        if (is_numeric($steamId)) {
            $steamId64 = $steamId;
        } else {
            $steamId64 = SteamId::resolveVanityUrl($steamId);
        }

        switch ($appId) {
            case DotA2BetaInventory::APP_ID:
                $inventoryClass = 'Dota2\\Dota2BetaInventory';
                break;
            case DotA2Inventory::APP_ID:
                $inventoryClass = 'Dota2\\Dota2Inventory';
                break;
            case Portal2Inventory::APP_ID:
                $inventoryClass = 'Portal2\\Portal2Inventory';
                break;
            case TF2BetaInventory::APP_ID:
                $inventoryClass = 'TF2\\TF2BetaInventory';
                break;
            case TF2Inventory::APP_ID:
                $inventoryClass = 'TF2\\TF2Inventory';
                break;
            default:
                $inventoryClass = 'GameInventory';
        }

        self::overwriteClass("\\SteamCondenser\\Community\\$inventoryClass");

        return self::createCacheable($appId, $steamId64, $fetchNow, $bypassCache);
    }
public static function create($appId, $steamId, $fetchNow = true, $bypassCache = false) {
        if (is_numeric($steamId)) {
            $steamId64 = $steamId;
        } else {
            $steamId64 = SteamId::resolveVanityUrl($steamId);
        }

        switch ($appId) {
            case DotA2BetaInventory::APP_ID:
                $inventoryClass = 'Dota2\\Dota2BetaInventory';
                break;
            case DotA2Inventory::APP_ID:
                $inventoryClass = 'Dota2\\Dota2Inventory';
                break;
            case Portal2Inventory::APP_ID:
                $inventoryClass = 'Portal2\\Portal2Inventory';
                break;
            case TF2BetaInventory::APP_ID:
                $inventoryClass = 'TF2\\TF2BetaInventory';
                break;
            case TF2Inventory::APP_ID:
                $inventoryClass = 'TF2\\TF2Inventory';
                break;
            default:
                $inventoryClass = 'GameInventory';
        }

        self::overwriteClass("\\SteamCondenser\\Community\\$inventoryClass");

        return self::createCacheable($appId, $steamId64, $fetchNow, $bypassCache);
    }
This checks the cache for an existing inventory. If it exists it is
returned. Otherwise a new inventory is created.

@param int $appId The application ID of the game
@param string $steamId The 64bit Steam ID or the vanity URL of the user
@param bool $fetchNow Whether the data should be fetched now
@param bool $bypassCache Whether the cache should be bypassed
@return GameInventory