add an article to the notice list.

@param int   $iArticleId
@param float $iAmount

@return float - new amount on list
557803
public function AddArticleIdToNoticeList($iArticleId, $iAmount = 1)
    {
        $dNewAmountOnList = 0;

        if (is_null($this->aNoticeList)) {
            $this->GetNoticeListArticles();
        }
        // check if the item being pushed is already in the end of the queue
        $iMaxQueueLength = 1000;

        $queNotEmpty = (count($this->aNoticeList) > 0);

        if (array_key_exists($iArticleId, $this->aNoticeList)) {
            // we do not allow placing an article more than once on the notice list
            $dNewAmountOnList = false;
        } else {
            $oNoticeListItem = TdbShopUserNoticeList::GetNewInstance();
            /** @var $oNoticeListItem TdbShopUserNoticeList */
            $aData = array('shop_article_id' => $iArticleId, 'date_added' => date('Y-m-d H:i:s'), 'data_extranet_user_id' => $this->id, 'amount' => $iAmount);
            $oNoticeListItem->LoadFromRow($aData);
            if (!is_null($this->id) && $this->IsLoggedIn()) {
                $oNoticeListItem->Save();
            }
            $this->aNoticeList[$oNoticeListItem->fieldShopArticleId] = $oNoticeListItem->sqlData;
        }

        if (false !== $dNewAmountOnList) {
            // remove item if amount drops to zero
            if ($this->aNoticeList[$iArticleId]['amount'] <= 0) {
                unset($this->aNoticeList[$iArticleId]);
            } else {
                $dNewAmountOnList = $this->aNoticeList[$iArticleId]['amount'];
            }

            // if the list is full, remove last item
            if (count($this->aNoticeList) > $iMaxQueueLength) {
                array_pop($this->aNoticeList);
            }

            // save list to cookie for users not signed in
            if (!$this->IsLoggedIn()) {
                $this->CommitNoticeListToCookie();
            }
        }

        return $dNewAmountOnList;
    }
565515
protected function create_item_folder(cc_i_organization &$org, DOMDocument &$doc, DOMElement &$xmlnode = null) {

        $itemfoldernode = $doc->createElementNS($this->ccnamespaces['imscc'], 'item');
        $this->update_attribute($doc, 'identifier', "root", $itemfoldernode);

        if ($org->has_items()) {
            $this->update_items($org->itemlist, $doc, $itemfoldernode);
        }
        if (is_null($this->organizations)) {
            $this->organizations = array();
        }
        $this->organizations[$org->identifier] = $org;

        $xmlnode->appendChild($itemfoldernode);
    }
1132708
public function addCatOrderArticle()
    {
        $aAddArticle = $this->_getActionIds('oxarticles.oxid');
        $soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');

        $aOrdArt = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('neworder_sess');
        if (!is_array($aOrdArt)) {
            $aOrdArt = [];
        }

        if (is_array($aAddArticle)) {
            // storing newly ordered article seq.
            foreach ($aAddArticle as $sAdd) {
                if (array_search($sAdd, $aOrdArt) === false) {
                    $aOrdArt[] = $sAdd;
                }
            }
            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable('neworder_sess', $aOrdArt);

            $sArticleTable = $this->_getViewName('oxarticles');
            $sO2CView = $this->_getViewName('oxobject2category');

            // checking if all articles were moved from one
            $sSelect = "select 1 from $sArticleTable left join $sO2CView on $sArticleTable.oxid=$sO2CView.oxobjectid ";
            $sSelect .= "where $sO2CView.oxcatnid = '$soxId' and $sArticleTable.oxparentid = '' and $sArticleTable.oxid ";
            $sSelect .= "not in ( " . implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($aOrdArt)) . " ) ";

            // simply echoing "1" if some items found, and 0 if nothing was found
            // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
            echo (int) \OxidEsales\Eshop\Core\DatabaseProvider::getMaster()->getOne($sSelect);
        }
    }
1068208
public function addTrustRoot($identity, $trustRoot) {
		assert('is_string($identity)');
		assert('is_string($trustRoot)');

		$trs = $this->getTrustRoots($identity);
		if (!in_array($trustRoot, $trs, TRUE)) {
			$trs[] = $trustRoot;
		}

		$this->saveTrustRoots($identity, $trs);
	}
764395
public function setIdentifierValue($xmlEntity, array $id)
    {
        foreach ($id as $idField => $idValue) {
            $this->reflFields[$idField]->setValue($xmlEntity, $idValue);
        }
    }
1247394
public function addCoverage($lineNum, $count)
    {
        if (array_key_exists($lineNum, $this->coverage)) {
            $this->coverage[$lineNum] += $count;
        }
    }
345359
private void addInfoFromESS(EntitySrcSyn ess, int eId, EntityInfo c) {
		c.setOrganismCommon(ess.getOrganism_common_name());
		c.setOrganismScientific(ess.getOrganism_scientific());
		c.setOrganismTaxId(ess.getNcbi_taxonomy_id());

	}
1089421
public function authorizeOrderAmount($authorizationAmount)
    {
        $authorizeRequest = new OffAmazonPaymentsService_Model_AuthorizeRequest();
        $authorizeRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId);
        $authorizeRequest->setSellerId($this->_sellerId);
        $authorizeRequest->setAuthorizationReferenceId($this->_authorizationReferenceId);
        $authorizeRequest->setAuthorizationAmount(new OffAmazonPaymentsService_Model_Price());
        $authorizeRequest->getAuthorizationAmount()->setAmount($authorizationAmount);
        $authorizeRequest->getAuthorizationAmount()->setCurrencyCode($this->_service->getMerchantValues()->getCurrency());
        
        return $this->_service->authorize($authorizeRequest);
    }
