James Kennard
"Mastering Joomla! 1.5 Extension and Framework Development"
'
';
echo ''.$result['telephoneNumber'][0].'';
echo '
';
}
Notice that each result array element is an array in its own right. This is because
LDAP allows multiple values for object attributes. The only exception to this is the
DN; LDAP objects can only have one location.
Our example assumes that the object attributes givenName, description, and
telephoneNumber are always present in the results. In a production environment,
we would test the attributes to ensure they are present.
APIs and Web Services
[ 294 ]
If we apply some suitable CSS when we output the results we may be presented with
something like this:
There are many other things that we can achieve using the JLDAP class. For a
complete description of all of the available methods please refer to the official JLDAP
documentation: http://api.joomla.org/Joomla-Framework/Client/JLDAP.html.
Email
Email has revolutionized communication. Joomla! provides us with the JMail class,
which allows us to send emails. JMail supports three different mechanisms for
sending email: the PHP mail function, Sendmail, and SMTP.
Pages:
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404