Source for file interfaces.php

Documentation is available at interfaces.php

  1. <?php
  2.  
  3. /* Interface classes between midcom.application and the component */
  4.  
  5. class midcom_admin_controls_l10n_midcom {
  6.  
  7. function initialize() {
  8.  
  9. require(MIDCOM_ROOT . '/midcom/admin/controls/l10n/main.php');
  10. return true;
  11. }
  12.  
  13.  
  14. function properties() {
  15.  
  16. return array(
  17. MIDCOM_PROP_NAME => "Localization Control",
  18. MIDCOM_PROP_VERSION => "0.1"
  19. );
  20. }
  21.  
  22. } // midcom
  23.  
  24.  
  25.  
  26. class midcom_admin_controls_l10n_component {
  27.  
  28. var $configs;
  29. var $components;
  30.  
  31.  
  32. function configure($configuration, $contextid) {
  33.  
  34. // initalize configuration instance for this context
  35. $tmp = new midcom_helper_configuration($configuration);
  36. if ($tmp === false)
  37. return false;
  38. else {
  39. $this->configs[$contextid] = $tmp;
  40. return true;
  41. }
  42. }
  43.  
  44.  
  45. function can_handle($topic, $argc, $argv, $contextid) {
  46.  
  47. // initialize component instance for this context
  48. $this->components[$contextid] = new midcom_admin_controls_l10n_main
  49. ($topic, $this->configs[$contextid]);
  50. return $this->components[$contextid]->can_handle($argc, $argv);
  51. }
  52.  
  53.  
  54. function handle($topic, $argc, $argv, $contextid) {
  55.  
  56. return $this->components[$contextid]->handle($argc, $argv);
  57. }
  58.  
  59. function errcode($contextid) {
  60.  
  61. return $this->components[$contextid]->errcode;
  62. }
  63.  
  64. function errstr($contextid) {
  65.  
  66. return $this->components[$contextid]->errstr;
  67. }
  68.  
  69.  
  70. function get_metadata ($contextid) {
  71.  
  72. return $this->components[$contextid]->get_metadata ();
  73. }
  74.  
  75.  
  76. function show_content ($contextid) {
  77.  
  78. $this->components[$contextid]->show();
  79. }
  80.  
  81. } // component
  82.  
  83.  
  84.  
  85. class midcom_admin_controls_l10n_nap {
  86.  
  87. var $_current;
  88.  
  89.  
  90. function net_siriux_example_nap() {
  91.  
  92. $this->_current = null;
  93. }
  94.  
  95.  
  96. function is_internal() {
  97.  
  98. return true;
  99. }
  100.  
  101.  
  102. function set_object($object) {
  103.  
  104. $this->_current = $object;
  105. return true;
  106. }
  107.  
  108.  
  109. function get_node() {
  110. return null;
  111. }
  112.  
  113.  
  114. function get_current_leaf() {
  115.  
  116. return false;
  117. }
  118.  
  119.  
  120. function get_leaves() {
  121.  
  122. return array();
  123. }
  124.  
  125. } // nap
  126.  
  127. ?>

Documentation generated on Mon, 21 Nov 2005 18:17:16 +0100 by phpDocumentor 1.3.0RC3