protected function get_this_slot($slots, $slotnumber) {
        foreach ($slots as $key => $slot) {
            if ($slot->slot == $slotnumber) {
                return $slot;
            }
        }
        return null;
    }
protected function get_this_slot($slots, $slotnumber) {
        foreach ($slots as $key => $slot) {
            if ($slot->slot == $slotnumber) {
                return $slot;
            }
        }
        return null;
    }
protected function get_this_slot ( $ slots , $ slotnumber ) { foreach ( $ slots as $ key => $ slot ) { if ( $ slot -> slot == $ slotnumber ) { return $ slot ; } } return null ; }
Return current slot object.
@param array $slots
@param int $slotnumber
@return stdClass $slot
Return current slot object .