/[cvs]/nfo/php/libs/org.netfrag.glib/utils/Exporter.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/utils/Exporter.php

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

revision 1.1 by joko, Sat Apr 5 19:53:45 2003 UTC revision 1.2 by joko, Wed Jul 21 12:55:29 2004 UTC
# Line 13  Line 13 
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   *   *
# Line 124  class Exporter { Line 127  class Exporter {
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 {
# Line 207  class Exporter { Line 210  class Exporter {
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.");
# Line 214  class Exporter { Line 218  class Exporter {
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())); }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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