| 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 |
|
|
| 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" |
| 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')); |