Zend_Service_DeveloperGarden.xml 30 KB

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