Returns the name of an existing siteaccess that isn't the default one.
@return string|null The siteaccess name, or null if there isn't one
482671
private function getNonDefaultSiteaccessName()
    {
        $defaultSiteaccessName = $this->getDefaultSiteaccessName();
        foreach ($this->getKernel()->getContainer()->getParameter('ezpublish.siteaccess.list') as $siteaccessName) {
            if ($siteaccessName !== $defaultSiteaccessName) {
                return $siteaccessName;
            }
        }

        return null;
    }
371440
public function getTemplateAccessors() {
		if($this->templateAccessors) return $this->templateAccessors;
		
		$vars = parent::getTemplateAccessors();


		$cc = new ReflectionClass('ContentController');
		$site_tree = new ReflectionClass('SiteTree');
		$hierarchy = new ReflectionClass('Hierarchy');
		
		$methods = array_merge(
			$site_tree->getMethods(), 
			$cc->getMethods(),
			$hierarchy->getMethods(),
			array_keys(singleton('SiteTree')->has_many()),
			array_keys(singleton('SiteTree')->many_many()),
			array_keys(singleton('SiteTree')->db()),
			array_keys(DataObject::config()->fixed_fields)
		);		
		
		foreach($methods as $m) {
			$name = is_object($m) ? $m->getName() : $m;
			// We only care about methods that follow the UpperCamelCase convention.
			if(preg_match("/[A-Z]/",$name[0])) {
				$vars[] = $name;
			}
		}
		// Just a random exception case
		$vars[] = "Form";

		return $this->templateAccessors = $vars;
	}
307992
public function getSiteAccessesByMandatorId($mandatorId = null)
    {
        if ($mandatorId === null) {
            return array($this->siteAccess->name);
        }

        $siteAccesses = array();

        foreach ($this->siteAccessConfig as $siteAccessName => $config) {
            if (!isset($config['yoochoose']['customer_id']) || (int)$config['yoochoose']['customer_id'] !== $mandatorId) {
                continue;
            }

            $siteAccesses[$siteAccessName] = $siteAccessName;

            if ($this->isDefaultSiteAccessChanged()
                && $this->isSiteAccessSameAsSystemDefault($siteAccessName)
                && $this->isMandatorIdConfigured($mandatorId)
            ) {
                // default siteAccess name is changed and configuration should be adjusted
                $siteAccesses[$this->defaultSiteAccessName] = $this->defaultSiteAccessName;
            }
        }

        if (empty($siteAccesses)) {
            throw new NotFoundException('configuration for eZ Recommendation', "mandatorId: {$mandatorId}");
        }

        return array_values($siteAccesses);
    }
1084689
public function getName()
    {
        $mainContact = $this->Reservation()->MainContact();
        if ($this->getSurname()) {
            return trim("{$this->getFirstName()} {$this->getSurname()}");
        } elseif ($mainContact->exists() && $mainContact->getSurname()) {
            return _t('Attendee.GUEST_OF', 'Guest of {name}', null, array('name' => $mainContact->getName()));
        } else {
            return null;
        }
    }
216221
public function getName()
    {
        $name = '';

        switch ($this->_clientId)
        {
            case Bootstrapper::SITE:
                $name = 'site';
                break;
            case Bootstrapper::ADMIN:
                $name = 'administrator';
                break;
            default:
                $name = 'cli';
                break;
        }

        return $name;
    }
34469
public function getCurrentActionName()
    {
        return isset($this->action_names[$this->position]) ? $this->action_names[$this->position] : null;
    }
852691
public function getSiteAccesses($mandatorId = null, $siteAccess = null)
    {
        if ($mandatorId) {
            $siteAccesses = $this->getSiteaccessesByMandatorId($mandatorId);
        } elseif ($siteAccess) {
            $siteAccesses = array($siteAccess);
        } else {
            $siteAccesses = array($this->siteAccess->name);
        }

        return $siteAccesses;
    }
714932
public function getName()
    {
        if ($this->_name === null) {
            $endpoint = namespaceSplit(get_class($this));
            $endpoint = substr(end($endpoint), 0, -8);

            $inflectMethod = $this->getInflectionMethod();
            $this->_name = Inflector::$inflectMethod($endpoint);
        }

        return $this->_name;
    }
705262
public function getAccessToken()
    {
        $accessTokenAttribute = $this->accessTokenAttribute;
        return (is_string($accessTokenAttribute) && !empty($accessTokenAttribute)) ? $this->$accessTokenAttribute : null;
    }
1095088
public function getHostname()
    {
        $stringIp = $this->toString();

        $host = strtolower(@gethostbyaddr($stringIp));

        if ($host === '' || $host === $stringIp) {
            return null;
        }

        return $host;
    }
486940
public function getWebsite()
        {
            return isset($this->_data[self::PROFILE][self::WEBSITE]) ? $this->_data[self::PROFILE][self::WEBSITE] : null;
        }
434449
public function getActionName()
    {
        $action = $this->app->getAction();
        if (isset($this->actionPermissions[$action])) {
            return $this->actionPermissions[$action];
        }

        foreach ($this->actionPermissions as $actions => $name) {
            $actions = explode(',', $actions);
            if (in_array($action, $actions)) {
                return $name;
            }
        }

        return null;
    }
796276
protected function getSiteInfo()
    {
        if ( null === $this->siteInfo )
        {
            $this->siteInfo = $this->getServiceLocator()
                                   ->get( 'SiteInfo' );
        }

        return $this->siteInfo;
    }
645765
public function getBaseUrl()
    {
        $baseUrl = $this->innerExtractor->getBaseUrl();
        $siteAccess = $this->masterRequest->attributes->get('siteaccess');
        if ($siteAccess instanceof SiteAccess && $siteAccess->matcher instanceof SiteAccess\URILexer) {
            $baseUrl .= $siteAccess->matcher->analyseLink('');
        }

        return $baseUrl;
    }
609557
public function name()
    {
        if ($name = $this->route->getName()) {
            return $name;
        }

        $name = $this->route->getActionName();

        if ($name === 'Closure') {
            return null;
        }

        $namespace = array_get($this->route->getAction(), 'namespace');

        return str_replace($namespace . '\\', '', $name);
    }
859341
protected function iblockGetDefaultSiteId()
    {
        $return = null;
        $res = SiteTable::getRow(['filter' => ['DEF' => 'Y']]);
        if (!$res) {
            $res = SiteTable::getRow(['order' => ['SORT' => 'asc']]);
            if (!$res) {
                throw new Exception('Can not find default site for iblock');
            }
        }

        return $res['LID'];
    }
338701
protected function getAccessToken() {
    $cookies = $_COOKIE;

    if (isset(\Drupal::request()->cookies)) {
      $cookies = \Drupal::request()->cookies->all();
    }

    $cookie_name = 'Drupal_visitor_' . $this->accessTokenCookie;

    if (isset($cookies[$cookie_name])) {
      return $cookies[$cookie_name];
    }

    return NULL;
  }