Get the total items in the non-paginated version of the query

@param string $id
@return int
548935
public function getTotalItems($id = null)
    {
        $hash = md5($id);
        return isset($this->totalItems[$hash]) ? $this->totalItems[$hash] : 0;
    }
1364503
protected function getCollection($id)
    {
        $collection = $this->collectionManager->find($id);

        if (null === $collection) {
            throw new NotFoundHttpException(sprintf('Collection (%d) not found', $id));
        }

        return $collection;
    }
869943
public function getItem($id)
    {
        $file = PageRecordHelper::getFile($id);

        if (!is_file($file)) {
            return null;
        }

        $item = unserialize(file_get_contents($file));

        $item = new Data((array) $item);

        if (!$item->profiler) {
            $item->profiler = new NullObject();
        }

        if (!$item->collector) {
            $item->collector = new NullObject();
        }

        $item->id = $id;

        return $item;
    }
537805
public function fetch( $id ) {

		if ( $this->contains( $id ) ) {
			$this->cacheHits++;
			return $this->inMemoryCache[ $id ];
		}

		$this->cacheMisses++;
		return false;
	}
312589
protected function getPayload($id)
    {
        $rawPayload = $this->getRedis()->hget($this->getRedisJobNamespace(), $id);

        return static::parsePayload($rawPayload);
    }
1299847
protected function doFetch($id)
    {
        $item = $this->cachePool->getItem($this->normalizeKey($id));

        if ($item->isHit()) {
            return $item->get();
        }

        return false;
    }
1064341
public function detailById(int $id)
    {
        $all = $this->detail($id);

        return $this->checkAndReturnSingleResult($all);
    }
1036151
public function getTrash($id = null){
        if(!is_null($id)){
            return $this->getTrashedItem($id);
        }
        return $this->model->onlyTrashed()->get();
    }
941854
public function get($id)
    {
        if (isset($this->cache[$id])) {
            return $this->cache[$id];
        }

        throw new NotFoundException('No entry was found for this identifier.');
    }
35715
public function &getItemByID($id)
    {
        if ( ! $count = parent::count()) {
            return false;
        }
        /** @var \Colibri\Database\Model $itemClass */
        $itemClass = static::$itemClass;
        /** @noinspection PhpUndefinedVariableInspection */
        $PKfn = $itemClass::$PKFieldName[0];
        for ($i = 0; $i < $count; $i++) {
            if (isset($this->items[$i]->$PKfn) && $this->items[$i]->$PKfn == $id) {
                return $this->items[$i];
            }
        }

        return false;
    }
15620
public function todo_itemCount($id) {
        // I know eloquent does this, but having trouble so hand crafting using DB
        $record =  DB::table('todo_items')->where('priority_id', '=', $id)->get();
        return count($record);
    }
694280
public function getContentTags($id)
    {
        $items = array();
        $tags = Content::model()->findByPk($id)->getTags();
        foreach ($tags as $item)
            $items[] = array('label' => $item, 'url' => Yii::app()->createUrl('/search?q=' . $item));

        return $items;
    }
520145
public function delete($id): ?int
  {
    return $this->db->delete($this->class_cfg['table'], [$this->fields['id'] => $id]);
  }
12321
public function getSize($id = 0)
    {
        $id = $id ? $id : null;
        return $this->_protocol->getList($id);
    }
76941
public function getCount($collection, $column, $value, $excludeId = null, $idColumn = null, array $extra = array())
	{
		$queryParts = ['SELECT COUNT(*) FROM', $collection, 'WHERE', "$column = ?"];

		if (!is_null($excludeId) && $excludeId != 'NULL')  {
			$queryParts[] = 'AND '.($idColumn ?: 'id').' <> ?';
		}

		foreach ($extra as $key => $extraValue) {
			$queryParts[] = "AND $key = ?";
		}

		$query = $this->createQueryFrom($queryParts);
		$query->setParameter(1, $value);

		if (!is_null($excludeId) && $excludeId != 'NULL')  {
			$query->setParameter(2, $excludeId);
		}

		foreach ($extra as $key => $extraValue) {
			$query->setParameter($key + 3, $extraValue);
		}

		return $query->getSingleScalarResult();
	}
952750
public function getById($id)
    {
        $modelResult = $this->getRequest()->request(
            'GET',
            $this->getRequestUrl(sprintf('models/%s', $id))
        );

        return $this->getModelFromResult($modelResult);
    }
683280
public function load($id)
    {
        $row = $this->gateway->loadUrlWildcardData($id);

        if (empty($row)) {
            throw new NotFoundException('UrlWildcard', $id);
        }

        return $this->mapper->extractUrlWildcardFromRow($row);
    }