From a4ee5812869c45aeec7bed6bbfeaf60a981209a8 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sat, 17 May 2003 04:59:29 +0000 Subject: [PATCH] Draft 3: * Moved templates to a directory. * Added an initial Umbrello class diagram. * Added an initial xmi2code configuration file. * Added an initial template file for xmi2code. * Moved some functionality from BIFE_Base to a new class: BIFE_Container. * Renamed BIFE_Common to BIFE_Generic and made it extends BIFE_Container. --- bife.xmi | 142 ++++++++++++++++++ index.php | 29 ++-- template.php | 27 ++++ bife_album.html => templates/bife_album.html | 0 .../bife_album_emptyitem.html | 0 .../bife_album_item.html | 0 bife_page.html => templates/bife_page.html | 0 bife_title.html => templates/bife_title.html | 0 xmi2code.config | 22 +++ 9 files changed, 210 insertions(+), 10 deletions(-) create mode 100644 bife.xmi create mode 100644 template.php rename bife_album.html => templates/bife_album.html (100%) rename bife_album_emptyitem.html => templates/bife_album_emptyitem.html (100%) rename bife_album_item.html => templates/bife_album_item.html (100%) rename bife_page.html => templates/bife_page.html (100%) rename bife_title.html => templates/bife_title.html (100%) create mode 100644 xmi2code.config diff --git a/bife.xmi b/bife.xmi new file mode 100644 index 0000000..ca1e6c1 --- /dev/null +++ b/bife.xmi @@ -0,0 +1,142 @@ + + + + + umbrello uml modeller http://uml.sf.net + 1.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/index.php b/index.php index 439ab5f..aabb4e9 100644 --- a/index.php +++ b/index.php @@ -1,12 +1,12 @@ setErrorHandling(PEAR_ERROR_PRINT); $output = ''; @@ -70,24 +70,33 @@ class BIFE_Base { E_USER_ERROR); } - function addContents($contents) { + function process(&$template) { trigger_error('Method not implemented '.get_class($this). '::addContents().', E_USER_ERROR); } - function process(&$template) { +} + +class BIFE_Container extends BIFE_Base { + + function BIFE_Container() { + trigger_error('Can\'t instanciate abstract class BIFE_Container.', + E_USER_ERROR); + } + + function addContents($contents) { trigger_error('Method not implemented '.get_class($this). '::addContents().', E_USER_ERROR); } } -class BIFE_Common extends BIFE_Base { +class BIFE_Generic extends BIFE_Container { var $attrs; var $contents; - function BIFE_Common($attrs) { + function BIFE_Generic($attrs) { $this->attrs = $attrs; $this->contents = ''; } @@ -105,15 +114,15 @@ class BIFE_Common extends BIFE_Base { } -class BIFE_Page extends BIFE_Common { +class BIFE_Page extends BIFE_Generic { function BIFE_Page($attrs) { - $this->BIFE_Common($attrs); + $this->BIFE_Generic($attrs); } } -class BIFE_Title extends BIFE_Common { +class BIFE_Title extends BIFE_Generic { function BIFE_Title($attrs) { - $this->BIFE_Common($attrs); + $this->BIFE_Generic($attrs); } } diff --git a/template.php b/template.php new file mode 100644 index 0000000..3de96f6 --- /dev/null +++ b/template.php @@ -0,0 +1,27 @@ + + + + -- 2.43.0