Get Event by order id
@param type $incrementId
@param type $adyenEventCode
@return type event id
420421
public function getEventById($incrementId, $adyenEventCode = Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISATION)
    {
        $db = $this->_getReadAdapter();
        $sql = $db->select()
            ->from($this->getMainTable(), array('*'))
            ->where('increment_id = ?', $incrementId)
            ->where('adyen_event_result = ?', $adyenEventCode);
        return $db->fetchOne($sql);
    }
880550
private function get_count_suffix( string $event, bool $increment = false ): string {

		if ( ! isset( $this->calls[ $event ] ) ) {
			$this->calls[ $event ] = 0;
		}

		if ( $increment ) {
			$this->calls[ $event ] ++;
		}

		$count = (int) $this->calls[ $event ];

		return $count > 1 ? " ({$count})" : '';
	}
86836
public function GetEventStatsForAccountV1($eventid, $accountid, $language = null)
    {
        return $this->_call(__METHOD__, 'GET', array('eventid' => $eventid, 'accountid' => $accountid, 'language' => $language));
    }
1324296
public function getEvent($event_id)
    {
        $sth = $this->dbh->prepare('SELECT * FROM ' . $this->prefixTable('lcache_events') .' WHERE event_id = :event_id');
        $sth->bindValue(':event_id', $event_id, \PDO::PARAM_INT);
        $sth->execute();
        $event = $sth->fetchObject();
        if (false === $event) {
            return null;
        }
        $event->value = unserialize($event->value);
        return $event;
    }
268118
function _getEventID(element) {
    if (element._xuiEventID) return element._xuiEventID;
    return element._xuiEventID = ++_getEventID.id;
}
1323299
public function getEvent($pspReference, $adyenEventCode, $success = null)
    {
        $db = $this->_getReadAdapter();

        if ($success == null) {
            $sql = $db->select()
                ->from($this->getMainTable(), array('*'))
                ->where('adyen_event_code = ?', $adyenEventCode)
                ->where('psp_reference = ?', $pspReference);
        } else {
            $sql = $db->select()
                ->from($this->getMainTable(), array('*'))
                ->where('adyen_event_code = ?', $adyenEventCode)
                ->where('psp_reference = ?', $pspReference)
                ->where('success = ?', $success);
        }

        $stmt = $db->query($sql);
        return $stmt->fetch();
    }
1223037
public function get($deliveryExecutionId, $eventId = null)
    {
        $queryBuilder = $this->getQueryBuilder();
        $queryBuilder
            ->select('*')
            ->from(static::TABLE_NAME)
            ->where(static::DELIVERY_EXECUTION_ID . '=:delivery_execution_id')
            ->setParameter('delivery_execution_id', $deliveryExecutionId)
        ;

        if ($eventId !== null) {
            $queryBuilder
                ->andWhere(static::EVENT_ID . '=:event_id')
                ->setParameter('event_id', $eventId);
            ;
        }

        $queryBuilder->orderBy(static::ID, 'ASC');

        $data = $queryBuilder->execute()->fetchAll(\PDO::FETCH_ASSOC);

        $result = $this->decodeValues($data);

        return $result;
    }
799954
def _getEventFromUid(self, request, uid):
        """"""
        event = getEventFromUid(request, uid)
        if event.get_ancestors().filter(id=self.id).exists():
            # only return event if it is a descendant
            return event
876733
public function getPushIntegrationCode($websiteID)
    {
        if (empty($websiteID)) {
            return $this->handleError('Empty website id');
        }

        $requestResult = $this->sendRequest('/push/websites/' . $websiteID . '/code');

        return $this->handleResult($requestResult);
    }
860651
public function getPointEventByType($isIncrease = true)
    {
        $query = PointEventType::select('id');

        $isIncrease ? $query->where('is_increase' ,$isIncrease) : $query->where('is_deduction');
        $eventType = $query->get();

        $this->eventQuery = PointEvent::with('activities')
            ->whereIn('point_event_type_id' ,$eventType->toArray());

        return $this->doQuery();
    }
