public function getItems()
    {
        $items = [];
        if (isset($this->cart->items) === true) {
            foreach ($this->cart->items as $item) {
                $items[$item->getHash()] = $item;
            }
        }

        return $items;
    }
public function getItems()
    {
        $items = [];
        if (isset($this->cart->items) === true) {
            foreach ($this->cart->items as $item) {
                $items[$item->getHash()] = $item;
            }
        }

        return $items;
    }
public function getItems ( ) { $ items = [ ] ; if ( isset ( $ this -> cart -> items ) === true ) { foreach ( $ this -> cart -> items as $ item ) { $ items [ $ item -> getHash ( ) ] = $ item ; } } return $ items ; }
Gets all the items within the cart.

@return array
Gets all the items within the cart .