/** * This checks the cache for an existing inventory. If it exists it is * returned. Otherwise a new inventory is created. * * @param string $steamId The 64bit Steam ID or 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 TF2BetaInventory The inventory created from the given options */ public static function createInventory($steamId, $fetchNow = true, $bypassCache = false) { return parent::create(self::APP_ID, $steamId, $fetchNow, $bypassCache); }
/** * Returns the current Team Fortress 2 inventory (a.k.a. backpack) of this * player * * @return TF2Inventory This player's TF2 backpack */ public function getInventory() { if (!$this->isPublic()) { return; } if (empty($this->inventory)) { $this->inventory = TF2Inventory::create($this->steamId64); } return $this->steamId64; }