src/ShopBundle/objects/TShopBasket/TShopBasketVoucherCoreList.class.php
protected function GetUniqueItemKey()
    {
        $iCurrentPointer = $this->getItemPointer();
        $this->GoToStart();
        $aItemKeyList = array();
        while ($oItem = $this->Next()) {
            $aItemKeyList[] = $oItem->sBasketVoucherKey;
        }
        // now generate a key

        do {
            $sKey = md5(uniqid(rand(), true));
        } while (in_array($sKey, $aItemKeyList));

        return $sKey;
    }
protected function GetUniqueItemKey()
    {
        $iCurrentPointer = $this->getItemPointer();
        $this->GoToStart();
        $aItemKeyList = array();
        while ($oItem = $this->Next()) {
            $aItemKeyList[] = $oItem->sBasketVoucherKey;
        }
        // now generate a key

        do {
            $sKey = md5(uniqid(rand(), true));
        } while (in_array($sKey, $aItemKeyList));

        return $sKey;
    }
protected function GetUniqueItemKey ( ) { $ iCurrentPointer = $ this -> getItemPointer ( ) ; $ this -> GoToStart ( ) ; $ aItemKeyList = array ( ) ; while ( $ oItem = $ this -> Next ( ) ) { $ aItemKeyList [ ] = $ oItem -> sBasketVoucherKey ; } // now generate a key do { $ sKey = md5 ( uniqid ( rand ( ) , true ) ) ; } while ( in_array ( $ sKey , $ aItemKeyList ) ) ; return $ sKey ; }
return a unique sBasketVoucherKey for the current list.

@return string
return a unique sBasketVoucherKey for the current list .