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 |
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 |
} |
} |
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() { |