Zend_Service_DeveloperGarden.xml 31 KB

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