Zend_Service_DeveloperGarden.xml 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.service.developergarden">
  4. <title>Zend_Service_DeveloperGarden</title>
  5. <sect2 id="zend.service.developergarden.introduction">
  6. <title>Introduction to DeveloperGarden</title>
  7. <para>
  8. DeveloperGarden is the name for the &quot;Open Development services&quot; of the German
  9. Telekom. The &quot;Open Development services&quot; are a set of <acronym>SOAP</acronym>
  10. API Services.
  11. </para>
  12. <para>
  13. The family of <classname>Zend_Service_DeveloperGarden</classname> components provides a
  14. clean and simple interface to the <ulink
  15. url="http://www.developergarden.com">DeveloperGarden API</ulink> and additionally
  16. offers functionality to improve handling and performance.
  17. </para>
  18. <itemizedlist>
  19. <listitem>
  20. <para>
  21. <link linkend="zend.service.developergarden.baseuserservice">BaseUserService</link>:
  22. Class to manage API quota and user accounting details.
  23. </para>
  24. </listitem>
  25. <listitem>
  26. <para>
  27. <link linkend="zend.service.developergarden.iplocation">IpLocation</link>:
  28. Locale the given IP and returns geo coordinates. Works only with IPs allocated
  29. in the network of the german telekom.
  30. </para>
  31. </listitem>
  32. <listitem>
  33. <para>
  34. <link linkend="zend.service.developergarden.localsearch">LocalSearch</link>:
  35. Allows you to search with options nearby or around a given geo coordinate or city.
  36. </para>
  37. </listitem>
  38. <listitem>
  39. <para>
  40. <link linkend="zend.service.developergarden.sendsms">SendSms</link>: Send a Sms
  41. or Flash Sms to a given number.
  42. </para>
  43. </listitem>
  44. <listitem>
  45. <para>
  46. <link linkend="zend.service.developergarden.smsvalidation">SmsValidation</link>:
  47. You can validate a number to use it with SendSms for also supply a back channel.
  48. </para>
  49. </listitem>
  50. <listitem>
  51. <para>
  52. <link linkend="zend.service.developergarden.voicecall">VoiceCall</link>:
  53. Initiates a call between two numbers.
  54. </para>
  55. </listitem>
  56. <listitem>
  57. <para>
  58. <link linkend="zend.service.developergarden.conferencecall">ConferenceCall</link>:
  59. You can configure a whole conference room with participants for an adhoc
  60. conference or you can also schedule your conference.
  61. </para>
  62. </listitem>
  63. </itemizedlist>
  64. <para>
  65. The backend SOAP API is documented
  66. <ulink url="http://www.developergarden.com/openapi/dokumentation/">here</ulink>.
  67. </para>
  68. <sect3 id="zend.service.developergarden.account">
  69. <title>Sign Up for an Account</title>
  70. <para>
  71. Before you can start using the DeveloperGarden API, you must first
  72. <ulink url="http://www.developergarden.com/register">sign up</ulink> for an account.
  73. </para>
  74. </sect3>
  75. <sect3 id="zend.service.developergarden.environment">
  76. <title>The Environment</title>
  77. <para>
  78. With the DeveloperGarden API you have the possibility to choose 3 different
  79. environments to work on.
  80. </para>
  81. <itemizedlist>
  82. <listitem>
  83. <para>
  84. <emphasis>production</emphasis>: In Production environement you have to pay
  85. for calls, sms and other payable services.
  86. </para>
  87. </listitem>
  88. <listitem>
  89. <para>
  90. <emphasis>sandbox</emphasis>: In the Sandbox mode you can use the same
  91. features with some limitations like in the production just without to pay
  92. for them. Normally during development you can test your application.
  93. </para>
  94. </listitem>
  95. <listitem>
  96. <para>
  97. <emphasis>mock</emphasis>: The Mock environment allows you to build your
  98. application and have results but you don not initiate any action on the API
  99. side.
  100. </para>
  101. </listitem>
  102. </itemizedlist>
  103. <para>
  104. For every environment and service are some special features (options) available for
  105. testing. Please look <ulink
  106. url="http://www.developergarden.com/openapi/dokumentation/">here</ulink> for
  107. details.
  108. </para>
  109. </sect3>
  110. <sect3 id="zend.service.developergarden.config">
  111. <title>Your configuration</title>
  112. <para>
  113. You can pass to all classes an array of configuration values. Possible values are:
  114. </para>
  115. <itemizedlist>
  116. <listitem>
  117. <para>
  118. <emphasis>username</emphasis>: Your DeveloperGarden API username.
  119. </para>
  120. </listitem>
  121. <listitem>
  122. <para>
  123. <emphasis>password</emphasis>: Your DeveloperGarden API password.
  124. </para>
  125. </listitem>
  126. <listitem>
  127. <para>
  128. <emphasis>environment</emphasis>: The environment that you selected.
  129. </para>
  130. </listitem>
  131. </itemizedlist>
  132. <example id="zend.service.developergarden.config.example">
  133. <title>Configuration Example</title>
  134. <programlisting language="php"><![CDATA[
  135. require_once 'Zend/Service/DeveloperGarden/SendSms.php';
  136. $config = array(
  137. 'username' => 'yourUsername',
  138. 'password' => 'yourPassword',
  139. 'environment' => Zend_Service_DeveloperGarden_SendSms::ENV_PRODUCTION,
  140. );
  141. $service = new Zend_Service_DeveloperGarden_SendSms($config);
  142. ]]></programlisting>
  143. </example>
  144. </sect3>
  145. </sect2>
  146. <sect2 id="zend.service.developergarden.baseuserservice">
  147. <title>BaseUserService</title>
  148. <para>
  149. The class can be used to set and get quota values for the services and to fetch
  150. account details.
  151. </para>
  152. <para>
  153. The <methodname>getAccountBalance()</methodname> method is there to fetch an array
  154. of account id's with the current balance status (credits).
  155. </para>
  156. <example id="zend.service.developergarden.baseuserservice.getaccountbalance.example">
  157. <title>Get account balance example</title>
  158. <programlisting language="php"><![CDATA[
  159. $service = new Zend_Service_DeveloperGarden_BaseUserService($config);
  160. print_r($service->getAccountBalance());
  161. ]]></programlisting>
  162. </example>
  163. <sect3 id="zend.service.developergarden.baseuserservice.getquotainformation">
  164. <title>Get quota information</title>
  165. <para>
  166. You can fetch quota informations for a specific service module with the
  167. provided methods.
  168. </para>
  169. <example id="zend.service.developergarden.baseuserservice.getquotainformation.example">
  170. <title>Get quota information example</title>
  171. <programlisting language="php"><![CDATA[
  172. $service = new Zend_Service_DeveloperGarden_BaseUserService($config);
  173. $result = $service->getSmsQuotaInformation(
  174. Zend_Service_DeveloperGarden_BaseUserService::ENV_PRODUCTION
  175. );
  176. echo 'Sms Quota:<br />';
  177. echo 'Max Quota: ', $result->getMaxQuota(), '<br />';
  178. echo 'Max User Quota: ', $result->getMaxUserQuota(), '<br />';
  179. echo 'Quota Level: ', $result->getQuotaLevel(), '<br />';
  180. ]]></programlisting>
  181. </example>
  182. <para>
  183. You get a <classname>Result</classname> object that contains all information that
  184. you need, optional you can pass to the <methodname>QuotaInformation</methodname>
  185. method the environment constant to fetch the quota for the specific environment.
  186. </para>
  187. <para>
  188. Here a list of all <methodname>getQuotaInformation</methodname> methods:
  189. </para>
  190. <itemizedlist>
  191. <listitem>
  192. <para>
  193. <methodname>getConfernceCallQuotaInformation()</methodname>
  194. </para>
  195. </listitem>
  196. <listitem>
  197. <para>
  198. <methodname>getIPLocationQuotaInformation()</methodname>
  199. </para>
  200. </listitem>
  201. <listitem>
  202. <para>
  203. <methodname>getLocalSearchQuotaInformation()</methodname>
  204. </para>
  205. </listitem>
  206. <listitem>
  207. <para>
  208. <methodname>getSmsQuotaInformation()</methodname>
  209. </para>
  210. </listitem>
  211. <listitem>
  212. <para>
  213. <methodname>getVoiceCallQuotaInformation()</methodname>
  214. </para>
  215. </listitem>
  216. </itemizedlist>
  217. </sect3>
  218. <sect3 id="zend.service.developergarden.baseuserservice.changequotainformation">
  219. <title>Change quota information</title>
  220. <para>
  221. To change the current quota use one of the <methodname>changeQuotaPool</methodname>
  222. methods. First parameter is the new pool value and the second one is the
  223. environment.
  224. </para>
  225. <example id="zend.service.developergarden.baseuserservice.changequotainformation.example">
  226. <title>Change quota information example</title>
  227. <programlisting language="php"><![CDATA[
  228. $service = new Zend_Service_DeveloperGarden_BaseUserService($config);
  229. $result = $service->changeSmsQuotaPool(
  230. 1000,
  231. Zend_Service_DeveloperGarden_BaseUserService::ENV_PRODUCTION
  232. );
  233. if (!$result->hasError()) {
  234. echo 'updated Quota Pool';
  235. }
  236. ]]></programlisting>
  237. </example>
  238. <para>
  239. Here a list of all <methodname>changeQuotaPool</methodname> methods:
  240. </para>
  241. <itemizedlist>
  242. <listitem>
  243. <para>
  244. <methodname>changeConferenceCallQuotaPool()</methodname>
  245. </para>
  246. </listitem>
  247. <listitem>
  248. <para>
  249. <methodname>changeIPLocationQuotaPool()</methodname>
  250. </para>
  251. </listitem>
  252. <listitem>
  253. <para>
  254. <methodname>changeLocalSearchQuotaPool()</methodname>
  255. </para>
  256. </listitem>
  257. <listitem>
  258. <para>
  259. <methodname>changeSmsQuotaPool()</methodname>
  260. </para>
  261. </listitem>
  262. <listitem>
  263. <para>
  264. <methodname>changeVoiceCallQuotaPool()</methodname>
  265. </para>
  266. </listitem>
  267. </itemizedlist>
  268. </sect3>
  269. </sect2>
  270. <sect2 id="zend.service.developergarden.iplocation">
  271. <title>IP Location</title>
  272. <para>
  273. This service allows you to retrieve location information for a given IP address.
  274. </para>
  275. <para>
  276. There are some limitations:
  277. </para>
  278. <itemizedlist>
  279. <listitem>
  280. <para>The IP address must be in the T-Home network</para>
  281. </listitem>
  282. <listitem>
  283. <para>Just the next big city will be resolved</para>
  284. </listitem>
  285. <listitem>
  286. <para>IPv6 is not supported yet</para>
  287. </listitem>
  288. </itemizedlist>
  289. <example id="zend.service.developergarden.iplocation.locateip.example">
  290. <title>Locate a given IP</title>
  291. <programlisting language="php"><![CDATA[
  292. $service = new Zend_Service_DeveloperGarden_IpLocation($config);
  293. $service->setEnvironment(
  294. Zend_Service_DeveloperGarden_IpLocation::ENV_MOCK
  295. );
  296. $ip = new Zend_Service_DeveloperGarden_IpLocation_IpAddress('127.0.0.1');
  297. print_r($service->locateIp($ip));
  298. ]]></programlisting>
  299. </example>
  300. </sect2>
  301. <sect2 id="zend.service.developergarden.localsearch">
  302. <title>Local Search</title>
  303. <para>
  304. The Local Search service provides the local search machine <ulink
  305. url="http://www.suchen.de">suchen.de</ulink> via a the web service interface. For
  306. more details, refer to <ulink
  307. url="http://www.developergarden.com/static/docu/en/ch04s02s06.html">the
  308. documentation</ulink>.
  309. </para>
  310. <example id="zend.service.developergarden.localsearch.example">
  311. <title>Locate a Restaurant</title>
  312. <programlisting language="php"><![CDATA[
  313. $service = new Zend_Service_DeveloperGarden_LocalSearch($config);
  314. $search = new Zend_Service_DeveloperGarden_LocalSearch_SearchParameters();
  315. /**
  316. * @see http://www.developergarden.com/static/docu/en/ch04s02s06s04.html
  317. */
  318. $search->setWhat('pizza')
  319. ->setWhere('jena');
  320. print_r($service->localSearch($search));
  321. ]]></programlisting>
  322. </example>
  323. </sect2>
  324. <sect2 id="zend.service.developergarden.sendsms">
  325. <title>Send SMS</title>
  326. <para>
  327. The Send SMS service is used to send normal and Flash SMS to any number.
  328. </para>
  329. <para>
  330. The following restrictions apply to the use of the SMS service:
  331. </para>
  332. <itemizedlist>
  333. <listitem>
  334. <para>
  335. An SMS or Flash SMS in the production environment must not be longer than
  336. 765 characters and must not be sent to more than 10 recipients.
  337. </para>
  338. </listitem>
  339. <listitem>
  340. <para>
  341. An SMS or Flash SMS in the sandbox environment is shortened and enhanced by a
  342. note in the DeveloperGarden. The maximum length of the message sent is 160
  343. characters.
  344. </para>
  345. </listitem>
  346. <listitem>
  347. <para>
  348. In the sandbox environment, a maximum of 10 SMS can be sent per day.
  349. </para>
  350. </listitem>
  351. <listitem>
  352. <para>
  353. The following characters are counted twice:
  354. <literal>| ^ € { } [ ] ~ \ LF</literal> (line break)
  355. </para>
  356. </listitem>
  357. <listitem>
  358. <para>
  359. If an SMS or Flash SMS is longer than 160 characters, one message is charged for
  360. each 153 characters (quota and credit).
  361. </para>
  362. </listitem>
  363. <listitem>
  364. <para>
  365. Delivery cannot be guaranteed for SMS or Flash SMS to landline numbers.
  366. </para>
  367. </listitem>
  368. <listitem>
  369. <para>
  370. The sender can exist of a maximum of 11 characters. Permitted characters are
  371. letters and numbers.
  372. </para>
  373. </listitem>
  374. <listitem>
  375. <para>
  376. The specification of a phone number as the sender is only permitted if the phone
  377. number has been validated. (See: <link
  378. linkend="zend.service.developergarden.smsvalidation">SMS Validation</link>)
  379. </para>
  380. </listitem>
  381. </itemizedlist>
  382. <example id="zend.service.developergarden.sendsms.example">
  383. <title>Sending an SMS</title>
  384. <programlisting language="php"><![CDATA[
  385. $service = new Zend_Service_DeveloperGarden_SendSms($config);
  386. $sms = $service->createSms(
  387. '+49-172-123456; +49-177-789012',
  388. 'your test message',
  389. 'yourname'
  390. );
  391. print_r($service->send($sms));]]></programlisting>
  392. </example>
  393. </sect2>
  394. <sect2 id="zend.service.developergarden.smsvalidation">
  395. <title>SMS Validation</title>
  396. <para>
  397. The SMS Validation service allows the validation of physical phone number to be used
  398. as the sender of an SMS.
  399. </para>
  400. <para>
  401. First, call <methodname>setValidationKeyword()</methodname> to receive an SMS
  402. with a keyword.
  403. </para>
  404. <para>
  405. After you get your keyword, you have to use the <methodname>validate()</methodname> to
  406. validate your number with the keyword against the service.
  407. </para>
  408. <para>
  409. With the method <methodname>getValidatedNumbers()</methodname>, you will get a list
  410. of all already validated numbers and the status of each.
  411. </para>
  412. <example id="zend.service.developergarden.smsvalidation.request.example">
  413. <title>Request validation keyword</title>
  414. <programlisting language="php"><![CDATA[
  415. $service = new Zend_Service_DeveloperGarden_SmsValidation($config);
  416. print_r($service->sendValidationKeyword('+49-172-123456'));
  417. ]]></programlisting>
  418. </example>
  419. <example id="zend.service.developergarden.smsvalidation.validate.example">
  420. <title>Validate a number with a keyword</title>
  421. <programlisting language="php"><![CDATA[
  422. $service = new Zend_Service_DeveloperGarden_SmsValidation($config);
  423. print_r($service->validate('TheKeyWord', '+49-172-123456'));
  424. ]]></programlisting>
  425. </example>
  426. <para>
  427. To invalidate a validated number, call the method <methodname>inValidate()</methodname>.
  428. </para>
  429. </sect2>
  430. <sect2 id="zend.service.developergarden.voicecall">
  431. <title>Voice Call</title>
  432. <para>
  433. The Voice Call service is used for setting up a voice connection between two telephone
  434. connections. For specific details please read the <ulink
  435. url="http://www.developergarden.com/static/docu/en/ch04s02.html">API
  436. Documentation</ulink>.
  437. </para>
  438. <para>
  439. Normally the Service works as followed:
  440. </para>
  441. <itemizedlist>
  442. <listitem>
  443. <para>
  444. Call the first participant.
  445. </para>
  446. </listitem>
  447. <listitem>
  448. <para>
  449. If the connection is successful, call the second participant.
  450. </para>
  451. </listitem>
  452. <listitem>
  453. <para>
  454. If second participant connects succesfully, both participants are connected.
  455. </para>
  456. </listitem>
  457. <listitem>
  458. <para>
  459. The call is open until one of the participants hangs up or the expire mechanism
  460. intercepts.
  461. </para>
  462. </listitem>
  463. </itemizedlist>
  464. <example id="zend.service.developergarden.voicecall.call.example">
  465. <title>Call two numbers</title>
  466. <programlisting language="php"><![CDATA[
  467. $service = new Zend_Service_DeveloperGarden_VoiceCall($config);
  468. $aNumber = '+49-30-000001';
  469. $bNumber = '+49-30-000002';
  470. $expiration = 30; // seconds
  471. $maxDuration = 300; // 5 mins
  472. $newCall = $service->newCall($aNumber, $bNumber, $expiration, $maxDuration);
  473. echo $newCall->getSessionId();
  474. ]]></programlisting>
  475. </example>
  476. <para>
  477. If the call is initiated, you can ask the result object for the session ID and
  478. use this session ID for an additional call to the <methodname>callStatus</methodname>
  479. or <methodname>tearDownCall()</methodname> methods. The second parameter on the
  480. <methodname>callStatus()</methodname> method call extends the expiration for this call.
  481. </para>
  482. <example id="zend.service.developergarden.voicecall.teardown.example">
  483. <title>Call two numbers, ask for status, and cancel</title>
  484. <programlisting language="php"><![CDATA[
  485. $service = new Zend_Service_DeveloperGarden_VoiceCall($config);
  486. $aNumber = '+49-30-000001';
  487. $bNumber = '+49-30-000002';
  488. $expiration = 30; // seconds
  489. $maxDuration = 300; // 5 mins
  490. $newCall = $service->newCall($aNumber, $bNumber, $expiration, $maxDuration);
  491. $sessionId = $newCall->getSessionId();
  492. $service->callStatus($sessionId, true); // extend the call
  493. sleep(10); // sleep 10s and then tearDown
  494. $service->tearDownCall($sessionId);
  495. ]]></programlisting>
  496. </example>
  497. </sect2>
  498. <sect2 id="zend.service.developergarden.conferencecall">
  499. <title>ConferenceCall</title>
  500. <para>
  501. Conference Call allows you to setup and start a phone conference.
  502. </para>
  503. <para>
  504. The following features are available:
  505. </para>
  506. <itemizedlist>
  507. <listitem>
  508. <para>
  509. Conferences with an immediate start
  510. </para>
  511. </listitem>
  512. <listitem>
  513. <para>
  514. Conferences with a defined start date
  515. </para>
  516. </listitem>
  517. <listitem>
  518. <para>
  519. Recurring conference series
  520. </para>
  521. </listitem>
  522. <listitem>
  523. <para>
  524. Adding, removing, and muting of participants from a conference
  525. </para>
  526. </listitem>
  527. <listitem>
  528. <para>
  529. Templates for conferences
  530. </para>
  531. </listitem>
  532. </itemizedlist>
  533. <para>
  534. Here is a list of currently implemented API methods:
  535. </para>
  536. <itemizedlist>
  537. <listitem>
  538. <para>
  539. <methodname>createConference()</methodname> creates a new conference
  540. </para>
  541. </listitem>
  542. <listitem>
  543. <para>
  544. <methodname>updateConference()</methodname> updates an existing conference
  545. </para>
  546. </listitem>
  547. <listitem>
  548. <para>
  549. <methodname>commitConference()</methodname> saves the conference, and, if no date
  550. is configured, immediately starts the conference
  551. </para>
  552. </listitem>
  553. <listitem>
  554. <para>
  555. <methodname>removeConference()</methodname> removes a conference
  556. </para>
  557. </listitem>
  558. <listitem>
  559. <para>
  560. <methodname>getConferenceList()</methodname> returns a list of all configured
  561. conferences
  562. </para>
  563. </listitem>
  564. <listitem>
  565. <para>
  566. <methodname>getConferenceStatus()</methodname> displays information for an
  567. existing conference
  568. </para>
  569. </listitem>
  570. <listitem>
  571. <para>
  572. <methodname>getParticipantStatus()</methodname> displays status information
  573. about a conference participant
  574. </para>
  575. </listitem>
  576. <listitem>
  577. <para>
  578. <methodname>newParticipant()</methodname> creates a new participant
  579. </para>
  580. </listitem>
  581. <listitem>
  582. <para>
  583. <methodname>addParticipant()</methodname> adds a participant to a conference
  584. </para>
  585. </listitem>
  586. <listitem>
  587. <para>
  588. <methodname>updateParticipant()</methodname> updates a participant,
  589. usually to mute or redial the participant
  590. </para>
  591. </listitem>
  592. <listitem>
  593. <para>
  594. <methodname>removeParticipant()</methodname> removes a participant from a
  595. conference
  596. </para>
  597. </listitem>
  598. <listitem>
  599. <para>
  600. <methodname>getRunningConference()</methodname> requests the running instance of
  601. a planned conference
  602. </para>
  603. </listitem>
  604. <listitem>
  605. <para>
  606. <methodname>createConferenceTemplate()</methodname> creates a new conference
  607. template
  608. </para>
  609. </listitem>
  610. <listitem>
  611. <para>
  612. <methodname>getConferenceTemplate()</methodname> requests an existing conference
  613. template
  614. </para>
  615. </listitem>
  616. <listitem>
  617. <para>
  618. <methodname>updateConferenceTemplate()</methodname> updates existing conference
  619. template details
  620. </para>
  621. </listitem>
  622. <listitem>
  623. <para>
  624. <methodname>removeConferenceTemplate()</methodname> removes a conference template
  625. </para>
  626. </listitem>
  627. <listitem>
  628. <para>
  629. <methodname>getConferenceTemplateList()</methodname> requests all conference
  630. templates of an owner
  631. </para>
  632. </listitem>
  633. <listitem>
  634. <para>
  635. <methodname>addConferenceTemplateParticipant()</methodname> adds a conference
  636. participant to conference template
  637. </para>
  638. </listitem>
  639. <listitem>
  640. <para>
  641. <methodname>getConferenceTemplateParticipant()</methodname> displays details of
  642. a participant of a conference template
  643. </para>
  644. </listitem>
  645. <listitem>
  646. <para>
  647. <methodname>updateConferenceTemplateParticipant()</methodname> updates
  648. participant details within a conference template
  649. </para>
  650. </listitem>
  651. <listitem>
  652. <para>
  653. <methodname>removeConferenceTemplateParticipant()</methodname> removes
  654. a participant from a conference template
  655. </para>
  656. </listitem>
  657. </itemizedlist>
  658. <example id="zend.service.developergarden.conferencecall.example">
  659. <title>Ad-Hoc conference</title>
  660. <programlisting language="php"><![CDATA[
  661. $client = new Zend_Service_DeveloperGarden_ConferenceCall($config);
  662. $conferenceDetails = new Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail(
  663. 'Zend-Conference', // name for the conference
  664. 'this is my private zend conference', // description
  665. 60 // duration in seconds
  666. );
  667. $conference = $client->createConference('MyName', $conferenceDetails);
  668. $part1 = new Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail(
  669. 'Jon',
  670. 'Doe',
  671. '+49-123-4321',
  672. 'your.name@example.com',
  673. true
  674. );
  675. $client->newParticipant($conference->getConferenceId(), $part1);
  676. // add a second, third ... participant
  677. $client->commitConference($conference->getConferenceId());
  678. ]]></programlisting>
  679. </example>
  680. </sect2>
  681. <sect2 id="zend.service.developergarden.performance">
  682. <title>Performance and Caching</title>
  683. <para>
  684. You can setup various caching options to improve the performance for resolving WSDL and
  685. authentication tokens.
  686. </para>
  687. <para>
  688. First of all, you can setup the internal SoapClient (PHP) caching values.
  689. </para>
  690. <example id="zend.service.developergarden.performance.wsdlcache.example">
  691. <title>WSDL cache options</title>
  692. <programlisting language="php"><![CDATA[
  693. Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::setWsdlCache([PHP CONSTANT]);
  694. ]]></programlisting>
  695. </example>
  696. <para>
  697. The <constant>[PHP CONSTANT]</constant> can be one of the following values:
  698. </para>
  699. <itemizedlist>
  700. <listitem>
  701. <para>
  702. <constant>WSDL_CACHE_DISC</constant>: enabled disc caching
  703. </para>
  704. </listitem>
  705. <listitem>
  706. <para>
  707. <constant>WSDL_CACHE_MEMORY</constant>: enabled memory caching
  708. </para>
  709. </listitem>
  710. <listitem>
  711. <para>
  712. <constant>WSDL_CACHE_BOTH</constant>: enabled disc and memory caching
  713. </para>
  714. </listitem>
  715. <listitem>
  716. <para>
  717. <constant>WSDL_CACHE_NONE</constant>: disabled both caching
  718. </para>
  719. </listitem>
  720. </itemizedlist>
  721. <para>
  722. If you want also to cache the result for calls to the SecuritTokenServer
  723. you can setup a <classname>Zend_Cache</classname> instance and pass it to the
  724. <methodname>setCache()</methodname>.
  725. </para>
  726. <example id="zend.service.developergarden.performance.cache.example">
  727. <title>SecurityTokenServer cache option</title>
  728. <programlisting language="php"><![CDATA[
  729. $cache = Zend_Cache::factory('Core', ...);
  730. Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::setCache($cache);
  731. ]]></programlisting>
  732. </example>
  733. </sect2>
  734. </sect1>