20660
public B escalation(String escalationCode) {
    EscalationEventDefinition escalationEventDefinition = createEscalationEventDefinition(escalationCode);
    element.getEventDefinitions().add(escalationEventDefinition);

    return myself;
  }
616183
public function getIdGroupeEvenement($idEvenement)
    {
        if (!isset($idEvenement)) {
            return false;
        }
        $requete = "
				SELECT idEvenement
				FROM _evenementEvenement
				WHERE idEvenementAssocie = $idEvenement
				ORDER BY idEvenement DESC
				LIMIT 1
				";
        $result =  $this->connexionBdd->requete($requete);
        $res = mysql_fetch_assoc($result);
        if (isset($res['idEvenement']) && $res['idEvenement'] != '') {
            return $res['idEvenement'];
        } else {
            $this->messages->addError("Impossible de récupérer le groupe d'evenement, le groupe n'existe pas!");
            $this->messages->display();
            return false;
        }
    }
170479
function getChainIndexById(id, sequence){
    return sequence.map(function(el){
      return el._id;
    }).indexOf(id);
  }
665855
public function getByAuthCode(AuthCodeEntity $authCode)
    {
        $sql = <<<SQL
SELECT os.id, os.owner_type, os.owner_id, os.client_id, os.client_redirect_uri
FROM oauth_session os
INNER JOIN oauth_auth_code oac ON(oac.session_id = os.id)
WHERE oac.auth_code = :authCode
SQL;
        foreach ($this->getDbConnection()->fetchAll($sql, ['authCode' => $authCode->getId()]) as $row) {
            if ($row) {
                return (new SessionEntity($this->server))
                    ->setId($row['id'])
                    ->setOwner($row['owner_type'], $row['owner_id']);
            }
        }
        return null;
    }
1320681
public function getRecordId(array $identifier, string $autoIncrementColumn): int
    {
        if (isset($identifier[$autoIncrementColumn])) {
            return (int)$identifier[$autoIncrementColumn];
        }
        $queryBuilder = $this->connection->createQueryBuilder();
        $queryBuilder->select($autoIncrementColumn)
            ->from($this->table)
            ->setParameters($identifier);
        foreach (array_keys($identifier) as $key) {
            $queryBuilder->andWhere("$key = :$key");
        }
        $stmt = $this->connection->prepare($queryBuilder->getSQL());
        $stmt->execute($identifier);
        return (int)$stmt->fetchColumn();
    }
848655
public function getAdminByAdminCode($adminCode)
    {
        $codes = explode('|', $adminCode);

        if (false === $codes) {
            return false;
        }

        $admin = $this->getInstance($codes[0]);
        array_shift($codes);

        if (empty($codes)) {
            return $admin;
        }

        foreach ($codes as $code) {
            if (!$admin->hasChild($code)) {
                return false;
            }

            $admin = $admin->getChild($code);
        }

        return $admin;
    }
802639
function getNextId(db, collectionName, fieldName, callback) {
    if (typeof fieldName == "function") {
        callback = fieldName;
        fieldName = null;
    }

    fieldName = fieldName || getOption(collectionName, "field");
    var collection = db.collection(defaultSettings.collection);
    var step = getOption(collectionName, "step");

    collection.findAndModify(
        {_id: collectionName, field: fieldName},
        null,
        {$inc: {seq: step}},
        {upsert: true, new: true},
        function (err, result) {
            if (err) {
                if (err.code == 11000) {
                    process.nextTick(getNextId.bind(null, db, collectionName, fieldName, callback));
                } else {
                    callback(err);
                }
            } else {
                if (result.value && result.value.seq) {
                    callback(null, result.value.seq);
                } else {
                    callback(null, result.seq);
                }
            }
        }
    );
}