/[cvs]/nfo/php/libs/org.netfrag.glib/Data/Lift.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/Data/Lift.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by root, Sat Mar 8 20:04:59 2003 UTC revision 1.7 by joko, Fri Apr 18 15:48:00 2003 UTC
# Line 12  Line 12 
12  //    $Id$  //    $Id$
13  //    -------------------------------------------------------------------------  //    -------------------------------------------------------------------------
14  //    $Log$  //    $Log$
15    //    Revision 1.7  2003/04/18 15:48:00  joko
16    //    better error handling: a) croak messages, b) just perform lift module if instance could be created
17    //
18    //    Revision 1.6  2003/03/09 15:49:20  joko
19    //    fix towards optimizing autodocumentation:
20    //    enriched with metadata to tell autodia how to build object-relationships by discarding the fancy namespacing stuff there
21    //
22  //    Revision 1.5  2003/03/08 20:04:59  root  //    Revision 1.5  2003/03/08 20:04:59  root
23  //    + optimized comments for Autodia  //    + optimized comments for Autodia
24  //  //
# Line 62  Line 69 
69   * @link http://www.gnu.org/licenses/lgpl.txt   * @link http://www.gnu.org/licenses/lgpl.txt
70   *   *
71   * @package org.netfrag.glib   * @package org.netfrag.glib
72   * @subpackage Data::Lift   * @subpackage DataLift
73   * @name Data::Lift   * @name Data::Lift
74   *   *
75   * @link http://cvs.netfrag.org/php/libs/org.netfrag.glib   * @link http://cvs.netfrag.org/php/libs/org.netfrag.glib
# Line 142  class Data_Lift { Line 149  class Data_Lift {
149      //print "metatype: " . $this->metatype . "<br>";      //print "metatype: " . $this->metatype . "<br>";
150            
151      if (!$good) {      if (!$good) {
152        print "Data::Lift cannot handle this payload: ";        $msg = "Data::Lift cannot handle this payload: ";
153        print "(vartype=" . $this->vartype . ", metatype=" . $this->metatype . ")<br/>";        $msg .= "[vartype=" . $this->vartype . ", metatype=" . $this->metatype . "]<br/>";
154        print Dumper($this->payload);        $msg .= "payload: '" . Dumper($this->payload) . "'";
155          user_error($msg);
156      }      }
157            
158    }    }
# Line 179  class Data_Lift { Line 187  class Data_Lift {
187      //include($actor_file);      //include($actor_file);
188    
189      /**      /**
190         * <!-- Autodia -->
191       * can do: (this is metadata supplied for Autodia, don't delete!)       * can do: (this is metadata supplied for Autodia, don't delete!)
      *  $this->_actor_instance = new Data_Lift_object_tree_common_PEAR_HTML_TreeMenu()  
192       *  $this->_actor_instance = new Data_Lift_hash_job_html()       *  $this->_actor_instance = new Data_Lift_hash_job_html()
193         *  $this->_actor_instance = new Data_Lift_hash_tree_PEAR_Tree()
194         *  $this->_actor_instance = new Data_Lift_object_tree_common_PEAR_HTML_TreeMenu()
195         *  $this->_actor_instance = new Data_Lift_object_tree_common_PEAR_HTML_TreeMenu_DHTML()
196         *  $this->_actor_instance = new Data_Lift_object_tree_common_PEAR_HTML_TreeMenu_Listbox()
197         *
198       */       */
199    
200      $actor_name = 'Data/Lift/' . join('/', $this->actor);      $actor_name = 'Data/Lift/' . join('/', $this->actor);
201        //$actor_name = 'Data::Lift::' . join('::', $this->actor);
202    
203        //$actor_object = mkObject($actor_name);
204        //return $actor_object->perform($this->payload);
205        
206        // fix [2003-04-13]: just perform if instance good
207        //if ($actor_object = php::mkComponent($actor_name)) {
208      $actor_object = mkObject($actor_name);      $actor_object = mkObject($actor_name);
209      return $actor_object->perform($this->payload);      if (is_object($actor_object) && method_exists($actor_object, 'perform')) {
210          return $actor_object->perform($this->payload);
211        } else {
212          user_error("Data::Lift could not call method 'perform' on actor object. [actor_name='$actor_name']");
213          //return array();
214        }
215        
216    }    }
217    
218    function get() {    function get() {

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.7

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed