enchantments = new \SplFixedArray($size); } /** * @param $slot * @param EnchantmentEntry $entry */ public function setSlot($slot, EnchantmentEntry $entry){ $this->enchantments[$slot] = $entry; } /** * @param $slot * @return EnchantmentEntry */ public function getSlot($slot){ return $this->enchantments[$slot]; } public function getSize(){ return $this->enchantments->getSize(); } }