public function setItem($item, $index = null): ContainerInterface
    {
        if (is_null($index)) {
            $this->items[] = $item;
        } else {
            $this->items[$index] = $item;
        }
        return $this;
    }
public function setItem($item, $index = null): ContainerInterface
    {
        if (is_null($index)) {
            $this->items[] = $item;
        } else {
            $this->items[$index] = $item;
        }
        return $this;
    }
public function setItem ( $ item , $ index = null ) : ContainerInterface { if ( is_null ( $ index ) ) { $ this -> items [ ] = $ item ; } else { $ this -> items [ $ index ] = $ item ; } return $ this ; }
Set an item into children list.

@param  mixed $item
@param  mixed $index Optional.
@return \HOM\ContainerInterface
Set an item into children list .