public function updateItems() { $container = $this->getContainer(); $manager = $container->get('lolapi.manager.item'); $items = $manager->findAll(); foreach ($items as $item) { $stats = new ItemStats($item, $container); $stats->setRefresh(true); foreach (self::$versions as $version) { $stats->getUsage($version); foreach ($stats->getMainChampions() as $champion) { $stats->getChampionUsage($version, $champion); $stats->getChampionWinrate($version, $champion); } } } }