/** * Returns the site with provided global id, or false if there is no such site. * * @since 1.21 * * @param string $globalId * @param string $source * * @return Site|false */ public function getSite($globalId, $source = 'cache') { if ($source === 'cache' && $this->sites !== false) { return $this->sites->hasSite($globalId) ? $this->sites->getSite($globalId) : false; } return SitesTable::singleton()->selectRow(null, array('global_key' => $globalId)); }