Check that the site ID exists

@param int
485841
protected function check_object_id( $object_id ) {
		$fetcher = new SiteFetcher();
		$site    = $fetcher->get_check( $object_id );
		return $site->blog_id;
	}
396622
public function exists()
    {
        if (!$this->name) {
            throw new UnexpectedValueException(
                'Cannot check for existing user without a name'
            );
        }

        if (!$this->host) {
            throw new UnexpectedValueException(
                'Cannot check for existing user without a host because the result could be ambiguous'
            );
        }

        $row = $this->client->getSingleResult(
            'SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = :user AND host = :host)',
            array(
                ':user' => $this->name,
                ':host' => strtolower($this->host) == 'any' ? '%' : $this->host
            )
        );

        return (bool) $row[0];
    }
456140
public function exist($id) {
    $entity = $this->entityQuery->get('site_commerce_type')
      ->condition('id', $id)
      ->execute();
    return (bool) $entity;
  }
1162953
public function exists(): bool
    {
        $location_id = 0;

        $this->parts->reverse()->each(static function (string $place) use (&$location_id) {
            if ($location_id !== null) {
                $location_id = DB::table('placelocation')
                    ->where('pl_parent_id', '=', $location_id)
                    ->where('pl_place', '=', $place)
                    ->value('pl_id');
            }
        });

        return $location_id !== null;
    }
1218497
protected void checkReloadSites ()
    {
        long now = System.currentTimeMillis();
        boolean reload = false;
        synchronized (this) {
            reload = (now - _lastReload > RELOAD_INTERVAL);
            if (reload) {
                _lastReload = now;
            }
        }
        if (reload) {
            try {
                _repo.refreshSiteData();
            } catch (PersistenceException pe) {
                log.warning("Error refreshing site data.", pe);
            }
        }
    }
948396
public function exists(){
		if($this->from_db)
		{
            foreach ($this->identifiers as $id) {
                if(!isset($this->properties[$id]))
                    return false;
            }
            return true;
       }
       return false;
    }
771156
protected function checkSiteAndAbort($site = null)
    {
        $site = $site ? $site : fp_env('ACACHA_FORGE_SITE');
        if (! $this->checkSite($site)) {
            $this->error('Site ' . $site . '  not valid');
            die();
        }
    }
49913
protected void updateSite(Site value, String xmlTag, Counter counter, Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null);
         findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
         findAndReplaceSimpleElement(innerCount, root, "url", value.getUrl(), null);
      }
   }
1173289
public function sitePageExists(
        SiteEntity $site,
        $pageName,
        $pageType
    ) {
        try {
            $page = $this->getPageByName(
                $site,
                $pageName,
                $pageType
            );
        } catch (\Exception $e) {
            $page = null;
        }

        return !empty($page);
    }
451548
public function exists($id) {
        return (bool) $this->select()->where($this->getPrimaryKey(), $id)->count();
    }
1164188
public function exists(string $url = null): bool
	{
		$urls = $this->getPageList();
		if (isset($urls[$url])) {
			return true;
		} else {
			return false;
		}
	}
428555
private function idExists($id, &$yAlreadySet, &$realNameId) {
        $yFound = isset($id[3]) && $id[3] === 'y';
        $idVarAdded = substr($id, 0, -1) . 'y';

        if (isset($this->identifiersAi[$id])) {
            if ($yFound) {
                $yAlreadySet = false;
            }

            $realNameId = $id;
            return true;
        } elseif (!$yFound && isset($this->identifiersAi[$idVarAdded])) {
            /* if the id don't exist, we try to find this id with "y" at the last char */
            $yAlreadySet = true;
            $realNameId = $idVarAdded;
            return true;
        }

        return false;
    }
215566
public function exists ($id)
		{
			foreach ($this->_data as $category)
				if ($category->id == $id)
					return true;

			return false;
		}
1367015
public function getSitesId()
    {
        $result = Db::fetchAll("SELECT idsite FROM " . Common::prefixTable('site'));

        $idSites = array();
        foreach ($result as $idSite) {
            $idSites[] = $idSite['idsite'];
        }

        return $idSites;
    }
253195
def exists(cls, id):
        """"""
        return bool(redisco.get_client().exists(cls._key[str(id)]) or
                    redisco.get_client().sismember(cls._key['all'], str(id)))
653478
private function isValidWebsiteId($websiteId)
    {
        $websites = $this->storeManager->getWebsites();
        if (array_key_exists($websiteId, $websites)) {
            return true;
        }

        if (is_numeric($websiteId)) {
            // Dont bother checking website codes on numeric input
            return false;
        }
        // @todo hs: build up array of websiteCodes, to prevent wasting time looping
        /** @var Website $website */
        foreach ($websites as $website) {
            if ($website->getCode() == $websiteId) {
                return true;
            }
        }

        return false;
    }
869307
public function IdExists($id)
    {
        $property = $this->getUserIdProperty();
        $user = User::where($property, "=", $id)->count();
        return $user === 0 ? false : true;
    }