/[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.6 by joko, Sun Mar 9 15:49:20 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  //    Revision 1.6  2003/03/09 15:49:20  joko
19  //    fix towards optimizing autodocumentation:  //    fix towards optimizing autodocumentation:
20  //    enriched with metadata to tell autodia how to build object-relationships by discarding the fancy namespacing stuff there  //    enriched with metadata to tell autodia how to build object-relationships by discarding the fancy namespacing stuff there
# Line 146  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 194  class Data_Lift { Line 198  class Data_Lift {
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.6  
changed lines
  Added in v.1.7

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