function &createSingleRealm() { $authenticator = new SimpleAuthenticator(); $authenticator->addRealm(new SimpleUrl('http://www.here.com/path/hello.html'), 'Basic', 'Sanctuary'); $authenticator->setIdentityForRealm('www.here.com', 'Sanctuary', 'test', 'secret'); return $authenticator; }