getSlot() public method

public getSlot ( $slot ) : EnchantmentEntry
$slot
return EnchantmentEntry
 private static function writeEnchantList(EnchantmentList $list, BinaryStream $stream)
 {
     $stream->putByte($list->getSize());
     for ($i = 0; $i < $list->getSize(); ++$i) {
         $entry = $list->getSlot($i);
         $stream->putInt($entry->getCost());
         $stream->putByte(count($entry->getEnchantments()));
         foreach ($entry->getEnchantments() as $enchantment) {
             $stream->putInt($enchantment->getId());
             $stream->putInt($enchantment->getLevel());
         }
         $stream->putString($entry->getRandomName());
     }
     return CraftingDataPacket::ENTRY_ENCHANT_LIST;
 }