]> git.llucax.com Git - software/bife/bife-all.git/commitdiff
Base package is splited (again), so BIFE no longer depends on
authorLeandro Lucarella <llucax@gmail.com>
Sun, 6 Jul 2003 00:45:56 +0000 (00:45 +0000)
committerLeandro Lucarella <llucax@gmail.com>
Sun, 6 Jul 2003 00:45:56 +0000 (00:45 +0000)
HTML_Template_HIT. A new structure in modules is tested.

24 files changed:
base/BIFE/Container.php [new file with mode: 0644]
base/BIFE/Fallback.php [new file with mode: 0644]
base/BIFE/Link.php [new file with mode: 0644]
base/BIFE/Parser.php [new file with mode: 0644]
base/BIFE/Translate.php [new file with mode: 0644]
base/BIFE/Widget.php [new file with mode: 0644]
base/Doxyfile [new file with mode: 0644]
base/Makefile [new file with mode: 0644]
base/README [new file with mode: 0644]
base/ROADMAP [new file with mode: 0644]
base/bife.xmi [new file with mode: 0644]
base/build.xml [new file with mode: 0644]
base/core/HTML/Template/HIT.php [new file with mode: 0644]
base/core/Makefile [new file with mode: 0644]
base/examples/index.php [new file with mode: 0644]
base/examples/index.xbf [new file with mode: 0644]
base/examples/link.xbf [new file with mode: 0644]
base/examples/templates/bife_link.tpl.html [new file with mode: 0644]
base/examples/templates/bife_page.tpl.html [new file with mode: 0644]
base/examples/templates/bife_title.tpl.html [new file with mode: 0644]
base/package.xml [new file with mode: 0644]
base/xmi2code.config [new file with mode: 0644]
base/xmi2code.tpl.php [new file with mode: 0644]
bife/bife.xmi

