public function setSelectedItemIndex(int $index) : void
    {
        if (!isset($this->items[$index])) {
            throw new \InvalidArgumentException(sprintf('Index: "%s" does not exist', $index));
        }
        
        $this->selectedItemIndex = $index;
    }
public function setSelectedItemIndex(int $index) : void
    {
        if (!isset($this->items[$index])) {
            throw new \InvalidArgumentException(sprintf('Index: "%s" does not exist', $index));
        }
        
        $this->selectedItemIndex = $index;
    }
public function setSelectedItemIndex ( int $ index ) : void { if ( ! isset ( $ this -> items [ $ index ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Index: "%s" does not exist' , $ index ) ) ; } $ this -> selectedItemIndex = $ index ; }
Set the item index which should be selected. If the item does
not exist then throw an exception.
Set the item index which should be selected . If the item does not exist then throw an exception .