public function replace(array $items = array())
    {
        $this->items = array();

        foreach ($items as $item) {
            $this->add($item);
        }
    }
public function replace(array $items = array())
    {
        $this->items = array();

        foreach ($items as $item) {
            $this->add($item);
        }
    }
public function replace ( array $ items = array ( ) ) { $ this -> items = array ( ) ; foreach ( $ items as $ item ) { $ this -> add ( $ item ) ; } }
Replace the contents of this bag with the specified items


@param array $items An array of items
Replace the contents of this bag with the specified items