| 13 |
* $Id$ |
* $Id$ |
| 14 |
* |
* |
| 15 |
* $Log$ |
* $Log$ |
| 16 |
|
* Revision 1.2 2004/07/21 12:55:29 joko |
| 17 |
|
* minor fixes regarding some "Notices" from php(5) |
| 18 |
|
* |
| 19 |
* Revision 1.1 2003/04/05 19:53:45 joko |
* Revision 1.1 2003/04/05 19:53:45 joko |
| 20 |
* moved here from ../ |
* moved here from ../ |
| 21 |
* |
* |
| 127 |
} elseif (is_string($from)) { |
} elseif (is_string($from)) { |
| 128 |
$source_type = '__php_function'; |
$source_type = '__php_function'; |
| 129 |
$source_pack = $from; |
$source_pack = $from; |
| 130 |
$target_symbol = $to[php_function]; |
$target_symbol = $to['php_function']; |
| 131 |
|
|
| 132 |
// --- unknown |
// --- unknown |
| 133 |
} else { |
} else { |
| 210 |
function create_stub_function($target_name, $source_class, $source_name) { |
function create_stub_function($target_name, $source_class, $source_name) { |
| 211 |
|
|
| 212 |
static $target_cache; |
static $target_cache; |
| 213 |
|
if (!isset($target_cache)) { $target_cache = array(); } |
| 214 |
|
|
| 215 |
if (!php::class_has_method($source_class, $source_name)) { |
if (!php::class_has_method($source_class, $source_name)) { |
| 216 |
user_error("Exporter::create_stub_function - Error: class '$source_class' does not implement method '$source_name', will skip exporting this symbol."); |
user_error("Exporter::create_stub_function - Error: class '$source_class' does not implement method '$source_name', will skip exporting this symbol."); |
| 218 |
} |
} |
| 219 |
|
|
| 220 |
// prevent redeclarations |
// prevent redeclarations |
| 221 |
if ($target_cache[$target_name]) { |
if (array_key_exists($target_name, $target_cache)) { |
| 222 |
$msg = "Exporter::create_stub_function - Warning: already declared: $target_name"; |
$msg = "Exporter::create_stub_function - Warning: already declared: $target_name"; |
| 223 |
php::append_log($msg, PEAR_LOG_DEBUG); |
php::append_log($msg, PEAR_LOG_DEBUG); |
| 224 |
return 1; |
return 1; |
| 225 |
} else { |
} else { |
| 226 |
$target_cache[$target_name]++; |
$target_cache[$target_name] = 1; |
| 227 |
} |
} |
| 228 |
|
|
| 229 |
//function &$target_name() { return $source_class::$source_name(Exporter::wrap_args(func_get_args())); } |
//function &$target_name() { return $source_class::$source_name(Exporter::wrap_args(func_get_args())); } |