public function getRealm($realmName)
    {
        if (!is_scalar($realmName)) {
            throw new \InvalidArgumentException('Non-string value given for realm name');
        }
        if (!array_key_exists($realmName, $this->realms)) {
            if ($this->getAllowRealmAutocreate()) {
                Logger::debug($this, 'Creating new realm \'' . $realmName . '\'');
                $realm = new Realm($realmName);

                $this->addRealm($realm);
            } else {
                throw new RealmNotFoundException();
            }
        }

        return $this->realms[$realmName];
    }
public function getRealm($realmName)
    {
        if (!is_scalar($realmName)) {
            throw new \InvalidArgumentException('Non-string value given for realm name');
        }
        if (!array_key_exists($realmName, $this->realms)) {
            if ($this->getAllowRealmAutocreate()) {
                Logger::debug($this, 'Creating new realm \'' . $realmName . '\'');
                $realm = new Realm($realmName);

                $this->addRealm($realm);
            } else {
                throw new RealmNotFoundException();
            }
        }

        return $this->realms[$realmName];
    }
public function getRealm ( $ realmName ) { if ( ! is_scalar ( $ realmName ) ) { throw new \ InvalidArgumentException ( 'Non-string value given for realm name' ) ; } if ( ! array_key_exists ( $ realmName , $ this -> realms ) ) { if ( $ this -> getAllowRealmAutocreate ( ) ) { Logger :: debug ( $ this , 'Creating new realm \'' . $ realmName . '\'' ) ; $ realm = new Realm ( $ realmName ) ; $ this -> addRealm ( $ realm ) ; } else { throw new RealmNotFoundException ( ) ; } } return $ this -> realms [ $ realmName ] ; }
Get Realm by realm name

@param string $realmName
@throws \Thruway\Exception\InvalidRealmNameException
@throws \Thruway\Exception\RealmNotFoundException
@return \Thruway\Realm
Get Realm by realm name