Hi,

due to the fact, that Linden Labs PHP-library[1] supports PHP5 just with
a compatibility wrapper and also due to the fact, that this library is
not what I would think is elegantly implemented I wrote a completely
independent version for my employer Neu.de in the last days. It is now
completely working, is unit tested and is used on http://neu.de to
provide a registration form. My library reuses more or less the design
of Zend_XmlRpc because the SL-API is more or less XmlRpc with other
names and a slightly diferrent syntax. For example, this is a
XML-payload for an array:

<array>
   <string>my string</string>
   <integer>1234</integer>
   <boolean>true</boolean>
</array>

So, I had written a class for every SL-type using DOMDocument to render
the payload.

The library is currently named NuSecondLifeClient and is used the
following way:

// Set up the client and supply your API access data
$client = new NuSecondLifeClient($firstname, $lastname, $password);

// Return a list of valid last names for the registration in the format
// [<id>] => [<name>]
$client->getNames();

// Check if a user given username/last_name_id-combination is unused
$client->checkName($username, $last_name_id);

// Create a new user
$client->createUser($username, $last_name_id, $email, $password, 
    $date_of_birth, $limited_to_estate, $start_region_name, 
    $start_local_x, $start_local_y, $start_local_z, $start_look_at_x,
    $start_look_at_y, $start_look_at_z);

Beneath that there are public functions like $client->getErrorCodes(),
which fetches the API error codes,
$client->getRegistrationCapabilities(), which fetches the needed
capability URLs (they do authentification via URLs). 

The current status is, that the library works pretty nice, has a good
test coverage and is going to be released as an Open Source component
anyway.

I would really love it so see this library integrated into the ZF. Am I
the only one who is interested in that?

[1] 
-- 
  »Aber das Verhältnis von Leben und Produktion, das jenes
   real herabsetzt zur ephemeren Erscheinung von dieser, ist
   vollendet widersinnig. Mittel und Zweck werden vertauscht.«
       -- Theodor W. Adorno, »Minima Moralia«, Die traurige Wissenschaft

Lars Strojny
Engelsstr. 23
51003 Cologne
Jabber/Mail: [EMAIL PROTECTED]
Weblog: http://usrportage.de

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to