1362860
public static function &GetPublishedReviews($iArticle, $iLanguage = null)
    {
        $sFilter = "`shop_article_review`.`shop_article_id`='".MySqlLegacySupport::getInstance()->real_escape_string($iArticle)."' ";
        $sFilter .= "AND `shop_article_review`.`publish`='1' ";

        $sQuery = self::GetDefaultQuery($iLanguage, $sFilter);
        $oList = &TdbShopArticleReviewList::GetList($sQuery, $iLanguage);
        $oList->SetOwningArticleId($iArticle);

        return $oList;
    }
458276
public void addAddVendor(String source, String name, String value, Confidence confidence) {
        addVendor.add(new Evidence(source, name, value, confidence));
    }
501435
protected function addPermissions(IdentityInterface $identity, AuthorizationInfo $info): PdoRealm
    {
        $statement = $this
            ->getPdo()
            ->prepare($this->getPermissionsQuery());
        $statement->execute([
            $identity->getIdentifier(),
            $identity->getIdentifier(),
        ]);

        foreach ($statement->fetchAll() as $permission) {
            $info->addPermission(
                new Permission($permission['notation'])
            );
        }

        return $this;
    }
507420
public function deposit($iOrderNumber, $iAmount, $sCurrency, $basket=null)
    {
        $this->_requestData[self::COMMAND] = self::$COMMAND_DEPOSIT;

        $this->_setField(self::ORDER_NUMBER, $iOrderNumber);
        $this->_setField(self::AMOUNT, $iAmount);
        $this->_setField(self::CURRENCY, strtoupper($sCurrency));
        $this->_setBasket($basket);

        $this->_fingerprintOrder->setOrder(Array(
            self::CUSTOMER_ID,
            self::SHOP_ID,
            self::TOOLKIT_PASSWORD,
            self::SECRET,
            self::COMMAND,
            self::LANGUAGE,
            self::ORDER_NUMBER,
            self::AMOUNT,
            self::CURRENCY
        ));
        $this->_appendBasketFingerprintOrder($basket);

        return new WirecardCEE_QPay_Response_Toolkit_Deposit($this->_send());
    }
855620
public static String addDomainIfMissing(final String aUrl, final String aDomain) {
    if (aUrl != null && !aUrl.isEmpty() && aUrl.startsWith("/")) {
      return aDomain + aUrl;
    }

    return aUrl;
  }
544006
protected function addPageToMountingSiteIndexQueue($mountedPageId, array $mountProperties)
    {
        $siteRepository = GeneralUtility::makeInstance(SiteRepository::class);
        $mountingSite = $siteRepository->getSiteByPageId($mountProperties['mountPageDestination']);

        /** @var $pageInitializer Page */
        $pageInitializer = GeneralUtility::makeInstance(Page::class);
        $pageInitializer->setSite($mountingSite);

        $pageInitializer->initializeMountedPage($mountProperties, $mountedPageId);
    }
672637
public function recurPayment(
        $iSourceOrderNumber,
        $iAmount,
        $sCurrency,
        $sOrderDescription,
        $iOrderNumber = null,
        $bDepositFlag = null
    ) {
        $this->_requestData[self::COMMAND] = self::$COMMAND_RECUR_PAYMENT;

        $this->_setField(self::SOURCE_ORDER_NUMBER, $iSourceOrderNumber);
        $this->_setField(self::AMOUNT, $iAmount);
        $this->_setField(self::CURRENCY, strtoupper($sCurrency));

        $this->_setField(self::ORDER_DESCRIPTION, $sOrderDescription);

        if (!is_null($iOrderNumber)) {
            $this->_setField(self::ORDER_NUMBER, $iOrderNumber);
        }

        if (!is_null($bDepositFlag)) {
            $this->_setField(self::AUTO_DEPOSIT, $bDepositFlag ? self::$BOOL_TRUE : self::$BOOL_FALSE);
        }


        $this->_fingerprintOrder->setOrder(Array(
            self::CUSTOMER_ID,
            self::SHOP_ID,
            self::TOOLKIT_PASSWORD,
            self::SECRET,
            self::COMMAND,
            self::LANGUAGE,
            self::ORDER_NUMBER,
            self::SOURCE_ORDER_NUMBER,
            self::AUTO_DEPOSIT,
            self::ORDER_DESCRIPTION,
            self::AMOUNT,
            self::CURRENCY
        ));

        return new WirecardCEE_QPay_Response_Toolkit_RecurPayment($this->_send());
    }
1073334
public function CreateDisputeDocument($disputeId, $disputeDocument, $idempotencyKey = null)
    {
        return $this->CreateObject('disputes_document_create', $disputeDocument, '\MangoPay\DisputeDocument', $disputeId, null, $idempotencyKey);
    }
1132598
function addAuthor( $id, $name, $email )
    {
        if ( $id == -1 )
        {
            if ( isset( $this->Authors[$this->AuthorCount - 1] ) )
                $id = $this->Authors[$this->AuthorCount - 1]['id'] + 1;
            else
                $id = 1;
        }

        $this->Authors[] = array( "id" => $id,
                                  "name" => $name,
                                  "email" => $email,
                             "is_default" => false );

        $this->AuthorCount ++;
    }