Source for file edit_properties.act.php

Documentation is available at edit_properties.act.php

  1. <?php
  2.  
  3. /**
  4. * @package polyphony.agents
  5. *
  6. * @copyright Copyright &copy; 2005, Middlebury College
  7. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  8. *
  9. * @version $Id: edit_properties.act.php,v 1.10 2007/09/19 14:04:52 adamfranco Exp $
  10. */
  11.  
  12. require_once(POLYPHONY."/main/library/AbstractActions/MainWindowAction.class.php");
  13. require_once(HARMONI."GUIManager/Components/Blank.class.php");
  14.  
  15. /**
  16. * This action allows for the editing of properties in agents.
  17. *
  18. * @since 11/10/04
  19. *
  20. * @package polyphony.agents
  21. *
  22. * @copyright Copyright &copy; 2005, Middlebury College
  23. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  24. *
  25. * @version $Id: edit_properties.act.php,v 1.10 2007/09/19 14:04:52 adamfranco Exp $
  26. */
  27. class edit_propertiesAction
  28. extends MainWindowAction
  29. {
  30. /**
  31. * Check Authorizations
  32. *
  33. * @return boolean
  34. * @access public
  35. * @since 4/26/05
  36. */
  37. function isAuthorizedToExecute () {
  38. // Check for authorization
  39. $authZManager = Services::getService("AuthZ");
  40. $idManager = Services::getService("IdManager");
  41. $list = $this->_getAgentList();
  42. foreach($list as $idString) {
  43. if (!$authZManager->isUserAuthorized($idManager->getId("edu.middlebury.authorization.modify_agent"),
  44. $idManager->getId($idString))) {
  45. return false;
  46. }
  47. }
  48. return true;
  49. }
  50. /**
  51. * Return the heading text for this action, or an empty string.
  52. *
  53. * @return string
  54. * @access public
  55. * @since 4/26/05
  56. */
  57. function getHeadingText () {
  58. return dgettext("polyphony", "Edit Agent Properties");
  59. }
  60. var $_agentList = null;
  61. function _getAgentList() {
  62. if ($this->_agentList != null) return $this->_agentList;
  63. $harmoni = Harmoni::instance();
  64. $harmoni->request->startNamespace("polyphony-agents");
  65. if (RequestContext::value("mult")) {
  66. $agentList = unserialize(RequestContext::value("agents"));
  67. } else {
  68. $agentList = array(RequestContext::value("agentId"));
  69. }
  70. $harmoni->request->endNamespace();
  71. $this->_agentList = $agentList;
  72. return $agentList;
  73. }
  74. /**
  75. * Build the content for this action
  76. *
  77. * @return void
  78. * @access public
  79. * @since 4/26/05
  80. */
  81. function buildContent () {
  82. $defaultTextDomain = textdomain("polyphony");
  83. $actionRows =$this->getActionRows();
  84. $harmoni = Harmoni::instance();
  85. $harmoni->request->startNamespace("polyphony-agents");
  86. $harmoni->request->passthrough("agentId", "mult", "agents");
  87. // get a lsit of agents that cannot be edited
  88. $agentManager = Services::getService("Agent");
  89. //we can't really do anything if its not an editableAgent
  90. if($agentManager->getAgentFlavor()!="HarmoniEditableAgent"){
  91. $actionRows->add(new Block("Sorry but agents aren't editable! (property of AgentManager)", 3), "100%", null, CENTER, TOP);
  92. return;
  93. }
  94. $this->runWizard("edit_properties", $actionRows);
  95.  
  96. $harmoni->request->endNamespace();
  97. textdomain($defaultTextDomain);
  98. }
  99. function createWizard() {
  100. $list = $this->_getAgentList();
  101. if (count($list) > 1) {
  102. $string = dgettext("polyphony", "You are editing properties for multiple agents. Existing values are not displayed unless they are the same for all agents. To change a value, be sure to select the checkbox next to the field to indicate you want the field updated.");
  103. } else {
  104. $string = dgettext("polyphony", "You are editing properties for one agent. Existing values are displayed in the fields.");
  105. }
  106. $wizardText = <<< END
  107. <div style='font-weight: bolder'>$string</div>
  108.  
  109. <div>
  110. [[properties]]
  111. </div>
  112.  
  113. <div align='right'>
  114. [[_cancel]] [[_save]]
  115. </div>
  116. END;
  117.  
  118. $wizard = SimpleWizard::withText($wizardText);
  119.  
  120. // get a lsit of agents that cannot be edited
  121. $idManager = Services::getService("Id");
  122. $agentManager = Services::getService("Agent");
  123. $values = array();
  124. $valuesSame = array();
  125. $valueCount = array();
  126. foreach($list as $idString) {
  127. $idObj =$idManager->getId($idString);
  128. $agent =$agentManager->getAgentOrGroup($idObj);
  129. $properties =$agent->getProperties();
  130. // put this agent's properties into an array.
  131. $propArray = array();
  132. while($properties->hasNext()) {
  133. $propObj =$properties->next();
  134. $typeObj =$propObj->getType();
  135. $typeString = Type::typeToString($typeObj);
  136. if (!isset($propArray[$typeString])) {
  137. $propArray[$typeString] = array();
  138. }
  139. $keys =$propObj->getKeys();
  140. while($keys->hasNext()) {
  141. $key =$keys->next();
  142. $propArray[$typeString][$key] = $propObj->getProperty($key);
  143. }
  144. }
  145. // now go through all the keys we've seen and check if they are the same.
  146. $types = array_unique(array_merge(array_keys($propArray), array_keys($values)));
  147. foreach ($types as $typeString) {
  148. if (!isset($values[$typeString])) {
  149. $values[$typeString] = array();
  150. $valuesSame[$typeString] = array();
  151. $valueCount[$typeString] = array();
  152. }
  153. if (!isset($propArray[$typeString])) $propArray[$typeString] = array();
  154. $keys = array_unique(array_merge(array_keys($propArray[$typeString]), array_keys($values[$typeString])));
  155. foreach ($keys as $key) {
  156. if (!isset($valueCount[$typeString][$key])) $valueCount[$typeString][$key] = 0;
  157. if (!isset($values[$typeString][$key])) {
  158. $valuesSame[$typeString][$key] = true;
  159. $values[$typeString][$key] = $propArray[$typeString][$key];
  160. $valueCount[$typeString][$key]++;
  161. continue;
  162. }
  163. if ($valuesSame[$typeString][$key] === false) continue;
  164. $theValue = isset($propArray[$typeString][$key])?$propArray[$typeString][$key]:null;
  165. if ($theValue) $valueCount[$typeString][$key]++;
  166. if ($values[$typeString][$key] != $theValue) {
  167. $valuesSame[$typeString][$key] = false;
  168. }
  169. }
  170. }
  171. }
  172. $wizard->addComponent("_save", WSaveButton::withLabel(dgettext("polyphony", "Update")));
  173. $wizard->addComponent("_cancel", new WCancelButton());
  174. $collection =$wizard->addComponent("properties",
  175. new WAddFromListRepeatableComponentCollection());
  176. $collection->setStartingNumber(0);
  177. $propertyManager = Services::getService("Property");
  178. $collection->addOptionCollection(dgettext("polyphony", "New Key..."), $value = null);
  179. unset($array);
  180. $allProperties = $propertyManager->getAllPropertyKeys();
  181. foreach ($allProperties as $key) {
  182. $collection->addOptionCollection($key, $array = array(
  183. 'key'=>$key,
  184. 'update'=>false,
  185. 'value'=>''));
  186. unset($array);
  187. }
  188. $keyComponent =$collection->addComponent("key", new WTextField());
  189. $keyComponent->setSize(15);
  190. $collection->addComponent("type", new WHiddenField());
  191. $typeText =$collection->addComponent("type_text", new WText());
  192. $typeText->setStyle("color: #666;");
  193. $valueComponent =$collection->addComponent("value", new WTextField());
  194. $valueComponent->setSize(40);
  195. if (count($list) > 1) {
  196. // $valueComponent->addOnChange("alert(this.id+'_update_dummy');");
  197. $valueComponent->addOnChange(
  198. "if (this.value != '' && this.value != '".dgettext("polyphony", "(multiple values exist)")."')" .
  199. "{" .
  200. "getWizardElement(this.id+'_update').value = '1';" .
  201. "getWizardElement(this.id+'_update_dummy').checked = true;" .
  202. "}");
  203. $collection->addComponent("value_update", new WCheckBox());
  204. }
  205.  
  206. // now add the default values for all of these
  207. foreach(array_keys($values) as $typeString) {
  208. $typeArray = $values[$typeString];
  209. $typeSameArray = $valuesSame[$typeString];
  210. $typeObj = Type::fromString($typeString);
  211. // now the keys
  212. foreach(array_keys($typeArray) as $key) {
  213. $valuesArray = array(
  214. 'key'=>$key,
  215. 'type'=>$typeString,
  216. 'type_text'=>"(".$typeObj->getKeyword().")",
  217. 'update'=>false,
  218. 'value'=>''
  219. );
  220. $newSet =$collection->addValueCollection($valuesArray);
  221. $newSet["key"]->setEnabled(false, true);
  222. $newSet["key"]->setStyle("border: 0px;"); // <-- not sure if this actually works as desired.
  223. // if the values are the same and there are as many values as there are agents (otherwise, some didn't have a value),
  224. // add the value in to the display.
  225. if ($typeSameArray[$key] && $valueCount[$typeString][$key] == count($list))
  226. $newSet['value']->setValue($typeArray[$key]);
  227. else
  228. $newSet['value']->setStartingDisplayText(dgettext("polyphony", "(multiple values exist)"));
  229. }
  230. }
  231. if (count($values) == 0) $collection->setStartingNumber(1);
  232. if (count($list) > 1) {
  233. $collection->setElementLayout("
  234. <table width='100%'><tr>
  235. <td>[[value_update]]</td>
  236. <td>[[key]]</td>
  237. <td>[[type_text]]</td>
  238. <td><span style='font-weight: bolder; font-size: larger;'>=</span></td>
  239. <td align='right'>[[value]]</td>
  240. <td>[[type]]</td>
  241. </tr></table");
  242. } else {
  243. $collection->setElementLayout("
  244. <table width='100%'><tr>
  245. <td>[[key]]</td>
  246. <td>[[type_text]]</td>
  247. <td><span style='font-weight: bolder; font-size: larger;'>=</span></td>
  248. <td align='right'>[[value]]</td>
  249. <td>[[type]]</td>
  250. </tr></table>");
  251. }
  252. return $wizard;
  253. }
  254. function saveWizard($cacheName) {
  255. $wizard =$this->getWizard($cacheName);
  256. $values = $wizard->getAllValues();
  257. $props = $values["properties"];
  258. $list = $this->_getAgentList();
  259. print_r($props);
  260. $agentManager = Services::getService("Agent");
  261. $idManager = Services::getService("Id");
  262. $valuesHandled = array();
  263. // go through each agent and update all its properties at once
  264. foreach ($list as $idString) {
  265. // first clear all their properties, then reset them
  266. $id =$idManager->getId($idString);
  267. $agent =$agentManager->getAgentOrGroup($id);
  268. if (count($list) == 1) $agent->deleteAllProperties();
  269. foreach($props as $values) {
  270. if ($values['type'])
  271. $type = Type::fromString($values['type']);
  272. else
  273. $type = new Type("agent_properties", "harmoni", "custom",
  274. "Properties defined outside of an authentication system.");
  275. $valuesHandled[Type::typeToString($type)][$values['key']] = true;
  276. if (count($list) == 1 || $values['value_update']) {
  277. $key = $values['key'];
  278. $value = $values['value'];
  279. if (count($list) == 1 || !$agent->updateProperty($type, $key, $value))
  280. $agent->addProperty($type, $key, $value);
  281. }
  282. }
  283. }
  284. if (count($list) > 1) {
  285. // now go through each agent and check if there are any properties that were not handled, delete them
  286. foreach ($list as $idString) {
  287. $id =$idManager->getId($idString);
  288. $agent =$agentManager->getAgentOrGroup($id);
  289. $properties =$agent->getProperties();
  290. while($properties->hasNext()) {
  291. $property =$properties->next();
  292. $keys = $property->getKeys();
  293. $type =$property->getType();
  294. $typeString = Type::typeToString($type);
  295. while($keys->hasNext()) {
  296. $key = $keys->next();
  297. if (!isset($valuesHandled[$typeString][$key]) || !$valuesHandled[$typeString][$key]) {
  298. $agent->deleteProperty($type, $key);
  299. }
  300. }
  301. }
  302. }
  303. }
  304. // exit(0);
  305. return true;
  306. }
  307. function getReturnUrl() {
  308. $harmoni = Harmoni::instance();
  309. return $harmoni->history->getReturnURL("polyphony/agents/edit_properties");
  310. }
  311.  
  312. /***************************FUNCTIONS***************************************/
  313.  
  314.  
  315. /**
  316. * shows the details of the agent's properties and gives menu of actions
  317. *
  318. * @param object Agent $agent
  319. * @return void
  320. * @access public
  321. * @since 7/19/05
  322. */
  323. function viewAgentDetails($agent){
  324. $agentId =$agent->getId();
  325. $agentIdString = $agentId->getIdString();
  326. //display agent info
  327. print "<h3>Details for User: ".$agent->getDisplayName()."</h3>";
  328. print "<table bgcolor='#AAAAAA' cellspacing='1' cellpadding='3'>
  329. <tr bgcolor='#DDDDDD'>
  330. <td>
  331. Property
  332. </td>
  333. <td>
  334. Value
  335. </td>
  336. <td>
  337. Type
  338. </td>
  339. </tr>";
  340. $propertiesArray = edit_agent_detailsAction::_getUsableProperties($agent);
  341. //show the uneditable list of properties and their types and values
  342. foreach($propertiesArray as $key=>$property){
  343. print "<tr bgcolor='#FFFFFF'>
  344. <td>$key</td>
  345. <td>".$property['value']."</td>
  346. <td>".$property['type']."</td>
  347. </tr>";
  348. }
  349. print "</table>";
  350. //actions menu
  351. $harmoni = Harmoni::instance();
  352. $url =$harmoni->request->mkURL();
  353. print "<h3>Actions</h3>
  354. <ul>
  355. <li><a href='".$url->write("furtherAction","edit_agent_detailsAction::editAgent")."'>Edit agent</a></li>
  356. <li><a href='";
  357. $harmoni->request->startNamespace("polyphony-authorizations");
  358. print $harmoni->request->quickURL("authorization","edit_authorizations",
  359. array("agentId" => $agentId->getIdString()));
  360. $harmoni->request->endNamespace();
  361. print "'>Edit authorizations</a></li>
  362. <li><a href='".$url->write("furtherAction","edit_agent_detailsAction::confirmClearProperties")."'>Clear properties</a></li>
  363. <li><a href='".$url->write("furtherAction","edit_agent_detailsAction::confirmDeleteAgent")."'>Delete agent</a></li>
  364. </ul>";
  365. return;
  366. }
  367. /*
  368. * Offers a confirmation screen for clearing of properties
  369. */
  370. function confirmClearProperties($agent){
  371. $harmoni = Harmoni::instance();
  372. $url =$harmoni->request->mkURL();
  373. print "Do you really want to clear all properties of ".$agent->getDisplayName()."? (this will not reset system name or password)<br />";
  374. print "<form action='".$url->write("furtherAction","edit_agent_detailsAction::clearProperties")."' method='post'><input type='submit' value='Clear' /></form><input type='button' value='Cancel' onclick='history.back()' />";
  375. return;
  376. }
  377. /*
  378. * Clears all the properties
  379. */
  380. function clearProperties($agent){
  381. $propertyManager = Services::getService("Property");
  382. //clear the props
  383. $agent->clearAllProperties();
  384. //back to the menu
  385. viewAgentDetails($agent);
  386. return;
  387. }
  388. /*
  389. * offers a confirmation screen for deleting an entire agent
  390. */
  391. function confirmDeleteAgent($agent){
  392. $harmoni = Harmoni::instance();
  393. $url =$harmoni->request->mkURL();
  394. print "Do you really want to delete ".$agent->getDisplayName()."?<br />";
  395. print "<form action='".$url->write("furtherAction","edit_agent_detailsAction::deleteAgent")."' method='post'><input type='submit' value='Delete' /></form><input type='button' value='Cancel' onclick='history.back()' />";
  396. return;
  397. }
  398. /*
  399. * Handles the actual deletion of an agent
  400. */
  401. function deleteAgent($agent){
  402. $agentManager = Services::getService("Agent");
  403. $agentManager->deleteAgent($agent->getId());
  404. $harmoni = Harmoni::instance();
  405. print "Agent deleted.<br />";
  406. print "<a href='".$harmoni->history->getReturnURL("polyphony/agents/edit_agent_details")."'>Go Back</a>";
  407. return;
  408. }
  409. /*
  410. * displays the screen for editing agents
  411. * Type for new property is arbitrarily set as the type of the agent
  412. * should probably draw from a list of usable types later on.
  413. * Some of these attributes are not "properties" per se and don't have types
  414. * in that case, I've arbitrarily entered "Immutable Reality" under type
  415. */
  416. function editAgent($agent){
  417. //to get the username and maybe the password.
  418. $tokenMappingManager = Services::getService("AgentTokenMappingManager");
  419. //a properties manager to handle, what else, properties
  420. $propertiesManager = Services::getService("Property");
  421. $mappings=$tokenMappingManager->getMappingsForAgentId($agent->getId());
  422. //there should only be one mapping but what the heck
  423. while($mappings->hasNextObject()){
  424. $mapping=$mappings->nextObject();
  425. $tokens =$mapping->getTokens();
  426. $userName=$tokens->getUsername();
  427. }
  428. if (!isset($userName)) { $userName = '&laquo; undefined &raquo;';}
  429. $harmoni = Harmoni::instance();
  430. $url =$harmoni->request->mkURL();
  431. //display name
  432. print "<h3>Editing User: ".$agent->getDisplayName()."</h3>";
  433. print "<table bgcolor='#AAAAAA' cellspacing='1' cellpadding='3'>";
  434. print "<tr bgcolor='#DDDDDD'>
  435. <td>Property</td>
  436. <td>Value</td>
  437. <td>Type</td>
  438. <td>Store new value</td>
  439. <td>Delete property</td>
  440. </tr>";
  441. //username
  442. print "<tr bgcolor='#FFFFFF'>
  443. <td><span style='color:red;'>*</span> User Name</td>
  444. <td>$userName</td>
  445. <td>Immutable Reality</td>
  446. <td>N/A</td>
  447. <td>N/A</td>
  448. </tr>";
  449. // @todo TO DO: Add password editing here. How it's implemented depends strongly on who this interface is for
  450. print "<tr bgcolor='#FFFFFF'>
  451. <td>Password</td>
  452. <td>Stored</td>
  453. <td>Immutable Reality</td>
  454. <td><form><input type='submit' value='Change' /></form></td>
  455. <td>N/A</td>
  456. </tr>";
  457. print "<tr bgcolor='#FFFFFF'>
  458. <form action='".$url->write("furtherAction","edit_agent_detailsAction::updateDisplayName")."' method='post'>
  459. <td>Display name</td>
  460. <td><input type='text' name='".RequestContext::name("display_name")."' value ='".$agent->getDisplayName()."' /></td>
  461. <td>Immutable Reality</td>
  462. <td><input type='submit' value='Change Display Name' /></td>
  463. <td>N/A</td>
  464. </form>
  465. </tr>";
  466. $type=$agent->getType();
  467. $propertiesArray = edit_agent_detailsAction::_getUsableProperties($agent);
  468. foreach($propertiesArray as $key=>$property){
  469. $typeParts = explode("::", $property['type']);
  470. print "<tr bgcolor='#FFFFFF'>
  471. <form action='".$url->write("furtherAction","edit_agent_detailsAction::updateProperty")."' method='post'>
  472. <td><input type='hidden' name='".RequestContext::name("property_name")."' value='$key' />$key</td>
  473. <td><input name='".RequestContext::name('property_value')."' value='{$property['value']}' /></td>
  474. <td>
  475. <input type='hidden' value='{$property['type']}' name='".RequestContext::name("property_type")."' />{$typeParts[2]}
  476. </td>
  477. <td>
  478. <input type='submit' value='Update' />
  479. </td>
  480. </form>
  481. <td>
  482. <form action='".$url->write("furtherAction","edit_agent_detailsAction::deleteProperty")."' method='post'><input type='submit' value='Delete Property' >
  483. <input type='hidden' name='".RequestContext::name("property_type")."' value='{$property['type']}' />
  484. <input type='hidden' name='".RequestContext::name("property_name")."' value='$key' />
  485. </form>
  486. </td>
  487. </tr>";
  488. }
  489. print "<tr bgcolor='#DDDDDD'>
  490. <form action='".$url->write("furtherAction","edit_agent_detailsAction::addProperty")."' method='post'>
  491. <td colspan='5'>
  492. Add New Property
  493. </td>
  494. <tr bgcolor='#FFFFFF'>
  495. <td>
  496. <input type='text' name='".RequestContext::name("name")."' />
  497. </td>
  498. <td>
  499. <input type='text' name='".RequestContext::name("value")."' />
  500. </td>
  501. <td>
  502. <input type='hidden' name='".RequestContext::name("property_type")."' value='".$type->getDomain()."::".$type->getAuthority()."::".$type->getKeyword()."' />
  503. Type
  504. </td>
  505. <td>
  506. <input type='submit' value='Add Property' />
  507. </td>
  508. </form>
  509. <td>
  510. </td>
  511. </tr>";
  512. print "<tr bgcolor='#DDDDDD'>
  513. <td colspan='5' align='right'><a href='".$harmoni->request->quickURL()."'><input type='button' value='Go Back'/></a></td>
  514. </tr>";
  515. print "</table>";
  516. print "<br /><span style='color: red'>*</span> The system name may only be altered by creating a new user.";
  517. return;
  518. }
  519. /**
  520. * Updates property from the edit agent form
  521. */
  522. function updateProperty($agent){
  523. $propertyKey = RequestContext::value("property_name");
  524. $propertyValue = RequestContext::value("property_value");
  525. //break the type so we can create an object
  526. $propertyTypeArray = explode("::",RequestContext::value("property_type"));
  527. //create type object
  528. $propertyType = new HarmoniType($propertyTypeArray[0], $propertyTypeArray[1], $propertyTypeArray[2]);
  529. //update the agent propreties
  530. if($agent->updateProperty($propertyType, $propertyKey, $propertyValue)){
  531. print ucfirst($propertyKey)." updated succesfully.";
  532. }else{
  533. print "Failed to update $propertyKey.";
  534. }
  535. //back to the form
  536. editAgent($agent);
  537. return;
  538. }
  539. /*
  540. * Adds a property to the agent
  541. */
  542. function addProperty($agent){
  543. $propertyName = RequestContext::value('name');
  544. $propertyValue = RequestContext::value('value');
  545. //create the type object
  546. $typeArray = explode("::", RequestContext::value('property_type'));
  547. $type = new HarmoniType($typeArray[0], $typeArray[1], $typeArray[2]);
  548. if($agent->addProperty($type, $propertyName, $propertyValue)){
  549. print ucfirst($propertyName)." added to ".$agent->getDisplayName();
  550. }else{
  551. print "Failed to add property.";
  552. }
  553. //back to the editing form
  554. editAgent($agent);
  555. return;
  556. }
  557. /*
  558. * Deletes a property from the agent. Duh.
  559. */
  560. function deleteProperty($agent){
  561. $propertyName = RequestContext::value('property_name');
  562. $propertyType = explode("::", RequestContext::value('property_type'));
  563. $type = new HarmoniType($propertyType[0], $propertyType[1], $propertyType[2]);
  564. if($agent->deleteProperty($type, $propertyName)){
  565. print "Deleted property.";
  566. }else{
  567. print "Could not delete property.";
  568. }
  569. editAgent($agent);
  570. return;
  571. }
  572. /*
  573. * Stores a new display name for the agent
  574. */
  575. function updateDisplayName($agent){
  576. if(!RequestContext::value('display_name')){
  577. print "If you want to update the display name you'll need to enter a new one!";
  578. editAgent($agent);
  579. return false;
  580. }
  581. if($agent->updateDisplayName(RequestContext::value('display_name'))){
  582. print "Display name changed to ".$agent->getDisplayName();
  583. }else{
  584. print "Failed to change display name.";
  585. }
  586. editAgent($agent);
  587. return;
  588. }
  589. /*
  590. * creates a two dimensional array of key (value/type) pairs,
  591. * preserving most of the information from the object modify at will
  592. */
  593. function _getUsableProperties($agent){
  594. $propertiesArray=array();
  595. $propertiesIterator =$agent->getProperties();
  596. $i=0;
  597. while($propertiesIterator->hasNext()){
  598. $property =$propertiesIterator->next();
  599. $type=$property->getType();
  600. $typeString = $type->getDomain()."::".$type->getAuthority()."::".$type->getKeyword();
  601. $keys =$property->getKeys();
  602. while($keys->hasNext()){
  603. $key=$keys->next();
  604. $propertiesArray[$key]['value'] = $property->getProperty($key);
  605. $propertiesArray[$key]['type'] = $typeString;
  606. }
  607. }
  608. return $propertiesArray;
  609. }
  610. }

Documentation generated on Wed, 19 Sep 2007 10:22:58 -0400 by phpDocumentor 1.3.0RC3