--- /dev/null
+<?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/llucar/public_html/bife/bife.xmi" />
+ <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
+ </XMI.header>
+ <XMI.content>
+ <docsettings viewid="2" documentation="" uniqueid="24" />
+ <umlobjects>
+ <UML:Class stereotype="" package="BIFE" xmi.id="3" abstract="1" documentation="Base widget class." name="Widget" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="4" type="void" abstract="1" documentation="Renders the widget returning a string.
+
+Renders the widget using a template returning a string with the
+results." name="render" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&HTML_Template_Sigma" abstract="0" documentation="Template object to render the widget." name="template" static="0" scope="200" />
+ </UML:Operation>
+ </UML:Class>
+ <UML:Class stereotype="" package="BIFE" xmi.id="5" abstract="1" documentation="Base container widget class.
+
+This is a widget that can contain data (and other widgets too)." name="Container" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="6" type="void" abstract="1" documentation="Adds contents to the container." name="addContents" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="Contents to add to the container." name="contents" static="0" scope="200" />
+ </UML:Operation>
+ </UML:Class>
+ <UML:Class stereotype="" package="BIFE" xmi.id="7" abstract="1" documentation="This is a generic and simple BIFE_Container implementation." name="Generic" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="10" type="void" abstract="0" documentation="Constructor." name="BIFE_Generic" 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="11" type="void" abstract="0" documentation="Add contents to the widget." name="addContents" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="Contents to add." name="contents" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="12" type="void" abstract="0" documentation="Renders the widget." name="render" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&HTML_Template_Sigma" abstract="0" documentation="Template to use to render the widget." name="template" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Attribute stereotype="" package="" xmi.id="8" value="" type="array" abstract="0" documentation="Attribute list." name="attrs" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="9" value="" type="string" abstract="0" documentation="" name="contents" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="BIFE" xmi.id="14" abstract="0" documentation="Page widget." name="Page" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="15" type="void" abstract="0" documentation="Constructor." name="BIFE_Page" 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:Class>
+ <UML:Class stereotype="" package="BIFE" xmi.id="17" abstract="0" documentation="Title widget." name="Title" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="18" type="void" abstract="0" documentation="Constructor." name="BIFE_Title" 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:Class>
+ <UML:Class stereotype="" package="BIFE" xmi.id="20" abstract="0" documentation="Photo album widget.
+
+[TODO: Make a better explanation]" name="Album" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="22" type="void" abstract="0" documentation="Constructor." name="BIFE_Album" 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="23" type="void" abstract="0" documentation="Renders the widget." name="render" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&HTML_Template_Sigma" abstract="0" documentation="Template to use to render the widget." name="template" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Attribute stereotype="" package="" xmi.id="21" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="201" />
+ </UML:Class>
+ </umlobjects>
+ <diagrams>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="1" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="2" documentation="" type="402" showops="1" showpackage="1" name="class diagram" localid="30000" showstereotype="0" showscope="1" font="Helvetica,10,-1,5,48,0,0,0,0,0" linecolor="#ff0000" >
+ <widgets>
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="104" showattsigs="601" usesdiagramusefillcolour="0" x="170" linecolour="#ff0000" y="70" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="3" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="123" showattsigs="601" usesdiagramusefillcolour="0" x="83" linecolour="#ff0000" y="160" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="5" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="109" showattsigs="601" usesdiagramusefillcolour="0" x="90" linecolour="#ff0000" y="260" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="7" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="90" showattsigs="601" usesdiagramusefillcolour="0" x="30" linecolour="#ff0000" y="360" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="14" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="84" showattsigs="601" usesdiagramusefillcolour="0" x="170" linecolour="#ff0000" y="360" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="17" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="98" showattsigs="601" usesdiagramusefillcolour="0" x="250" linecolour="#ff0000" y="160" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="20" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+ </widgets>
+ <messages/>
+ <associations>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="3" widgetaid="5" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="144" starty="160" />
+ <endpoint endx="204" endy="98" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="5" widgetaid="7" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="144" starty="260" />
+ <endpoint endx="144" endy="188" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="7" widgetaid="14" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="75" starty="360" />
+ <endpoint endx="126" endy="288" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="7" widgetaid="17" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="212" starty="360" />
+ <endpoint endx="162" endy="288" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="3" widgetaid="20" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="299" starty="160" />
+ <endpoint endx="239" endy="98" />
+ </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="0" type="813" id="20" label="Album" >
+ <listitem open="0" type="815" id="22" label="BIFE_Album" />
+ <listitem open="0" type="814" id="21" label="attrs" />
+ <listitem open="0" type="815" id="23" label="render" />
+ </listitem>
+ <listitem open="0" type="813" id="5" label="Container" >
+ <listitem open="0" type="815" id="6" label="addContents" />
+ </listitem>
+ <listitem open="0" type="813" id="7" label="Generic" >
+ <listitem open="0" type="815" id="10" label="BIFE_Generic" />
+ <listitem open="0" type="815" id="11" label="addContents" />
+ <listitem open="0" type="814" id="8" label="attrs" />
+ <listitem open="0" type="814" id="9" label="contents" />
+ <listitem open="0" type="815" id="12" label="render" />
+ </listitem>
+ <listitem open="0" type="813" id="14" label="Page" >
+ <listitem open="0" type="815" id="15" label="BIFE_Page" />
+ </listitem>
+ <listitem open="0" type="813" id="17" label="Title" >
+ <listitem open="0" type="815" id="18" label="BIFE_Title" />
+ </listitem>
+ <listitem open="0" type="813" id="3" label="Widget" >
+ <listitem open="0" type="815" id="4" label="render" />
+ </listitem>
+ <listitem open="0" type="807" id="2" label="class diagram" />
+ </listitem>
+ <listitem open="1" type="802" id="-1" label="Use Case View" />
+ </listitem>
+ </listview>
+ </XMI.content>
+</XMI>
<?
-// BIFE: Build It FastEr - draft 2
+// BIFE: Build It FastEr - draft 4
require_once 'HTML/Template/Sigma.php';
require_once 'Album.php';
$file = "simple.xml";
-$template =& new HTML_Template_Sigma('.');
+$template =& new HTML_Template_Sigma('templates');
$template->setErrorHandling(PEAR_ERROR_PRINT);
$output = '';
E_USER_ERROR);
}
- function addContents($contents) {
+ function process(&$template) {
trigger_error('Method not implemented '.get_class($this).
'::addContents().', E_USER_ERROR);
}
- function process(&$template) {
+}
+
+class BIFE_Container extends BIFE_Base {
+
+ function BIFE_Container() {
+ trigger_error('Can\'t instanciate abstract class BIFE_Container.',
+ E_USER_ERROR);
+ }
+
+ function addContents($contents) {
trigger_error('Method not implemented '.get_class($this).
'::addContents().', E_USER_ERROR);
}
}
-class BIFE_Common extends BIFE_Base {
+class BIFE_Generic extends BIFE_Container {
var $attrs;
var $contents;
- function BIFE_Common($attrs) {
+ function BIFE_Generic($attrs) {
$this->attrs = $attrs;
$this->contents = '';
}
}
-class BIFE_Page extends BIFE_Common {
+class BIFE_Page extends BIFE_Generic {
function BIFE_Page($attrs) {
- $this->BIFE_Common($attrs);
+ $this->BIFE_Generic($attrs);
}
}
-class BIFE_Title extends BIFE_Common {
+class BIFE_Title extends BIFE_Generic {
function BIFE_Title($attrs) {
- $this->BIFE_Common($attrs);
+ $this->BIFE_Generic($attrs);
}
}