Jarves\PageStack::getDomainOfPage PHP Method

getDomainOfPage() public method

Returns the domain of the given $id page.
public getDomainOfPage ( integer $id ) : integer | null
$id integer
return integer | null
    public function getDomainOfPage($id)
    {
        $id2 = null;
        $page2Domain = $this->cacher->getDistributedCache('core/node/to-domain');
        if (!is_array($page2Domain)) {
            $page2Domain = $this->updatePage2DomainCache();
        }
        $id = ',' . $id . ',';
        foreach ($page2Domain as $domain_id => &$pages) {
            $pages = ',' . $pages . ',';
            if (strpos($pages, $id) !== false) {
                $id2 = $domain_id;
            }
        }
        return $id2;
    }