Check whether a favourite exists in this repository, based on its id.

@param int $id the id to search for.
@return bool true if the favourite exists, false otherwise.
@throws \dml_exception if any database errors are encountered.
556153
public function exists(int $id) : bool {
        global $DB;
        return $DB->record_exists($this->favouritetable, ['id' => $id]);
    }
17083
public function checkIfManuallyPicked($id)
    {
        global $wpdb;

        $result = $wpdb->get_results("
            SELECT *
            FROM $wpdb->postmeta
            WHERE meta_key = 'posts_data_posts'
                  AND meta_value LIKE '%\"{$id}\"%'
        ", OBJECT);

        if (count($result) === 0) {
            return false;
        }

        $posts = array();
        foreach ($result as $item) {
            $posts[] = $item->post_id;
        }

        return $posts;
    }
1331998
public function has( $id ){
		if( $this->cache->has( $this->cacheKey.$id ) )
			return TRUE;
		return (bool) $this->get( $id );
	}
215566
public function exists ($id)
		{
			foreach ($this->_data as $category)
				if ($category->id == $id)
					return true;

			return false;
		}
451548
public function exists($id) {
        return (bool) $this->select()->where($this->getPrimaryKey(), $id)->count();
    }
1342768
public function has($id) {
		$source = $id;
		while (is_string($source) && isset($this->getter[$source])) {
			$source = $this->getter[$source];
		}
		if (!is_string($source)) {
			return $source instanceof \Closure;
		} else {
			if (isset($this->instance[$source]) || class_exists($source)) {
				return true;
			}
			return false;
		}
	}
31985
public function id($id, $like = false)
    {
        /* @var $this ActiveQuery */
        $model = $this->noInitModel;
        return $this->likeCondition($id, $model->idAttribute, $like);
    }
301000
protected function find($id)
    {
        $model = $this->model;
        $this->model = $model::find($id);
        if (!$this->model) {
            // belts and braces check - no model = doesn't exist (without being masked missing object property)
            // potential candidate for custom exception handling
            return false;
        }
        return $this->model->exists;
    }
1151160
public function has($id)
    {
        $this->preHas($id);
        $result = $this->dataStore->has($id);
        $this->postHas($result, $id);

        return $result;
    }
4780
public function has($id)
    {
        if (array_key_exists($id, $this->entries)) {
            return true;
        }
        if (array_key_exists($id, $this->factories)) {
            return true;
        }
        return false;
    }
947199
public function has($id) {
		foreach($this->values as $container) {
			if($container->has($id)) {
				return true;
			}
		}
		return false;
	}
115751
public function has($id) {
		if(array_key_exists($id, $this->instances)) {
			return true;
		}

		return $this->parent !== null ? $this->parent->has($id) : false;
	}
826481
protected function hasService($id) {
		$method = sprintf($this->methodNameTemplate, lcfirst($id));
		
		return method_exists($this, $method);
	}
1237113
public function tryLoad($id)
    {
        if (!$this->persistence) {
            throw new Exception(['Model is not associated with any database']);
        }

        if (!$this->persistence->hasMethod('tryLoad')) {
            throw new Exception('Persistence does not support tryLoad()');
        }

        if ($this->loaded()) {
            $this->unload();
        }

        $this->data = $this->persistence->tryLoad($this, $id);
        if ($this->data) {
            $this->id = $id;

            $ret = $this->hook('afterLoad');
            if ($ret === false) {
                return $this->unload();
            } elseif (is_object($ret)) {
                return $ret;
            }
        } else {
            $this->unload();
        }

        return $this;
    }
542576
public function has($id)
    {
        return isset($this->watched[$id]) && 0 !== $this->watched[$id]->count();
    }
978086
public function deleteRelease(string $id): bool
    {
        $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/:id',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_DELETE);

        if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
            return true;
        }

        return false;
    }
905932
public function actionExists($id)
    {
        $inlineActionMethodName = 'action' . Inflector::camelize($id);
        if (method_exists($this->controller, $inlineActionMethodName)) {
            return true;
        }
        if (array_key_exists($id, $this->controller->actions())) {
            return true;
        }
        return false;
    }