From: Leandro Lucarella Date: Sat, 28 Jun 2003 22:09:40 +0000 (+0000) Subject: - Removed Root widget (has no sense with the new auto file including). X-Git-Tag: svn_import~37 X-Git-Url: https://git.llucax.com/software/bife/bife-all.git/commitdiff_plain/8c84fa1ebadd78700189052f216a98a9546edc60 - Removed Root widget (has no sense with the new auto file including). - Removed constructors of some Generic subclasses (not needed). - Updated UML diagrams. - Updated the (mutant :) ROADMAP. - Global Makefile is broken. --- diff --git a/Makefile b/Makefile index 2cf53b3..eab6a5f 100644 --- a/Makefile +++ b/Makefile @@ -28,13 +28,12 @@ VERSION=0.10 PHP_FILES=src/BIFE/*.php META_FILES=xmi2code.config xmi2code.tpl.php Makefile Doxyfile package.xml -DOC_FILES=doc/bife.xmi APIDOC_FILES=doc/api/* doc/api/*/* CORE_FILES=src/BIFE/Widget.php src/BIFE/Container.php src/BIFE/Root.php src/BIFE/Fallback.php src/BIFE/Parser.php X2C_TEMPLATE=xmi2code.tpl.php -code: doc/bife.xmi xmi2code.config - xmi2code -a +code: core/bife.xmi core/xmi2code.config + cd core && xmi2code -a all: code doc pear-packages tarball @@ -43,8 +42,8 @@ doc: api api: Doxyfile $(PHP_FILES) doxygen -clean-code: - find src/ -name '*.bak' | xargs rm -vf +clean-bak: + find -name '*.bak' | xargs rm -vf clean-doc: rm -fvR doc/api/html doc/api/rtf doc/api/latex @@ -53,12 +52,12 @@ clean: clean-doc clean-backup tarball: bife.tar.gz -bife.tar.gz: $(PHP_FILES) $(DOC_FILES) $(META_FILES) +bife.tar.gz: $(PHP_FILES) $(META_FILES) tar --exclude bife.tar.gz --exclude bife/doxygen.warn --exclude .svn --exclude '*.bak' --exclude '*.swp' --exclude 'bife/doc/api/*' -C .. -cvzf bife.tar.gz bife pear-packages: BIFE-$(VERSION).tgz -BIFE-$(VERSION).tgz: $(PHP_FILES) $(DOC_FILES) package.xml +BIFE-$(VERSION).tgz: $(PHP_FILES) package.xml pear package build/BIFE.php: $(CORE_FILES) $(X2C_TEMPLATE) diff --git a/core/BIFE/Fallback.php b/core/BIFE/Fallback.php index 96aef2f..e309825 100644 --- a/core/BIFE/Fallback.php +++ b/core/BIFE/Fallback.php @@ -40,7 +40,7 @@ require_once 'BIFE/Container.php'; class BIFE_Fallback extends BIFE_Container { /** * @var string $name - * @access public + * @access private */ var $name; diff --git a/core/BIFE/Parser.php b/core/BIFE/Parser.php index 83b39a3..76a5845 100644 --- a/core/BIFE/Parser.php +++ b/core/BIFE/Parser.php @@ -36,7 +36,7 @@ class BIFE_Parser { /** * Top level widget. * - * @var BIFE_Root $root + * @var BIFE_Widget $root * @access protected */ var $root = null; @@ -250,7 +250,7 @@ class BIFE_Parser { * * @param string $filename Filename to parse. * - * @return &BIFE_Root + * @return &BIFE_Widget * @access public */ function &parseFile($filename) // ~X2C @@ -290,7 +290,7 @@ class BIFE_Parser { * * @param string $data XML data to parse. * - * @return &BIFE_Root + * @return &BIFE_Widget * @access public */ function &parseString($data) // ~X2C @@ -302,4 +302,4 @@ class BIFE_Parser { } // -X2C Class :Parser -?> +?> \ No newline at end of file diff --git a/core/BIFE/Root.php b/core/BIFE/Root.php deleted file mode 100644 index cc4e74d..0000000 --- a/core/BIFE/Root.php +++ /dev/null @@ -1,105 +0,0 @@ - | -// +--------------------------------------------------------------------+ -// -// $Id$ -// - -// +X2C includes -require_once 'BIFE/Container.php'; -// ~X2C - -// +X2C Class 85 :Root -/** - * Root container class. - * - * @access public - * @abstract - */ -class BIFE_Root extends BIFE_Container { - /** - * Root widget's required files. - * - * @var array $required - * @access protected - */ - var $required = array(); - - // ~X2C - - // +X2C Operation 87 - /** - * Constructor. - * - * @param string $attrs Attributes. - * - * @return void - * @access public - */ - function BIFE_Root($attrs) // ~X2C - { - $this->__construct($attrs); - } - // -X2C - - // +X2C Operation 88 - /** - * Constructor. - * - * @param string $attrs Attributes. - * - * @return void - * @access public - */ - function __construct($attrs) // ~X2C - { - /* - if (@$attrs['USE']) { - foreach (split(':', $attrs['USE']) as $require) { - require_once "BIFE/$require.php"; - $this->required[] = "BIFE/$require.php"; - } - unset($attrs['USE']); - } - */ - parent::__construct($attrs); - } - // -X2C - - // +X2C Operation 150 - /** - * Gets required files. (FIXME - DEPRECATED) - * - * @return array - * @access public - */ - function getRequiredFiles() // ~X2C - { - return $this->required; - } - // -X2C - -} // -X2C Class :Root - -?> diff --git a/core/bife.xmi b/core/bife.xmi index d324b80..7dc0489 100644 --- a/core/bife.xmi +++ b/core/bife.xmi @@ -65,13 +65,13 @@ - + - + - + @@ -87,17 +87,7 @@ - - - - - - - - - - - + @@ -144,9 +134,8 @@ Parse a template appending the results to an internal buffer. If $vars is an arr - - - + + @@ -156,16 +145,10 @@ Parse a template appending the results to an internal buffer. If $vars is an arr - + - - - - - - - - + + @@ -195,7 +178,7 @@ Parse a template appending the results to an internal buffer. If $vars is an arr - + @@ -212,12 +195,6 @@ Parse a template appending the results to an internal buffer. If $vars is an arr - - - - - - diff --git a/doc/ROADMAP b/doc/ROADMAP index 8b4ec37..dd911a3 100644 --- a/doc/ROADMAP +++ b/doc/ROADMAP @@ -3,19 +3,31 @@ $Id$ Version 0.10 ============ - - Add XML file caching (done!). - - Make a way to put all classes in a package together in a single file to - avoid overhead in require_once calls (to be reviewed). - - Make a Core Package with the core classes (Parser, Widget, Container, - Root, Fallback). - - Make a Basic (or Generic?) Package with simple implementations of all - classes in Core Package (Page, Title, Copy, etc). - - Make other more specific Packages (like Album) with other widgets. + - Add XML file caching. [done!] + - Remove Root widget, is has no sense with the new autoincludin method. + [done!] + - Make the proyect modular. [done as a first draft] + - Make a Core module with the core classes (Parser, Widget, Container, + Fallback). [almost done] + - Make a Basic (or Generic?) module with simple implementations of all + classes in Core module (Page, Title, Copy, etc). [almost done] + - Make other more specific modules (like Album) with other widgets. + [almost done] + - Fix bugs: all classes should done the dynamic work in the render() + method or using __sleep() and __wakeup() because of the new cache + capabilities. Version 0.11 ============ + - Start using config file for default widgets attributes. - Separate Album funtionality function from renderer (BIFE_Album). - Use new hooks libs. + +Version 0.12 +============ + - Make a way to put all classes in a package together in a single file to + avoid overhead in require_once calls (to be reviewed). + diff --git a/modules/basic/BIFE/Page.php b/modules/basic/BIFE/Page.php index 0bff2f9..17b3abb 100644 --- a/modules/basic/BIFE/Page.php +++ b/modules/basic/BIFE/Page.php @@ -27,7 +27,7 @@ // // +X2C includes -require_once 'BIFE/Root.php'; +require_once 'BIFE/Generic.php'; // ~X2C // +X2C Class 14 :Page @@ -36,78 +36,9 @@ require_once 'BIFE/Root.php'; * * @access public */ -class BIFE_Page extends BIFE_Root { +class BIFE_Page extends BIFE_Generic { // ~X2C - // +X2C Operation 15 - /** - * Constructor. - * - * @param array $attrs Attributes. - * - * @return void - * @access public - */ - function BIFE_Page($attrs) // ~X2C - { - $this->__construct($attrs); - } - // -X2C - - // +X2C Operation 53 - /** - * Constructor. - * - * @param array $attrs Attributes. - * - * @return void - * @access public - */ - function __construct($attrs) // ~X2C - { - parent::__construct($attrs); - } - // -X2C - - // +X2C Operation 93 - /** - * Adds contents to the container. - * - * @param mixed &$contents Contents to add. - * - * @return void - * @access public - */ - function addContents(&$contents) // ~X2C - { - if (is_string($contents)) { - $contents = trim($contents); - } - if ($contents) { - parent::addContents($contents); - } - } - // -X2C - - // +X2C Operation 90 - /** - * Returns the rendered widget as a string. - * - * @param HTML_Template_HIT &$template Template to use to render the widget. - * - * @return string - * @access public - */ - function render(&$template) // ~X2C - { - $this->attrs['CONTENTS'] = parent::render($template); - $template->setGroup(); - $out = $template->parse('bife_page', $this->attrs); - $template->unsetGroup(); - return $out; - } - // -X2C - } // -X2C Class :Page -?> \ No newline at end of file +?> diff --git a/modules/basic/BIFE/Title.php b/modules/basic/BIFE/Title.php index 6ff15cf..12d6698 100644 --- a/modules/basic/BIFE/Title.php +++ b/modules/basic/BIFE/Title.php @@ -39,36 +39,6 @@ require_once 'BIFE/Generic.php'; class BIFE_Title extends BIFE_Generic { // ~X2C - // +X2C Operation 18 - /** - * Constructor. - * - * @param array $attrs Attributes. - * - * @return void - * @access public - */ - function BIFE_Title($attrs) // ~X2C - { - $this->__construct($attrs); - } - // -X2C - - // +X2C Operation 55 - /** - * Constructor. - * - * @param array $attrs Attributes. - * - * @return void - * @access public - */ - function __construct($attrs) // ~X2C - { - parent::__construct($attrs); - } - // -X2C - } // -X2C Class :Title -?> \ No newline at end of file +?> diff --git a/modules/basic/basic.xmi b/modules/basic/basic.xmi index b1e52f4..7b89433 100644 --- a/modules/basic/basic.xmi +++ b/modules/basic/basic.xmi @@ -27,28 +27,8 @@ x2c:extern" name="Container" static="0" scope="200" /> - - - - - - - - - - - - - - - - - - - - - - + + @@ -64,8 +44,6 @@ x2c:extern" name="Fallback" static="0" scope="200" /> - @@ -83,57 +61,50 @@ x2c:extern" name="HIT" static="0" scope="200" /> - - - - - - - - + + + + + + + - + - - + + - + - - + + - - + + - + - - + + - + - - + + - + - - - - - - - - + + @@ -145,7 +116,6 @@ x2c:extern" name="HIT" static="0" scope="200" /> - @@ -165,16 +135,8 @@ x2c:extern" name="HIT" static="0" scope="200" /> - - - - - - - - - - + +