Piwik\Plugins\SitesManager\API::getPatternMatchSites PHP Method

getPatternMatchSites() public method

Any website will be returned that matches the pattern in the name, URL or group. To limit the number of returned sites you can either specify filter_limit as usual or limit which is faster.
public getPatternMatchSites ( string $pattern, integer | false $limit = false ) : array
$pattern string
$limit integer | false
return array
    public function getPatternMatchSites($pattern, $limit = false)
    {
        $ids = $this->getSitesIdWithAtLeastViewAccess();
        if (empty($ids)) {
            return array();
        }
        $sites = $this->getModel()->getPatternMatchSites($ids, $pattern, $limit);
        return $sites;
    }