Zend_Service_DeveloperGarden.xml 30 KB

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