Neos.Neos/Classes/Domain/Model/Site.php
public function getPrimaryDomain()
    {
        return isset($this->primaryDomain) && $this->primaryDomain->getActive() ? $this->primaryDomain : $this->getFirstActiveDomain();
    }
public function getPrimaryDomain()
    {
        return isset($this->primaryDomain) && $this->primaryDomain->getActive() ? $this->primaryDomain : $this->getFirstActiveDomain();
    }
public function getPrimaryDomain ( ) { return isset ( $ this -> primaryDomain ) && $ this -> primaryDomain -> getActive ( ) ? $ this -> primaryDomain : $ this -> getFirstActiveDomain ( ) ; }
Returns the primary domain, if one has been defined.

@return Domain The primary domain or NULL
@api
Returns the primary domain if one has been defined .