Zend_Service_DeveloperGarden.xml 30 KB

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