Returns total impact

Each stored IDS_Event object and its IDS_Filter sub-object are called
to calculate the overall impact level of this request

@return integer
186096
public function getImpact()
    {
        if (!$this->impact) {
            $this->impact = 0;
            foreach ($this->events as $event) {
                $this->impact += $event->getImpact();
            }
        }

        return $this->impact;
    }
290651
public function count(): int
    {
        $query = $this->viewable->views();

        $cacheKey = Key::createForEntity($this->viewable, $this->period ?? Period::create(), $this->unique, $this->collection);

        if ($this->shouldCache) {
            $cachedViewsCount = $this->cache->get($cacheKey);

            // Return cached views count if it exists
            if ($cachedViewsCount !== null) {
                return (int) $cachedViewsCount;
            }
        }

        if ($period = $this->period) {
            $query->withinPeriod($period);
        }

        $query->where('collection', $this->collection);

        if ($this->unique) {
            $viewsCount = $query->uniqueVisitor()->count('visitor');
        } else {
            $viewsCount = $query->count();
        }

        if ($this->shouldCache) {
            $this->cache->put($cacheKey, $viewsCount, $this->cacheLifetime);
        }

        return $viewsCount;
    }
518437
public function getItemCount() : int
    {
        if($this->lastResponse && $this->lastResponse->getHeaderLine('X-Total-Count')) {
            return (int)$this->lastResponse->getHeaderLine('X-Total-Count');
        }

        return 0;
    }
73020
public function checkRegistryRequestsAnswers()
    {

        if (! $this->organizationId) {
            if ($this->respondent) {
                $this->organizationId = $this->respondent->getOrganizationId();
            }
            if (! $this->organizationId) {
                $this->organizationId = $this->request->getParam(\MUtil_Model::REQUEST_ID2);
            }
        }

        if ($this->organizationId && (! $this->respondentId)) {
            if ($this->respondent) {
                $this->respondentId = $this->respondent->getId();
            }
            if (! $this->respondentId) {
                $this->respondentId = $this->util->getDbLookup()->getRespondentId(
                        $this->request->getParam(\MUtil_Model::REQUEST_ID1),
                        $this->organizationId
                        );
            }
        }

        return $this->organizationId && $this->respondentId && $this->db && $this->model;
    }
1181514
public function getTotal()
    {
        $total = $this->SubTotal + $this->TaxTotal;

        $this->extend("updateTotal", $total);
        
        return $total;
    }
390429
protected function totalAmountResourceCallable()
    {
        return function () {
            $idKey = $this->getDataModel()->getKeyName();

            return $this->getDataModel()->query()->count([$idKey]);
        };
    }
1267283
public function totalSeconds() : int
    {
        return $this->days * 86400 + $this->h * 3600 + $this->i * 60 + $this->s;
    }
181764
public function getHits()
    {
        if ($this->hits === null) {
            $this->hits = $this->stmt->rowCount();
        }

        return $this->hits;
    }
687088
public function actionIndex(): int
    {
        $dataTypes = $this->getDataTypes();
        $definitions = [];
        $overrideData = Data::parseYamlFile($this->overrideFile);

        $this->disableLogging();

        try {
            // Import from single file.
            if ($this->getStorageType() === self::SINGLE_FILE) {
                $definitions = $this->importDefinitionsFromFile($overrideData);
                $this->importFromDefinitions($dataTypes, $definitions);

                Schematic::info('Loaded schema from '.$this->file);
            }

            // Import from multiple files.
            if ($this->getStorageType() === self::MULTIPLE_FILES) {
                $definitions = $this->importDefinitionsFromDirectory($overrideData);
                $this->importFromDefinitions($dataTypes, $definitions);

                Schematic::info('Loaded schema from '.$this->path);
            }

            return 0;
        } catch (\Exception $e) {
            Schematic::error($e->getMessage());
            return 1;
        }
    }
855906
public function totalObjects()
    {
        $total = 0;
        if (!empty($this->headers[self::TOTAL]) && is_array($this->headers[self::TOTAL])) {
            $total = (int) $this->headers[self::TOTAL][0];
        }

        return $total;
    }
105037
protected function countTotalRows()
    {
        $source = $this->getSource();
        /** @var \Doctrine\ORM\Query\Expr\Select $select */
        $source->resetDQLPart('select')->setFirstResult(0)->select('count(' . $this->entityAlias . ')');
        return (int)$source->getQuery()->getSingleScalarResult();
    }
1161482
public function getTotal()
  {
    $rawQuery = "SELECT count(*) as total FROM orders";

    // Perform the raw query.
    $rawResults = DB::select( DB::raw($rawQuery) );

    // Return the total.
    return $rawResults[0]->total;
  }
898282
public function GetTotalDiscountValue()
    {
        $iCurrentPosition = $this->getItemPointer();
        $this->GoToStart();

        $dTotalDiscountValue = 0;

        while ($oItem = &$this->Next()) {
            $dTotalDiscountValue += ($oItem->dPriceTotal - $oItem->dPriceTotalAfterDiscount);
        }
        $this->setItemPointer($iCurrentPosition);

        return $dTotalDiscountValue;
    }
1246786
public function id(): int
    {
        return app('cache.array')->rememberForever(__CLASS__ . __METHOD__ . $this->location_name, function () {
            // The "top-level" location won't exist in the database.
            if ($this->parts->isEmpty()) {
                return 0;
            }

            $parent_location_id = $this->parent()->id();

            $location_id = (int) DB::table('placelocation')
                ->where('pl_place', '=', $this->parts->first())
                ->where('pl_parent_id', '=', $parent_location_id)
                ->value('pl_id');

            if ($location_id === 0) {
                $location = $this->parts->first();

                $location_id = 1 + (int) DB::table('placelocation')->max('pl_id');

                DB::table('placelocation')->insert([
                    'pl_id'        => $location_id,
                    'pl_place'     => $location,
                    'pl_parent_id' => $parent_location_id,
                    'pl_level'     => $this->parts->count() - 1,
                    'pl_lati'      => '',
                    'pl_long'      => '',
                    'pl_icon'      => '',
                    'pl_zoom'      => 2,
                ]);
            }

            return $location_id;
        });
    }
1172911
private function totalIndisWithSourcesQuery(): int
    {
        return DB::table('individuals')
            ->select(['i_id'])
            ->distinct()
            ->join('link', static function (JoinClause $join): void {
                $join->on('i_id', '=', 'l_from')
                    ->on('i_file', '=', 'l_file');
            })
            ->where('l_file', '=', $this->tree->id())
            ->where('l_type', '=', 'SOUR')
            ->count('i_id');
    }
1057501
public function getBasketTotal()
    {
        $total = $this->find()
            ->where([
                'id_user' => $this->idUser,
                'storage' => $this->owner->storageName
            ])
            ->sum('count');

        return ($total) ? $total : 0;
    }
119593
public function total()
    {
        $response = $this->send(sprintf('subscribers_count/?api_token=%s', $this->apiToken));
        $content  = json_decode($response->getBody());

        return (integer) $content->count;
    }