/[cvs]/nfo/php/libs/org.netfrag.glib/Class/Abstract.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/Class/Abstract.php

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

revision 1.1 by joko, Mon Mar 3 21:25:51 2003 UTC revision 1.5 by joko, Sat Apr 5 21:21:44 2003 UTC
# Line 1  Line 1 
1  <?php  <?php
   
2  /**  /**
3   * This file contains the Class::Abstract class.   * This file contains the Class::Abstract class.
4   *   *
5   * @author Andreas Motl <andreas.motl@ilo.de>   * @author Andreas Motl <andreas.motl@ilo.de>
6   * @module Class::Abstract   * @package org.netfrag.glib
7     * @name Class::Abstract
8   *   *
9   */   */
10    
11  /**  /**
12     * <b>Cvs-Log:</b>
13     *
14     * <pre>
15   * $Id$   * $Id$
16   *   *
17   * $Log$   * $Log$
18     * Revision 1.5  2003/04/05 21:21:44  joko
19     * modified debug-/log-message building
20     *
21     * Revision 1.4  2003/03/11 01:10:00  joko
22     * + fixed metadata for phpDocumentor
23     *
24     * Revision 1.3  2003/03/10 23:45:30  joko
25     * + fixed metadata for phpDocumentor
26     *
27     * Revision 1.2  2003/03/05 18:54:43  joko
28     * updated docu - phpDocumentor is very strict about its 'blocks'...
29     *
30   * Revision 1.1  2003/03/03 21:25:51  joko   * Revision 1.1  2003/03/03 21:25:51  joko
31   * + initial commit   * + initial commit
32   *   * </pre>
33   *   *
34   */   */
35    
# Line 26  Line 41 
41   * @copyright (c) 2003 - All Rights reserved.   * @copyright (c) 2003 - All Rights reserved.
42   * @license GNU LGPL (GNU Lesser General Public License)   * @license GNU LGPL (GNU Lesser General Public License)
43   *   *
44   * @author-url http://www.netfrag.org/~joko/   * @link http://www.netfrag.org/~joko/
45   * @license-url http://www.gnu.org/licenses/lgpl.txt   * @link http://www.gnu.org/licenses/lgpl.txt
46   *   *
47   * @package org.netfrag.glib   * @package org.netfrag.glib
48   * @module Class::Abstract   * @subpackage Class
49   *   * @name Class::Abstract
  */  
   
 /**  
  * Todo:  
  *  
  *  o xyz  
  *  o bla, bli, blub  
  *  
  *  
  */  
   
 /**  
  * Load required modules:  
50   *   *
51   */   */
   
52  class Class_Abstract {  class Class_Abstract {
53    
54    // --- "core"    // --- "core"
# Line 61  class Class_Abstract { Line 62  class Class_Abstract {
62            
63      $inheritance_tree = php::get_ancestors_class($this);      $inheritance_tree = php::get_ancestors_class($this);
64      array_push($inheritance_tree, get_class($this));      array_push($inheritance_tree, get_class($this));
     $inheritance_tree_serialized = join(' -> ', $inheritance_tree);  
65            
66      $out = "Base class '$required_by' requires method '$method' to be implemented in inherited class. inheritance_tree: [$inheritance_tree_serialized] (additional info: $message)";      $buf_arr = array();
67        $indent = '';
68        foreach ($inheritance_tree as $class) {
69          array_push($buf_arr, $indent . $class);
70          $indent .= '  ';
71        }
72        $buf = join(' -> ' . "\n", $buf_arr);
73        
74        //$out = "Base class '$required_by' requires method '$method' to be implemented in inherited class. inheritance_tree: [$inheritance_tree_serialized] (additional info: $message)";
75        $out = "<pre>Class '$required_by' requires method '$method' to be implemented.\ninheritance tree: {\n$buf\n}\n(additional info: $message)</pre>";
76      user_error($out);      user_error($out);
77    
78      $this->__call_concrete_methods(array('about', 'usage'));      $this->__call_concrete_methods(array('about', 'usage'));

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

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