authToken(token)
ping(pingString)
getLocale()
getTimeZone()
setLocale(locale)
setTimeZone(tzone)
logout()
close()
BuildForge::Services::Connection
use BuildForge::Services;
# Connecting and authentication $conn = new BuildForge::Services::Connection($hostname); $token = $conn->authUser($connection, $pass); $conn = $conn->authToken($token);
# Connection functions $ping = $conn->ping("ping!"); $translation = $conn->translate($message); # Getter and setter functions $locale = $conn->getLocale(); $timezone = $conn->getTimeZone(); $conn->setLocale('en_US'); $conn->setTimeZone('PDT');
# Disconnection $conn->logout; $conn->close;
Connection allows creation and manipulation of a connection to a BuildForge Service Layer server. Through this connection, you can then access and manipulate database objects.
Opens a connection to the services layer server and returns a BuildForge::Services::Connection object through which to access that connection.
The hostname on which the server resides. Defaults to 'localhost'.
The port number of the services layer. Defaults to 3966, the standard services layer port.
Authenticates the connection with the given user login. No BuildForge::Services::DBO objects
will allow any activity without the connection having been authenticated against.
Returns a token which may be used to log in with in the future for single sign on purposes.
This token becomes invalid after this session is over - when the connection has been logged out
of with $connection->logout()
or closed with $connection->close().
No BuildForge::Services::DBO objects
will allow any activity without the connection having been authenticated against.
The user login with which to authenticate.
The password with which to authenticate.
If the user is an LDAP user, the domain ID (from $ldap->getDomain())
with which to
authenticate as previously set up in the BuildForge database - see
BuildForge::Services::DBO::LDAP for details. If the user isn't an LDAP user, leave this
unset.
authToken(token)
Authenticates against the given login token if the login token is from a currently active session. Returns the connection object. No BuildForge::Services::DBO objects will allow any activity without the connection having been authenticated against.
A login token as returned by $connection->authUser().
ping(pingString)
Pings the services layer server and returns the ping response object which contains, among other things, the sent ping string.
The ping string to send.
Contacts the services layer server and has it translate the translation key of the given message, then returns the translated message. then returns the translated string.
The BuildForge::Services::DBO::Message object to be translated.
The locale with which to translate the string. If this is unset, uses the connection's locale which defaults to 'en_US'.
The time zone used to translate time-related strings. If this is unset, uses the connection's timezone.
getLocale()
Returns the connection's current locale ID.
getTimeZone()
Returns the connection's current timezone ID.
setLocale(locale)
Sets the connection's locale for translation purposes.
The locale ID to use.
setTimeZone(tzone)
Sets the connection's timezone for date/time translation purposes.
The timezone ID to use.
logout()
Logs the user out of the connection. The connection requires reauthentication before BuildForge::Services::DBO objects will allow any actions.
close()
Closes the connection.
Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.