diff --git a/base/BIFE/Container.php b/base/BIFE/Container.php
new file mode 100644 (file)
index 0000000..2ddc24d
--- /dev/null
@@ -0,0 +1,97 @@
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// |                       BIFE - Buil It FastEr                        |
+// +--------------------------------------------------------------------+
+// | This file is part of BIFE.                                         |
+// |                                                                    |
+// | BIFE is free software; you can redistribute it and/or modify it    |
+// | under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation; either version 2 of the License, or  |
+// | (at your option) any later version.                                |
+// |                                                                    |
+// | BIFE is distributed in the hope that it will be useful, but        |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+// | General Public License for more details.                           |
+// |                                                                    |
+// | You should have received a copy of the GNU General Public License  |
+// | along with Hooks; if not, write to the Free Software Foundation,   |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+// +--------------------------------------------------------------------+
+// | Created: Wed May 17 18:16:54 ART 2003                              |
+// | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+// +X2C includes
+require_once 'BIFE/Widget.php';
+// ~X2C
+
+// +X2C Class 5 :Container
+/**
+ * Base container widget class.
+ *
+ * @access public
+ * @abstract
+ */
+class BIFE_Container extends BIFE_Widget {
+    /**
+     * Widget contents.
+     *
+     * @var    array $contents
+     * @access public
+     */
+    var $contents = array();
+
+    // ~X2C
+
+    // +X2C Operation 6
+    /**
+     * Adds contents to the container.
+     *
+     * @param  mixed &$contents Contents to add to the container.
+     *
+     * @return void
+     * @access public
+     */
+    function addContents(&$contents) // ~X2C
+    {
+        if (is_object($contents)) {
+            $this->contents[] =& $contents;
+        } else {
+            $this->contents[] = $contents;
+        }
+    }
+    // -X2C
+
+    // +X2C Operation 59
+    /**
+     * Renders the widget using a template returning a string with the results.
+     *
+     * @param  HTML_Template_HIT &$template Template object to render the widget.
+     *
+     * @return string
+     * @access public
+     */
+    function renderContents(&$template) // ~X2C
+    {
+        $c = count($this->contents);
+        $o = '';
+        for ($i = 0; $i < $c; $i++) {
+            if (is_object($this->contents[$i])) {
+                $o .= $this->contents[$i]->render($template);
+            } else {
+                $o .= $this->contents[$i];
+            }
+        }
+        return $o;
+    }
+    // -X2C
+
+
+} // -X2C Class :Container
+
+?>
\ No newline at end of file
diff --git a/base/BIFE/Fallback.php b/base/BIFE/Fallback.php
new file mode 100644 (file)
index 0000000..04a11b1
--- /dev/null
@@ -0,0 +1,86 @@
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// |                       BIFE - Buil It FastEr                        |
+// +--------------------------------------------------------------------+
+// | This file is part of BIFE.                                         |
+// |                                                                    |
+// | BIFE is free software; you can redistribute it and/or modify it    |
+// | under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation; either version 2 of the License, or  |
+// | (at your option) any later version.                                |
+// |                                                                    |
+// | BIFE is distributed in the hope that it will be useful, but        |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+// | General Public License for more details.                           |
+// |                                                                    |
+// | You should have received a copy of the GNU General Public License  |
+// | along with Hooks; if not, write to the Free Software Foundation,   |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+// +--------------------------------------------------------------------+
+// | Created: Tue May 20 17:57:56 2003                                  |
+// | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+// +X2C includes
+require_once 'BIFE/Container.php';
+// ~X2C
+
+// +X2C Class 61 :Fallback
+/**
+ * Fallback widget to use when no specific widget is implemented.
+ *
+ * @access public
+ * @abstract
+ */
+class BIFE_Fallback extends BIFE_Container {
+    /**
+     * Name of the widget.
+     *
+     * @var    string $name
+     * @access private
+     */
+    var $name = '';
+
+    // ~X2C
+
+    // +X2C Operation 62
+    /**
+     * Constructor.
+     *
+     * @param  string $name Name of the widget to draw.
+     * @param  array $attrs Attributes.
+     *
+     * @return void
+     * @access public
+     */
+    function BIFE_Fallback($name, $attrs) // ~X2C
+    {
+        $this->__construct($name, $attrs);
+    }
+    // -X2C
+
+    // +X2C Operation 63
+    /**
+     * Constructor.
+     *
+     * @param  string $name Name of the widget.
+     * @param  array $attrs Attributes.
+     *
+     * @return void
+     * @access public
+     */
+    function __construct($name, $attrs) // ~X2C
+    {
+        parent::__construct($attrs);
+        $this->name = strtolower(strtr($name, ':', '_'));
+    }
+    // -X2C
+
+} // -X2C Class :Fallback
+
+?>
\ No newline at end of file
diff --git a/base/BIFE/Link.php b/base/BIFE/Link.php
new file mode 100644 (file)
index 0000000..8204db0
--- /dev/null
@@ -0,0 +1,126 @@
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// |                       BIFE - Buil It FastEr                        |
+// +--------------------------------------------------------------------+
+// | This file is part of BIFE.                                         |
+// |                                                                    |
+// | BIFE is free software; you can redistribute it and/or modify it    |
+// | under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation; either version 2 of the License, or  |
+// | (at your option) any later version.                                |
+// |                                                                    |
+// | BIFE is distributed in the hope that it will be useful, but        |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+// | General Public License for more details.                           |
+// |                                                                    |
+// | You should have received a copy of the GNU General Public License  |
+// | along with Hooks; if not, write to the Free Software Foundation,   |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+// +--------------------------------------------------------------------+
+// | Created: Sun Jun 1 20:00:20 2003                                   |
+// | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+// +X2C includes
+require_once 'BIFE/Container.php';
+// ~X2C
+
+// +X2C Class 110 :Link
+/**
+ * Link to another page.
+ *
+ * @package BIFE
+ * @access public
+ */
+class BIFE_Link extends BIFE_Container {
+    // ~X2C
+
+    // +X2C Operation 111
+    /**
+     * Constructor.
+     *
+     * @param  array $attrs Attributes.
+     *
+     * @return void
+     * @access public
+     */
+    function BIFE_Link($attrs) // ~X2C
+    {
+        $this->__construct($attrs);
+    }
+    // -X2C
+
+    // +X2C Operation 112
+    /**
+     * Constructor.
+     *
+     * @param  array $attrs Attributes.
+     *
+     * @return void
+     * @access public
+     */
+    function __construct($attrs) // ~X2C
+    {
+        $link_attrs['URL']    = $this->getURL($attrs);
+        $link_attrs['DESC']   = @$attrs['DESC'];
+        $link_attrs['TARGET'] = @$attrs['TARGET'];
+        parent::__construct($link_attrs);
+    }
+    // -X2C
+
+    // +X2C Operation 142
+    /**
+     * Gets a URL string based on Link attributes.
+     *
+     * @param  array $attrs Link attributes.
+     *
+     * @return string
+     * @access public
+     */
+    function getURL($attrs) // ~X2C
+    {
+        $url = @$attrs['URL'];
+        unset($attrs['URL']);
+        if (isset($attrs['BIFE'])) {
+            $attrs['DATA-BIFE']  = $attrs['BIFE'];
+            unset($attrs['BIFE']);
+        }
+        $query = array();
+        foreach($attrs as $name => $value) {
+            if (substr($name, 0, 5) === 'DATA-') {
+                if ($name = substr($name, 5)) {
+                    $query[] = urlencode($name) . '=' . urlencode($value);
+                }
+            }
+        }
+        if ($query) {
+            $url .= '?' . join('&', $query);
+        }
+        return $url;
+    }
+    // -X2C
+
+    // +X2C Operation 157
+    /**
+     * Renders the widget.
+     *
+     * @param  HTML_Template_HIT &$template Template to use to render the widget.
+     *
+     * @return string
+     * @access public
+     */
+    function render(&$template) // ~X2C
+    {
+        $this->attrs['CONTENTS'] = $this->renderContents($template);
+        return $template->parse('bife_link', $this->attrs, '', '');
+    }
+    // -X2C
+
+} // -X2C Class :Link
+
+?>
\ No newline at end of file
diff --git a/base/BIFE/Parser.php b/base/BIFE/Parser.php
new file mode 100644 (file)
index 0000000..76a5845
--- /dev/null
@@ -0,0 +1,305 @@
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// |                       BIFE - Buil It FastEr                        |
+// +--------------------------------------------------------------------+
+// | This file is part of BIFE.                                         |
+// |                                                                    |
+// | BIFE is free software; you can redistribute it and/or modify it    |
+// | under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation; either version 2 of the License, or  |
+// | (at your option) any later version.                                |
+// |                                                                    |
+// | BIFE is distributed in the hope that it will be useful, but        |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+// | General Public License for more details.                           |
+// |                                                                    |
+// | You should have received a copy of the GNU General Public License  |
+// | along with Hooks; if not, write to the Free Software Foundation,   |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+// +--------------------------------------------------------------------+
+// | Created: Wed May 17 18:16:54 ART 2003                              |
+// | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+// +X2C Class 25 :Parser
+/**
+ * This is the XML Parser.
+ *
+ * @access public
+ */
+class BIFE_Parser {
+    /**
+     * Top level widget.
+     *
+     * @var    BIFE_Widget $root
+     * @access protected
+     */
+    var $root = null;
+
+    /**
+     * XML parser resource.
+     *
+     * @var    resource $parser
+     * @access protected
+     */
+    var $parser = null;
+
+    /**
+     * BIFE widgets stack.
+     *
+     * @var    array $stack
+     * @access protected
+     */
+    var $stack = array();
+
+    /**
+     * Fallback class to use in case that a widget class is not found.
+     *
+     * @var    string $fallback
+     * @access protected
+     */
+    var $fallback = '';
+
+    /**
+     * XML cache directory. Empty if no cahching must be done (for current dir use '.').
+     *
+     * @var    string $cache
+     * @access protected
+     */
+    var $cache = '/tmp';
+
+    /**
+     * Files required by the parsed XML file.
+     *
+     * @var    array $requires
+     * @access protected
+     */
+    var $requires = array();
+
+    // ~X2C
+
+    // +X2C Operation 30
+    /**
+     * Constructor.
+     *
+     * @param  string $fallback Fallback class name (none if empty).
+     * @param  string $cache XML cache directory. Empty is no caching will be done.
+     *
+     * @return void
+     * @access public
+     */
+    function BIFE_Parser($fallback = '', $cache = '/tmp') // ~X2C
+    {
+        $this->__construct($fallback, $cache);
+    }
+    // -X2C
+
+    // +X2C Operation 31
+    /**
+     * Constructor.
+     *
+     * @param  string $fallback Fallback class name (none if empty).
+     * @param  string $cache XML cache directory. Empty is no caching will be done.
+     *
+     * @return void
+     * @access public
+     */
+    function __construct($fallback = '', $cache = '/tmp') // ~X2C
+    {
+        $this->parser   = xml_parser_create();
+        $this->fallback = $fallback;
+        $this->cache    = $cache;
+        xml_set_object($this->parser, $this);
+        xml_set_element_handler($this->parser, 'startElement', 'endElement');
+        xml_set_character_data_handler($this->parser, 'characterData');
+    }
+    // -X2C
+
+    // +X2C Operation 32
+    /**
+     * Destructor.
+     *
+     * @return void
+     * @access public
+     */
+    function __destruct() // ~X2C
+    {
+        xml_parser_free($this->parser);
+    }
+    // -X2C
+
+    // +X2C Operation 33
+    /**
+     * XML parser start of element handler.
+     *
+     * @param  resource $parser XML parser resource.
+     * @param  string $name XML tag name.
+     * @param  array $attrs XML tag attributes.
+     *
+     * @return void
+     * @access public
+     */
+    function startElement($parser, $name, $attrs) // ~X2C
+    {
+        $class = 'bife_' . strtolower(strtr($name, ':', '_'));
+        if (!class_exists($class)) {
+            $inc = 'BIFE/' .
+                strtr(ucwords(strtr(strtolower($name), ':', ' ')), ' ', '/') .
+                '.php';
+            if (@include_once $inc) {
+                $this->includes[] = $inc;
+            }
+        }
+        if (class_exists($class)) {
+            $obj =& new $class($attrs);
+            // XXX - Does this check make sense?
+            if (!is_a($obj, 'bife_widget')) {
+                trigger_error("Class '$class' is not a BIFE_Widget.", E_USER_WARNING);
+            }
+            $this->stack[] =& $obj;
+        } else {
+            if ($this->fallback) {
+                $class = $this->fallback;
+                $obj =& new $class($name, $attrs);
+                if (!is_a($obj, 'bife_fallback')) {
+                    trigger_error("Class '$class' is not a BIFE_Fallback.", E_USER_WARNING);
+                }
+                $this->stack[] =& $obj;
+            } else {
+                trigger_error("Class not found '$class'.", E_USER_ERROR);
+            }
+        }
+    }
+    // -X2C
+
+    // +X2C Operation 34
+    /**
+     * XML parser end of element handler.
+     *
+     * @param  resource $parser XML parser resource.
+     * @param  string $name XML tag name.
+     *
+     * @return void
+     * @access public
+     */
+    function endElement($parser, $name) // ~X2C
+    {
+        end($this->stack);
+        $current =& $this->stack[key($this->stack)];
+        array_pop($this->stack);
+        end($this->stack);
+        $parent =& $this->stack[key($this->stack)];
+        if ($parent) {
+            $parent->addContents($current);
+        } else {
+            $this->root =& $current;
+        }
+    }
+    // -X2C
+
+    // +X2C Operation 35
+    /**
+     * XML parser character data handler.
+     *
+     * @param  resource $parser XML parser resource.
+     * @param  string $data XML character data.
+     *
+     * @return void
+     * @access public
+     */
+    function characterData($parser, $data) // ~X2C
+    {
+        end($this->stack);
+        $current =& $this->stack[key($this->stack)];
+        $current->addContents($data);
+    }
+    // -X2C
+
+    // +X2C Operation 36
+    /**
+     * Parse a string with XML data.
+     *
+     * @param  string $data XML string to parse.
+     * @param  bool $final Indicates if is the last string to parse.
+     *
+     * @return void
+     * @access public
+     */
+    function parse($data, $final = true) // ~X2C
+    {
+        if (!xml_parse($this->parser, $data, $final)) {
+            trigger_error(
+                sprintf('XML error: %s at line %d.',
+                    xml_error_string(xml_get_error_code($this->parser)),
+                    xml_get_current_line_number($this->parser)
+                ),
+                E_USER_WARNING
+            );
+        }
+    }
+    // -X2C
+
+    // +X2C Operation 37
+    /**
+     * Parse a XML file with a complete and valid XML document.
+     *
+     * @param  string $filename Filename to parse.
+     *
+     * @return &BIFE_Widget
+     * @access public
+     */
+    function &parseFile($filename) // ~X2C
+    {
+        if ($this->cache) {
+            $cache = $this->cache . '/' . 'bife_parser_cache' . strtr(realpath($filename), '/', '_');
+            if (@filemtime($cache) > @filemtime($filename)) {
+                $file = file($cache);
+                foreach(unserialize(trim(array_shift($file))) as $required) {
+                    include_once $required;
+                }
+                return unserialize(join('', $file));
+            }
+        }
+        if ($fp = @fopen($filename, 'r')) {
+            while ($data = fread($fp, 4096)) {
+                $this->parse($data, feof($fp));
+            }
+        } else {
+            trigger_error("Could not open BIFE XML input file '$filename'.",
+                E_USER_WARNING);
+        }
+        fclose($fp);
+        if ($this->cache) {
+            $fp = fopen($cache, 'w');
+            fputs($fp, serialize($this->includes) . "\n");
+            fputs($fp, serialize($this->root));
+            fclose($fp);
+        }
+        return $this->root;
+    }
+    // -X2C
+
+    // +X2C Operation 74
+    /**
+     * Parse a XML string with a complete and valid XML document.
+     *
+     * @param  string $data XML data to parse.
+     *
+     * @return &BIFE_Widget
+     * @access public
+     */
+    function &parseString($data) // ~X2C
+    {
+        $this->parse($data, true);
+        return $this->root;
+    }
+    // -X2C
+
+} // -X2C Class :Parser
+
+?>
\ No newline at end of file
diff --git a/base/BIFE/Translate.php b/base/BIFE/Translate.php
new file mode 100644 (file)
index 0000000..4c1fe05
--- /dev/null
@@ -0,0 +1,77 @@
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// |                       BIFE - Buil It FastEr                        |
+// +--------------------------------------------------------------------+
+// | This file is part of BIFE.                                         |
+// |                                                                    |
+// | BIFE is free software; you can redistribute it and/or modify it    |
+// | under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation; either version 2 of the License, or  |
+// | (at your option) any later version.                                |
+// |                                                                    |
+// | BIFE is distributed in the hope that it will be useful, but        |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+// | General Public License for more details.                           |
+// |                                                                    |
+// | You should have received a copy of the GNU General Public License  |
+// | along with Hooks; if not, write to the Free Software Foundation,   |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+// +--------------------------------------------------------------------+
+// | Created: Wed May 17 18:16:54 ART 2003                              |
+// | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+// +X2C includes
+require_once 'BIFE/Fallback.php';
+// ~X2C
+
+// +X2C Class 7 :Translate
+/**
+ * This is a generic and simple (but very usefull) BIFE_Fallback implementation. Translate widgets using a template with it's name, prepended with 'bife_'. If not template is found, it copy the XML to the output.
+ *
+ * @package BIFE
+ * @access public
+ */
+class BIFE_Translate extends BIFE_Fallback {
+    // ~X2C
+
+    // +X2C Operation 12
+    /**
+     * Renders the widget.
+     *
+     * @param  HTML_Template_HIT &$template Template to use to render the widget.
+     *
+     * @return string
+     * @access public
+     */
+    function render(&$template) // ~X2C
+    {
+        $name = "bife_{$this->name}";
+        if ($template->exists($name, '')) {
+            $this->attrs['CONTENTS'] = $this->renderContents($template);
+            $out = $template->parse($name, $this->attrs, '', '');
+        } else {
+            $name = $this->name;
+            $out = "<$name";
+            foreach ($this->attrs as $attr => $val) {
+                $out .= sprintf(' %s="%s"', $attr, $val);
+            }
+            $contents = $this->renderContents($template);
+            if ($contents !== '') {
+                $out .= ">$contents</$name>";
+            } else {
+                $out .= "/>";
+            }
+        }
+        return $out;
+    }
+    // -X2C
+
+} // -X2C Class :Translate
+
+?>
\ No newline at end of file
diff --git a/base/BIFE/Widget.php b/base/BIFE/Widget.php
new file mode 100644 (file)
index 0000000..5e0ab11
--- /dev/null
@@ -0,0 +1,96 @@
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// |                       BIFE - Buil It FastEr                        |
+// +--------------------------------------------------------------------+
+// | This file is part of BIFE.                                         |
+// |                                                                    |
+// | BIFE is free software; you can redistribute it and/or modify it    |
+// | under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation; either version 2 of the License, or  |
+// | (at your option) any later version.                                |
+// |                                                                    |
+// | BIFE is distributed in the hope that it will be useful, but        |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+// | General Public License for more details.                           |
+// |                                                                    |
+// | You should have received a copy of the GNU General Public License  |
+// | along with Hooks; if not, write to the Free Software Foundation,   |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+// +--------------------------------------------------------------------+
+// | Created: Wed May 17 18:16:54 ART 2003                              |
+// | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+// +X2C Class 3 :Widget
+/**
+ * Base widget class.
+ *
+ * @access public
+ * @abstract
+ */
+class BIFE_Widget {
+    /**
+     * Attribute list.
+     *
+     * @var    array $attrs
+     * @access protected
+     */
+    var $attrs = array();
+
+    // ~X2C
+
+    // +X2C Operation 126
+    /**
+     * Constructor.
+     *
+     * @param  array $attrs Attributes.
+     *
+     * @return void
+     * @access public
+     */
+    function BIFE_Widget($attrs) // ~X2C
+    {
+        $this->__construct($attrs);
+    }
+    // -X2C
+
+    // +X2C Operation 127
+    /**
+     * Constructor.
+     *
+     * @param  array $attrs Attributes.
+     *
+     * @return void
+     * @access public
+     */
+    function __construct($attrs) // ~X2C
+    {
+        $this->attrs = $attrs;
+    }
+    // -X2C
+
+    // +X2C Operation 4
+    /**
+     * Renders the widget using a template returning a string with the results.
+     *
+     * @param  HTML_Template_HIT &$template Template object to render the widget.
+     *
+     * @return string
+     * @access public
+     * @abstract
+     */
+    function render(&$template) // ~X2C
+    {
+        trigger_error('Method not implemented '.get_class($this).
+            '::render().', E_USER_ERROR);
+    }
+    // -X2C
+
+} // -X2C Class :Widget
+
+?>
\ No newline at end of file
diff --git a/base/Doxyfile b/base/Doxyfile
new file mode 100644 (file)
index 0000000..caed41f
--- /dev/null
@@ -0,0 +1,227 @@
+# vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+# +--------------------------------------------------------------------+
+# |                       BIFE - Buil It FastEr                        |
+# +--------------------------------------------------------------------+
+# | This file is part of BIFE.                                         |
+# |                                                                    |
+# | BIFE is free software; you can redistribute it and/or modify it    |
+# | under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation; either version 2 of the License, or  |
+# | (at your option) any later version.                                |
+# |                                                                    |
+# | BIFE is distributed in the hope that it will be useful, but        |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+# | General Public License for more details.                           |
+# |                                                                    |
+# | You should have received a copy of the GNU General Public License  |
+# | along with Hooks; if not, write to the Free Software Foundation,   |
+# | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+# +--------------------------------------------------------------------+
+# | Created: Mon May 19 00:16:56 ART 2003                              |
+# | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+# +--------------------------------------------------------------------+
+#
+# $Id$
+#
+
+# Doxyfile 1.3-rc3
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = "BIFE - Build It FastEr"
+PROJECT_NUMBER         = 0.11
+OUTPUT_DIRECTORY       = api
+OUTPUT_LANGUAGE        = English
+EXTRACT_ALL            = YES
+EXTRACT_PRIVATE        = YES
+EXTRACT_STATIC         = YES
+EXTRACT_LOCAL_CLASSES  = YES
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ALWAYS_DETAILED_SEC    = YES
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = NO
+STRIP_FROM_PATH        = 
+INTERNAL_DOCS          = YES
+CASE_SENSE_NAMES       = YES
+SHORT_NAMES            = NO
+HIDE_SCOPE_NAMES       = NO
+VERBATIM_HEADERS       = YES
+SHOW_INCLUDE_FILES     = YES
+JAVADOC_AUTOBRIEF      = YES
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = NO
+INHERIT_DOCS           = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+DISTRIBUTE_GROUP_DOC   = NO
+TAB_SIZE               = 8
+GENERATE_TODOLIST      = YES
+GENERATE_TESTLIST      = YES
+GENERATE_BUGLIST       = YES
+GENERATE_DEPRECATEDLIST= YES
+ALIASES                = 
+ENABLED_SECTIONS       = 
+MAX_INITIALIZER_LINES  = 30
+OPTIMIZE_OUTPUT_FOR_C  = NO
+OPTIMIZE_OUTPUT_JAVA   = NO
+SHOW_USED_FILES        = YES
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           = doxygen.warn
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = 
+FILE_PATTERNS          = *.php
+RECURSIVE              = YES
+EXCLUDE                = 
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       = 
+EXAMPLE_PATH           = 
+EXAMPLE_PATTERNS       = 
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = 
+INPUT_FILTER           = 
+FILTER_SOURCE_FILES    = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = YES
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION    = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = YES
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          = 
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = YES
+HTML_OUTPUT            = html
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            = 
+HTML_FOOTER            = 
+HTML_STYLESHEET        = 
+HTML_ALIGN_MEMBERS     = YES
+GENERATE_HTMLHELP      = NO
+CHM_FILE               = 
+HHC_LOCATION           = 
+GENERATE_CHI           = NO
+BINARY_TOC             = NO
+TOC_EXPAND             = NO
+DISABLE_INDEX          = NO
+ENUM_VALUES_PER_LINE   = 4
+GENERATE_TREEVIEW      = YES
+TREEVIEW_WIDTH         = 200
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = NO
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         = 
+LATEX_HEADER           = 
+PDF_HYPERLINKS         = YES
+USE_PDFLATEX           = NO
+LATEX_BATCHMODE        = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = NO
+RTF_OUTPUT             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = YES
+RTF_STYLESHEET_FILE    = 
+RTF_EXTENSIONS_FILE    = 
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = NO
+XML_SCHEMA             = 
+XML_DTD                = 
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX = 
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = NO
+EXPAND_ONLY_PREDEF     = NO
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           = 
+INCLUDE_FILE_PATTERNS  = 
+PREDEFINED             = 
+EXPAND_AS_DEFINED      = 
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references   
+#---------------------------------------------------------------------------
+TAGFILES               = 
+GENERATE_TAGFILE       = 
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = YES
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = YES
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+TEMPLATE_RELATIONS     = YES
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+GRAPHICAL_HIERARCHY    = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               = 
+DOTFILE_DIRS           = 
+MAX_DOT_GRAPH_WIDTH    = 1024
+MAX_DOT_GRAPH_HEIGHT   = 1024
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine   
+#---------------------------------------------------------------------------
+SEARCHENGINE           = NO
+CGI_NAME               = search.cgi
+CGI_URL                = 
+DOC_URL                = 
+DOC_ABSPATH            = 
+BIN_ABSPATH            = /usr/local/bin/
+EXT_DOC_PATHS          = 
diff --git a/base/Makefile b/base/Makefile
new file mode 100644 (file)
index 0000000..4bfa3e5
--- /dev/null
@@ -0,0 +1,65 @@
+# vim: set noexpandtab tabstop=4 softtabstop=4 shiftwidth=4:
+# +--------------------------------------------------------------------+
+# |                       BIFE - Buil It FastEr                        |
+# +--------------------------------------------------------------------+
+# | This file is part of BIFE.                                         |
+# |                                                                    |
+# | BIFE is free software; you can redistribute it and/or modify it    |
+# | under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation; either version 2 of the License, or  |
+# | (at your option) any later version.                                |
+# |                                                                    |
+# | BIFE is distributed in the hope that it will be useful, but        |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+# | General Public License for more details.                           |
+# |                                                                    |
+# | You should have received a copy of the GNU General Public License  |
+# | along with Hooks; if not, write to the Free Software Foundation,   |
+# | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+# +--------------------------------------------------------------------+
+# | Created: Mon May 19 00:16:56 ART 2003                              |
+# | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+# +--------------------------------------------------------------------+
+#
+# $Id$
+#
+
+VERSION=0.11
+MODULE_FILE=BIFE.php
+MODULE_NAME=Core
+PHP_FILES=$(filter-out $(MODULE_FILE),$(subst ./,,$(shell find -name '*.php')))
+EXAMPLE_FILES=$(subst ./,,$(shell find examples -regex '.*\.svn.*'))
+DOC_FILES=README ROADMAP
+X2C_TEMPLATE=xmi2code.tpl.php
+
+package: package.xml $(PHP_FILES) $(EXAMPLE_FILES) $(DOC_FILES)
+       pear package
+
+code: bife.xmi xmi2code.config
+       @xmi2code
+
+code-clean:
+       @find -name '*.bak' | xargs rm -vf
+
+$(MODULE_FILE): code $(PHP_FILES) $(X2C_TEMPLATE)
+       @( \
+               ( \
+                       cat $(X2C_TEMPLATE) | \
+                       grep -v '@@date' | \
+                       grep -v '$$Id' | \
+                       egrep -v '^//$$' \
+               ); \
+               echo '//'; \
+               echo -n '// BIFE $(MODULE_NAME) (version $(VERSION)) - '; \
+               date; \
+               echo '//'; \
+               ( \
+                       cat $(PHP_FILES) | \
+                       grep -v require_once | \
+                       grep -v '?>' | \
+                       grep -v '<?php' | \
+                       egrep -v '^\s*//' \
+               ); \
+               echo -n '?>' \
+       ) > $(MODULE_FILE)
diff --git a/base/README b/base/README
new file mode 100644 (file)
index 0000000..13737e0
--- /dev/null
@@ -0,0 +1,6 @@
+$Id$
+
+This is a basic implementation of BIFE to make a simple website or to use it
+to make more complex widgets.
+
+There's a tentative roadmap in ROADMAP.
diff --git a/base/ROADMAP b/base/ROADMAP
new file mode 100644 (file)
index 0000000..801d858
--- /dev/null
@@ -0,0 +1,21 @@
+$Id$
+
+
+Version 0.12
+============
+
+    - Look if using $_SERVER['PATH_INFO'] in Link is viable.
+
+
+Version 0.13
+============
+
+    - Start using config file for default widgets attributes.
+
+...
+
+Version 0.x
+============
+    - 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/base/bife.xmi b/base/bife.xmi
new file mode 100644 (file)
index 0000000..bdf7124
--- /dev/null
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMI xmlns:UML="org.omg/standards/UML" verified="false" timestamp="" xmi.version="1.2" >
+ <XMI.header>
+  <XMI.documentation>
+   <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
+   <XMI.exporterVersion>1.1</XMI.exporterVersion>
+  </XMI.documentation>
+  <XMI.model xmi.name="bife" href="/home/luca/website/www/test/bife/base/bife.xmi" />
+  <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
+ </XMI.header>
+ <XMI.content>
+  <docsettings viewid="2" documentation="Parse XML data getting widgets." uniqueid="159" />
+  <umlobjects>
+   <UML:Class stereotype="" package="BIFE" xmi.id="5" abstract="1" documentation="Base container widget class." name="Container" static="0" scope="200" />
+   <UML:Class stereotype="" package="BIFE" xmi.id="61" abstract="1" documentation="Fallback widget to use when no specific widget is implemented." name="Fallback" static="0" scope="200" />
+   <UML:Class stereotype="" package="BIFE" xmi.id="7" abstract="0" documentation="This is a generic and simple (but very usefull) BIFE_Fallback implementation. Translate widgets using a template with it's name, prepended with 'bife_'. If not template is found, it copy the XML to the output." name="Translate" static="0" scope="200" >
+    <UML:Operation stereotype="" package="" xmi.id="12" type="string" abstract="0" documentation="Renders the widget." name="render" static="0" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&amp;HTML_Template_HIT" abstract="0" documentation="Template to use to render the widget." name="template" static="0" scope="200" />
+    </UML:Operation>
+   </UML:Class>
+   <UML:Class stereotype="" package="BIFE" xmi.id="110" abstract="0" documentation="Link to another page." name="Link" static="0" scope="200" >
+    <UML:Operation stereotype="" package="" xmi.id="111" type="void" abstract="0" documentation="Constructor." name="BIFE_Link" static="0" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
+    </UML:Operation>
+    <UML:Operation stereotype="" package="" xmi.id="112" type="void" abstract="0" documentation="Constructor." name="__construct" static="0" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
+    </UML:Operation>
+    <UML:Operation stereotype="" package="" xmi.id="142" type="string" abstract="0" documentation="Gets a URL string based on Link attributes." name="getURL" static="0" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Link attributes." name="attrs" static="0" scope="200" />
+    </UML:Operation>
+    <UML:Operation stereotype="" package="" xmi.id="157" type="string" abstract="0" documentation="Renders the widget." name="render" static="0" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&amp;HTML_Template_HIT" abstract="0" documentation="Template to use to render the widget." name="template" static="0" scope="200" />
+    </UML:Operation>
+   </UML:Class>
+  </umlobjects>
+  <diagrams>
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="1" showopsig="0" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="2" documentation="" type="402" showops="1" showpackage="1" name="Basic Classes" localid="30000" showstereotype="0" showscope="1" font="Helvetica,9,-1,5,48,0,0,0,0,0" linecolor="#ff0000" >
+    <widgets>
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="106" showattsigs="600" usesdiagramusefillcolour="0" x="82" linecolour="#ff0000" y="11" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="25" usefillcolor="1" showattributes="0" xmi.id="5" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="97" showattsigs="601" usesdiagramusefillcolour="0" x="15" linecolour="#ff0000" y="90" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="25" usefillcolor="1" showattributes="0" xmi.id="61" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="1" width="107" showattsigs="601" usesdiagramusefillcolour="1" x="152" linecolour="none" y="89" showopsigs="600" usesdiagramlinecolour="1" fillcolour="none" height="82" usefillcolor="1" showattributes="1" xmi.id="110" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="1" width="104" showattsigs="601" usesdiagramusefillcolour="1" x="11" linecolour="none" y="150" showopsigs="600" usesdiagramlinecolour="1" fillcolour="none" height="37" usefillcolor="1" showattributes="1" xmi.id="7" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+    </widgets>
+    <messages/>
+    <associations>
+     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="5" widgetaid="61" documentation="" type="500" >
+      <linepath>
+       <startpoint startx="63" starty="90" />
+       <endpoint endx="117" endy="36" />
+      </linepath>
+     </UML:AssocWidget>
+     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="5" widgetaid="110" documentation="" type="500" >
+      <linepath>
+       <startpoint startx="205" starty="89" />
+       <endpoint endx="152" endy="36" />
+      </linepath>
+     </UML:AssocWidget>
+     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="61" widgetaid="7" documentation="" type="500" >
+      <linepath>
+       <startpoint startx="63" starty="150" />
+       <endpoint endx="63" endy="115" />
+      </linepath>
+     </UML:AssocWidget>
+    </associations>
+   </diagram>
+  </diagrams>
+  <listview>
+   <listitem open="1" type="800" id="-1" label="Views" >
+    <listitem open="1" type="801" id="-1" label="Logical View" >
+     <listitem open="1" type="803" id="-1" label="BIFE" >
+      <listitem open="0" type="807" id="2" label="Basic Classes" />
+      <listitem open="0" type="813" id="5" label="Container" />
+      <listitem open="0" type="813" id="61" label="Fallback" />
+      <listitem open="0" type="813" id="110" label="Link" >
+       <listitem open="0" type="815" id="111" label="BIFE_Link" />
+       <listitem open="0" type="815" id="112" label="__construct" />
+       <listitem open="0" type="815" id="142" label="getURL" />
+       <listitem open="0" type="815" id="157" label="render" />
+      </listitem>
+      <listitem open="0" type="813" id="7" label="Translate" >
+       <listitem open="0" type="815" id="12" label="render" />
+      </listitem>
+     </listitem>
+    </listitem>
+    <listitem open="1" type="802" id="-1" label="Use Case View" />
+   </listitem>
+  </listview>
+ </XMI.content>
+</XMI>
diff --git a/base/build.xml b/base/build.xml
new file mode 100644 (file)
index 0000000..5a6d0a5
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<project name="BIFE" default="dist" basedir=".">
+
+    <property name="poner directorio build en propiedad"/>
+
+    <fileset dir="src/BIFE" id="files.src.core">
+        <include name="Parser.php"/>
+        <include name="Widget.php"/>
+        <include name="Container.php"/>
+        <include name="Fallback.php"/>
+        <include name="Root.php"/>
+    </fileset>
+
+    <fileset dir="build/BIFE" id="files.build.core">
+        <include name="Parser.php"/>
+        <include name="Widget.php"/>
+        <include name="Container.php"/>
+        <include name="Fallback.php"/>
+        <include name="Root.php"/>
+    </fileset>
+
+    <target name="prepare">
+        <echo msg="Preparing build..."/>
+        <mkdir dir="build/BIFE"/>
+    </target>
+
+    <target name="build" depends="prepare">
+        <echo msg="Building..."/>
+        <copy todir="build/BIFE">
+            <fileset refid="files.src.core"/>
+        </copy>
+        <chmod mode="644">
+            <fileset refid="files.build.core"/>
+        </chmod>
+    </target>
+    <target name="dist" depends="build">
+        <echo msg="Creating archive..."/>
+        <tar name="bife.tar.gz" usegzip="true">
+            <fileset dir="build">
+                <include name="**/**"/>
+            </fileset>
+        </tar>
+    </target>
+    <target name="clean">
+        <echo msg="Cleaning up..."/>
+        <delete file="build"/>
+    </target>
+
+</project>
diff --git a/base/core/HTML/Template/HIT.php b/base/core/HTML/Template/HIT.php
new file mode 100644 (file)
index 0000000..2b635c9
--- /dev/null
@@ -0,0 +1,265 @@
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// |                       BIFE - Buil It FastEr                        |
+// +--------------------------------------------------------------------+
+// | This file is part of BIFE.                                         |
+// |                                                                    |
+// | BIFE is free software; you can redistribute it and/or modify it    |
+// | under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation; either version 2 of the License, or  |
+// | (at your option) any later version.                                |
+// |                                                                    |
+// | BIFE is distributed in the hope that it will be useful, but        |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+// | General Public License for more details.                           |
+// |                                                                    |
+// | You should have received a copy of the GNU General Public License  |
+// | along with Hooks; if not, write to the Free Software Foundation,   |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+// +--------------------------------------------------------------------+
+// | Created: Wed Jun 17 19:03:14 2003                                  |
+// | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+// +X2C Class 130 :HIT
+/**
+ * Hooks vs. IT (HIT) is a simple template implementation, based on hooks and IT template systems.
+ *
+ * @access public
+ */
+class HTML_Template_HIT {
+    /**
+     * Root directory where template files are.
+     *
+     * @var    string $root
+     * @access public
+     */
+    var $root = '.';
+
+    /**
+     * If it's true, it looks for template files in PHP's include_path.
+     *
+     * @var    bool $useIncludePath
+     * @access public
+     */
+    var $useIncludePath = false;
+
+    /**
+     * Group of templates to use (a subdirectory in root).
+     *
+     * @var    string $group
+     * @access protected
+     */
+    var $group = '';
+
+    /**
+     * Templates cache.
+     *
+     * @var    array $cache
+     * @access protected
+     */
+    var $cache = array();
+
+    /**
+     * @var    array $buffer
+     * @access protected
+     */
+    var $buffer = array();
+
+    // ~X2C
+
+    // +X2C Operation 136
+    /**
+     * Constructor.
+     *
+     * @param  string $root Root directory where template files are.
+     * @param  bool $useIncludePath If it's true, it looks for template files in PHP's include_path.
+     * @param  string $group Group of templates to use (a subdirectory in root).
+     *
+     * @return void
+     * @access public
+     */
+    function HTML_Template_HIT($root = '.', $useIncludePath = false, $group = '') // ~X2C
+    {
+        $this->__construct($root, $useIncludePath, $group);
+    }
+    // -X2C
+
+    // +X2C Operation 137
+    /**
+     * Constructor.
+     *
+     * @param  int $root Root directory where template files are.
+     * @param  false $useIncludePath If it's true, it looks for template files in PHP's include_path.
+     * @param  string $group Group of templates to use (a subdirectory in root).
+     *
+     * @return void
+     * @access public
+     */
+    function __construct($root = '.', $useIncludePath = false, $group = '') // ~X2C
+    {
+        $this->root = $root;
+        $this->useIncludePath = $useIncludePath;
+        $this->pushGroup($group);
+    }
+    // -X2C
+
+    // +X2C Operation 138
+    /**
+     * Parse a template returning the results.
+If $vars is an array, the {[keys]} are replaced with [values] ($val is ignored). If is a string, {$vars} is replaced with $val.
+     *
+     * @param  string $name Name of template to parse.
+     * @param  mixed $vars Variables to replace in the template.
+     * @param  string $val If $vars is a string, the value to replace for $vars.
+     * @param  mixed $group Group to use to parse this template. Null to use the current group.
+     *
+     * @return string
+     * @access public
+     */
+    function parse($name, $vars = '', $val = '', $group = null) // ~X2C
+    {
+        $group = is_null($group) ? end($this->group) : $group;
+        if ($group) {
+            $file = "{$this->root}/$group/$name.tpl.html";
+        } else {
+            $file = "{$this->root}/$name.tpl.html";
+        }
+        if (!isset($this->cache[$file])) {
+            // FIXME - replace join(file()) with file_get_contents().
+            $this->cache[$file] = join('', file($file, $this->useIncludePath));
+        }
+        if ($vars) {
+            if (is_string($vars)) {
+                $vars = array($vars => $val);
+            }
+            foreach ($vars as $key => $val) {
+                $keys[] = '{' . $key . '}';
+                $vals[] = $val;
+            }
+            return str_replace($keys, $vals, $this->cache[$file]);
+        } else {
+            return $this->cache[$file];
+        }
+    }
+    // -X2C
+
+    // +X2C Operation 144
+    /**
+     * Parse a template buffering the results.
+Parse a template appending the results to an internal buffer. If $vars is an array, the {[keys]} are replaced with [values] ($val is ignored). If is a string, {$vars} is replaced with $val.
+     *
+     * @param  string $name Name of template to parse.
+     * @param  mixed $vars Variables to replace in the template.
+     * @param  string $val If $vars is a string, the value to replace for $vars.
+     *
+     * @return void
+     * @access public
+     */
+    function parseBuffered($name, $vars = '', $val = '') // ~X2C
+    {
+        @$this->buffer["{$this->group}/$name"] .= $this->parse($name, $vars, $val);
+    }
+    // -X2C
+
+    // +X2C Operation 145
+    /**
+     * Gets a parsed buffer.
+     *
+     * @param  string $name Name of the parsed template to get.
+     *
+     * @return string
+     * @access public
+     * @static
+     */
+    function getBuffer($name) // ~X2C
+    {
+        return @$this->buffer["{$this->group}/$name"];
+    }
+    // -X2C
+
+    // +X2C Operation 146
+    /**
+     * Gets a parsed buffer and removes it.
+     *
+     * @param  string $name Name of the buffer to flush.
+     *
+     * @return void
+     * @access public
+     */
+    function popBuffer($name) // ~X2C
+    {
+        $return = @$this->buffer["{$this->group}/$name"];
+        unset($this->buffer["{$this->group}/$name"]);
+        return $return;
+    }
+    // -X2C
+
+    // +X2C Operation 139
+    /**
+     * Sets the group to use and add it to the groups stack.
+     *
+     * @param  string $group Group to use.
+     *
+     * @return void
+     * @access public
+     */
+    function pushGroup($group = '') // ~X2C
+    {
+        $this->group[] = $group;
+    }
+    // -X2C
+
+    // +X2C Operation 140
+    /**
+     * Removes the group from the groups stack and returns to the previous used group.
+     *
+     * @return string
+     * @access public
+     */
+    function popGroup() // ~X2C
+    {
+        return array_pop($this->group);
+    }
+    // -X2C
+
+    // +X2C Operation 159
+    /**
+     * True if the template $name exists in $group (or the current group).
+     *
+     * @param  string $name Name of the template.
+     * @param  mixed $group Template's group. If it's null it uses the current group.
+     *
+     * @return bool
+     * @access public
+     */
+    function exists($name, $group = null) // ~X2C
+    {
+        $group = is_null($group) ? end($this->group) : $group;
+        if ($group) {
+            $file = "{$this->root}/$group/$name.tpl.html";
+        } else {
+            $file = "{$this->root}/$name.tpl.html";
+        }
+        if (!$this->useIncludePath) {
+            return is_readable($file);
+        } else {
+            $include_path = array_unique(preg_split('/[:;]/', ini_get('include_path')));
+            foreach ($include_path as $path) {
+                if (is_readable("$path/$file")) {
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+    // -X2C
+
+} // -X2C Class :HIT
+
+?>
\ No newline at end of file
diff --git a/base/core/Makefile b/base/core/Makefile
new file mode 100644 (file)
index 0000000..ed9979c
--- /dev/null
@@ -0,0 +1,62 @@
+# vim: set noexpandtab tabstop=4 softtabstop=4 shiftwidth=4:
+# +--------------------------------------------------------------------+
+# |                       BIFE - Buil It FastEr                        |
+# +--------------------------------------------------------------------+
+# | This file is part of BIFE.                                         |
+# |                                                                    |
+# | BIFE is free software; you can redistribute it and/or modify it    |
+# | under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation; either version 2 of the License, or  |
+# | (at your option) any later version.                                |
+# |                                                                    |
+# | BIFE is distributed in the hope that it will be useful, but        |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+# | General Public License for more details.                           |
+# |                                                                    |
+# | You should have received a copy of the GNU General Public License  |
+# | along with Hooks; if not, write to the Free Software Foundation,   |
+# | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+# +--------------------------------------------------------------------+
+# | Created: Mon May 19 00:16:56 ART 2003                              |
+# | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+# +--------------------------------------------------------------------+
+#
+# $Id$
+#
+
+VERSION=0.10
+MODULE_FILE=BIFE.php
+MODULE_NAME=Core
+PHP_FILES=$(filter-out $(MODULE_FILE),$(subst ./,,$(shell find -name '*.php')))
+X2C_TEMPLATE=../xmi2code.tpl.php
+
+all: $(MODULE_FILE)
+
+code: bife.xmi xmi2code.config
+       @xmi2code
+
+code-clean:
+       @find -name '*.bak' | xargs rm -vf
+
+$(MODULE_FILE): code $(PHP_FILES) $(X2C_TEMPLATE)
+       @( \
+               ( \
+                       cat $(X2C_TEMPLATE) | \
+                       grep -v '@@date' | \
+                       grep -v '$$Id' | \
+                       egrep -v '^//$$' \
+               ); \
+               echo '//'; \
+               echo -n '// BIFE $(MODULE_NAME) (version $(VERSION)) - '; \
+               date; \
+               echo '//'; \
+               ( \
+                       cat $(PHP_FILES) | \
+                       grep -v require_once | \
+                       grep -v '?>' | \
+                       grep -v '<?php' | \
+                       egrep -v '^\s*//' \
+               ); \
+               echo -n '?>' \
+       ) > $(MODULE_FILE)
diff --git a/base/examples/index.php b/base/examples/index.php
new file mode 100644 (file)
index 0000000..c38ac9c
--- /dev/null
@@ -0,0 +1,48 @@
+<?
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// |                       BIFE - Buil It FastEr                        |
+// +--------------------------------------------------------------------+
+// | This file is part of BIFE.                                         |
+// |                                                                    |
+// | BIFE is free software; you can redistribute it and/or modify it    |
+// | under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation; either version 2 of the License, or  |
+// | (at your option) any later version.                                |
+// |                                                                    |
+// | BIFE is distributed in the hope that it will be useful, but        |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+// | General Public License for more details.                           |
+// |                                                                    |
+// | You should have received a copy of the GNU General Public License  |
+// | along with Hooks; if not, write to the Free Software Foundation,   |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+// +--------------------------------------------------------------------+
+// | Created: Wed May 17 18:16:54 ART 2003                              |
+// | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+$tmp = ini_get('include_path');
+ini_set('include_path', "..:$tmp");
+unset($tmp);
+umask('002');
+
+require_once 'HTML/Template/HIT.php';
+require_once 'BIFE/Parser.php';
+require_once 'BIFE/Translate.php';
+
+$file = isset($_REQUEST['BIFE']) ? $_REQUEST['BIFE'] : 'index.xbf';
+#$file = isset($_SERVER['PATH_INFO']) ? ".{$_SERVER['PATH_INFO']}" : 'index.xbf';
+
+$template =& new HTML_Template_HIT('templates');
+
+$parser =& new BIFE_Parser('BIFE_Translate');
+$page =& $parser->parseFile($file);
+$parser->__destruct();
+echo $page->render($template);
+
+?>
diff --git a/base/examples/index.xbf b/base/examples/index.xbf
new file mode 100644 (file)
index 0000000..df29c36
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Page title="Hello world!">
+    <Title>BIFE is working!</Title>
+    <H3>Translate Fallback is working too!</H3>
+    <P>This is a very bad use for BIFE, because I'm writing HTML :-P</P>
+    <Title>A little of 'real' use</Title>
+    <P>Here's a <Link bife="link.xbf">link</Link> to another BIFE file</P>
+    <HR color="blue" size="30"/>
+</Page>
diff --git a/base/examples/link.xbf b/base/examples/link.xbf
new file mode 100644 (file)
index 0000000..1eaa4a9
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Page title="Hi again!">
+    <Title>BIFE Links are working too!</Title>
+    <P>Go <Link bife="index.xbf">back</Link>.</P>
+</Page>
diff --git a/base/examples/templates/bife_link.tpl.html b/base/examples/templates/bife_link.tpl.html
new file mode 100644 (file)
index 0000000..873ba85
--- /dev/null
@@ -0,0 +1 @@
+<A href="{URL}" title="{DESC}">{CONTENTS}</A>
diff --git a/base/examples/templates/bife_page.tpl.html b/base/examples/templates/bife_page.tpl.html
new file mode 100644 (file)
index 0000000..ea824f4
--- /dev/null
@@ -0,0 +1,9 @@
+<HTML>
+    <HEAD>
+        <TITLE>{TITLE}</TITLE>
+    </HEAD>
+    <BODY>
+        <H1>{TITLE}</H1>
+        {CONTENTS}
+    </BODY>
+</HTML>
diff --git a/base/examples/templates/bife_title.tpl.html b/base/examples/templates/bife_title.tpl.html
new file mode 100644 (file)
index 0000000..3590da3
--- /dev/null
@@ -0,0 +1 @@
+<H2>{CONTENTS}</H2>
diff --git a/base/package.xml b/base/package.xml
new file mode 100644 (file)
index 0000000..3cfff25
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE package SYSTEM "/usr/share/doc/pear/data/PEAR/package.dtd">
+<package version="1.0">
+    <name>BIFE_Base</name>
+    <summary>BIFE's basic implementation to make a simple website</summary>
+    <description>BIFE Base (tbd) <!-- TODO -->
+    </description>
+    <license>GPL</license>
+    <maintainers>
+        <maintainer>
+            <user>luca</user>
+            <name>Leandro Lucarella</name>
+            <email>luca@lugmen.org.ar</email>
+            <role>lead</role>
+        </maintainer>
+    </maintainers>
+
+    <release>
+        <version>1.0.0beta1</version>
+        <date>2003-06-29</date>
+        <state>beta</state>
+        <notes>Check http://bife.llucax.hn.org/ for details.</notes>
+        <provides type="class" name="BIFE_Link"/>
+        <provides type="class" name="BIFE_Translate"/>
+        <filelist>
+            <!-- PHP -->
+            <file role="php">BIFE/Link.php</file>
+            <file role="php">BIFE/Translate.php</file>
+            <!-- DOC -->
+            <file role="doc">README</file>
+            <file role="doc">ROADMAP</file>
+            <file role="doc">examples/index.php</file>
+            <file role="doc">examples/index.xbf</file>
+            <file role="doc">examples/templates/bife_page.tpl.html</file>
+            <file role="doc">examples/templates/bife_title.tpl.html</file>
+            <file role="doc">examples/templates/bife_link.tpl.html</file>
+        </filelist>
+    </release>
+    <deps>
+        <dep type="php" rel="ge">4.2.3</dep>
+        <dep type="pkg" rel="ge" version="1.0.0beta1">BIFE</dep>
+        <dep type="pkg" rel="ge" version="1.0.0beta1">HTML_Template_HIT</dep>
+    </deps>
+</package>
diff --git a/base/xmi2code.config b/base/xmi2code.config
new file mode 100644 (file)
index 0000000..7540819
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+ ! **********************************************************************
+ ! *                       BIFE - Buil It FastEr                        *
+ ! **********************************************************************
+ ! * This file is part of BIFE.                                         *
+ ! *                                                                    *
+ ! * BIFE is free software; you can redistribute it and/or modify it    *
+ ! * under the terms of the GNU General Public License as published by  *
+ ! * the Free Software Foundation; either version 2 of the License, or  *
+ ! * (at your option) any later version.                                *
+ ! *                                                                    *
+ ! * BIFE is distributed in the hope that it will be useful, but        *
+ ! * WITHOUT ANY WARRANTY; without even the implied warranty of         *
+ ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
+ ! * General Public License for more details.                           *
+ ! *                                                                    *
+ ! * You should have received a copy of the GNU General Public License  *
+ ! * along with Hooks; if not, write to the Free Software Foundation,   *
+ ! * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      *
+ ! **********************************************************************
+ ! * Created: Mon May 19 00:16:56 ART 2003                              *
+ ! * Authors: Leandro Lucarella <luca@lugmen.org.ar>                    *
+ ! *********************************************************************+
+ ! 
+ ! $Id$
+ ! 
+ !-->
+
+<xmi2code>
+  <option key="target" value="*"/>
+  <option key="xmi-input" value="base.xmi"/>
+  <option key="config-file" value="xmi2code.config"/>
+  <option key="config-file-set" value="false"/>
+  <option key="handler" value="umbrello"/>
+  <option key="generator-path" value="."/>
+  <option key="use-package-as-dir" value="true"/>
+  <option key="indent" value="    "/>
+  <option key="files-case" value="preserve"/>
+  <option key="generator" value="php.pear"/>
+  <option key="template-path" value="."/>
+  <option key="php.template" value="xmi2code.tpl.php"/>
+  <option key="php.default-code" value="trigger_error('Not implemented!', E_USER_WARNING);"/>
+  <option key="php.pear.use-package-in-classnames" value="true"/>
+  <option key="php.pear.underscore-in-nonpublic" value="false"/>
+</xmi2code>
diff --git a/base/xmi2code.tpl.php b/base/xmi2code.tpl.php
new file mode 100644 (file)
index 0000000..ce8775b
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// |                       BIFE - Buil It FastEr                        |
+// +--------------------------------------------------------------------+
+// | This file is part of BIFE.                                         |
+// |                                                                    |
+// | BIFE is free software; you can redistribute it and/or modify it    |
+// | under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation; either version 2 of the License, or  |
+// | (at your option) any later version.                                |
+// |                                                                    |
+// | BIFE is distributed in the hope that it will be useful, but        |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+// | General Public License for more details.                           |
+// |                                                                    |
+// | You should have received a copy of the GNU General Public License  |
+// | along with Hooks; if not, write to the Free Software Foundation,   |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+// +--------------------------------------------------------------------+
+// | Created: @@date                                  |
+// | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
index 13594f00e5c896f03b89f90552d91c0c2a99a105..dd94c30f25cc14827e2bd9ea43dd3706dbb94063 100644 (file)
@@ -5,7 +5,7 @@
    <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
    <XMI.exporterVersion>1.1</XMI.exporterVersion>
   </XMI.documentation>
-  <XMI.model xmi.name="bife" href="/home/luca/bife/bife/bife.xmi" />
+  <XMI.model xmi.name="bife" href="/home/luca/website/www/test/bife/bife/bife.xmi" />
   <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
  </XMI.header>
  <XMI.content>
     </UML:Operation>
     <UML:Attribute stereotype="" package="" xmi.id="129" value="''" type="string" abstract="0" documentation="Name of the widget." name="name" static="0" scope="201" />
    </UML:Class>
-   <UML:Class stereotype="" package="BIFE" xmi.id="7" abstract="0" documentation="This is a generic and simple (but very usefull) BIFE_Fallback implementation. Translate widgets using a template with it's name, prepended with 'bife_'. If not template is found, it copy the XML to the output." name="Translate" static="0" scope="200" >
-    <UML:Operation stereotype="" package="" xmi.id="12" type="string" abstract="0" documentation="Renders the widget." name="render" static="0" scope="200" >
-     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&amp;HTML_Template_HIT" abstract="0" documentation="Template to use to render the widget." name="template" static="0" scope="200" />
-    </UML:Operation>
-   </UML:Class>
-   <UML:Class stereotype="" package="BIFE" xmi.id="110" abstract="0" documentation="Link to another page." name="Link" static="0" scope="200" >
-    <UML:Operation stereotype="" package="" xmi.id="111" type="void" abstract="0" documentation="Constructor." name="BIFE_Link" static="0" scope="200" >
-     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
-    </UML:Operation>
-    <UML:Operation stereotype="" package="" xmi.id="112" type="void" abstract="0" documentation="Constructor." name="__construct" static="0" scope="200" >
-     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
-    </UML:Operation>
-    <UML:Operation stereotype="" package="" xmi.id="142" type="string" abstract="0" documentation="Gets a URL string based on Link attributes." name="getURL" static="0" scope="200" >
-     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Link attributes." name="attrs" static="0" scope="200" />
-    </UML:Operation>
-    <UML:Operation stereotype="" package="" xmi.id="157" type="string" abstract="0" documentation="Renders the widget." name="render" static="0" scope="200" >
-     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&amp;HTML_Template_HIT" abstract="0" documentation="Template to use to render the widget." name="template" static="0" scope="200" />
-    </UML:Operation>
-   </UML:Class>
   </umlobjects>
   <diagrams>
    <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="1" showopsig="0" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="2" documentation="" type="402" showops="1" showpackage="1" name="Core Classes" localid="30000" showstereotype="0" showscope="1" font="Helvetica,9,-1,5,48,0,0,0,0,0" linecolor="#ff0000" >
     <widgets>
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="148" showattsigs="601" usesdiagramusefillcolour="0" x="232" linecolour="#ff0000" y="50" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="75" usefillcolor="1" showattributes="1" xmi.id="3" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="173" showattsigs="601" usesdiagramusefillcolour="0" x="220" linecolour="#ff0000" y="170" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="60" usefillcolor="1" showattributes="1" xmi.id="5" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="123" showattsigs="601" usesdiagramusefillcolour="0" x="156" linecolour="#ff0000" y="290" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="60" usefillcolor="1" showattributes="1" xmi.id="61" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="171" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="10" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="240" usefillcolor="1" showattributes="1" xmi.id="25" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="1" width="107" showattsigs="601" usesdiagramusefillcolour="1" x="342" linecolour="none" y="290" showopsigs="600" usesdiagramlinecolour="1" fillcolour="none" height="82" usefillcolor="1" showattributes="1" xmi.id="110" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="1" width="104" showattsigs="601" usesdiagramusefillcolour="1" x="165" linecolour="none" y="390" showopsigs="600" usesdiagramlinecolour="1" fillcolour="none" height="37" usefillcolor="1" showattributes="1" xmi.id="7" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="148" showattsigs="601" usesdiagramusefillcolour="0" x="238" linecolour="#ff0000" y="19" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="75" usefillcolor="1" showattributes="1" xmi.id="3" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="173" showattsigs="601" usesdiagramusefillcolour="0" x="226" linecolour="#ff0000" y="139" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="60" usefillcolor="1" showattributes="1" xmi.id="5" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="123" showattsigs="601" usesdiagramusefillcolour="0" x="251" linecolour="#ff0000" y="242" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="60" usefillcolor="1" showattributes="1" xmi.id="61" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="171" showattsigs="601" usesdiagramusefillcolour="0" x="20" linecolour="#ff0000" y="19" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="240" usefillcolor="1" showattributes="1" xmi.id="25" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
     </widgets>
     <messages/>
     <associations>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="3" widgetaid="5" documentation="" type="500" >
       <linepath>
-       <startpoint startx="306" starty="170" />
-       <endpoint endx="306" endy="125" />
+       <startpoint startx="312" starty="139" />
+       <endpoint endx="312" endy="94" />
       </linepath>
      </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="5" widgetaid="61" documentation="" type="500" >
+     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="5" widgetaid="61" documentation="" type="500" >
       <linepath>
-       <startpoint startx="217" starty="290" />
-       <endpoint endx="277" endy="230" />
-      </linepath>
-     </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="5" widgetaid="110" documentation="" type="500" >
-      <linepath>
-       <startpoint startx="395" starty="290" />
-       <endpoint endx="335" endy="230" />
-      </linepath>
-     </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="61" widgetaid="7" documentation="" type="500" >
-      <linepath>
-       <startpoint startx="217" starty="390" />
-       <endpoint endx="217" endy="350" />
+       <startpoint startx="312" starty="242" />
+       <endpoint endx="312" endy="199" />
       </linepath>
      </UML:AssocWidget>
     </associations>
        <listitem open="0" type="815" id="63" label="__construct" />
        <listitem open="0" type="814" id="129" label="name" />
       </listitem>
-      <listitem open="0" type="813" id="110" label="Link" >
-       <listitem open="0" type="815" id="111" label="BIFE_Link" />
-       <listitem open="0" type="815" id="112" label="__construct" />
-       <listitem open="0" type="815" id="142" label="getURL" />
-       <listitem open="0" type="815" id="157" label="render" />
-      </listitem>
       <listitem open="0" type="813" id="25" label="Parser" >
        <listitem open="0" type="815" id="30" label="BIFE_Parser" />
        <listitem open="0" type="815" id="31" label="__construct" />
        <listitem open="0" type="814" id="29" label="stack" />
        <listitem open="0" type="815" id="33" label="startElement" />
       </listitem>
-      <listitem open="0" type="813" id="7" label="Translate" >
-       <listitem open="0" type="815" id="12" label="render" />
-      </listitem>
       <listitem open="0" type="813" id="3" label="Widget" >
        <listitem open="0" type="815" id="126" label="BIFE_Widget" />
        <listitem open="0" type="815" id="127" label="__construct" />