]> git.llucax.com Git - software/bife/bife-all.git/commitdiff
- Added a Root class that manages 'use' attribute to make require_once calls.
authorLeandro Lucarella <llucax@gmail.com>
Fri, 23 May 2003 15:55:06 +0000 (15:55 +0000)
committerLeandro Lucarella <llucax@gmail.com>
Fri, 23 May 2003 15:55:06 +0000 (15:55 +0000)
- Now Page is a subclass of Root.
- Fixed protected and private methods and attributes in UML diagram (and
  inline documentation) using xmi2code new option.
- Removed include_once calls from the Parser.

Doxyfile
doc/ROADMAP
doc/bife.xmi
examples/index.php
examples/simple.xbf
src/BIFE/Copy.php
src/BIFE/Generic.php
src/BIFE/Page.php
src/BIFE/Parser.php
src/BIFE/Root.php [new file with mode: 0644]
xmi2code.config

index 8206aa3add0eae59b5ae904a45b740cf8cca3254..c1720c30a509301c313e08daf8668851c931e878 100644 (file)
--- a/Doxyfile
+++ b/Doxyfile
@@ -30,7 +30,7 @@
 # General configuration options
 #---------------------------------------------------------------------------
 PROJECT_NAME           = "BIFE - Build It FastEr"
-PROJECT_NUMBER         = 0.6
+PROJECT_NUMBER         = 0.8
 OUTPUT_DIRECTORY       = doc/api
 OUTPUT_LANGUAGE        = English
 EXTRACT_ALL            = YES
index c1e042c31e9bbb8530b17068b5c81d46c0d01b10..c5d13955f2bad6ad2fc80de17def42dbdef432a5 100644 (file)
@@ -1,18 +1,10 @@
 $Id$
 
-Version 0.7
-===========
-
-    Parser:
-        - Implement the Fallback class.
-
-
-
 Version 0.8
 ===========
 
     General:
-        - Add a Root interface and derivate Page from Root.
+        - Add a Root interface and derivate Page from Root (done).
         - Make a Core Package with the core classes (Parser, Widget, Container,
           Root, Fallback).
         - Make a Basic (or Generic?) Package with simple implementations of all
@@ -20,7 +12,8 @@ Version 0.8
         - Make other more specific Packages (like Album) with other widgets.
 
     Parser:
-        - Remove include statement, replace it with Root 'use' attribute.
+        - Remove include statement, replace it with Root 'use' attribute
+          (done).
 
 
 
index ece1275812ee280b2e60060a83231ec8d44a0876..789b2b37f99667f6ee512739cd1f22907f857ab9 100644 (file)
@@ -9,7 +9,7 @@
   <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
  </XMI.header>
  <XMI.content>
-  <docsettings viewid="2" documentation="" uniqueid="84" />
+  <docsettings viewid="2" documentation="" uniqueid="93" />
   <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="string" abstract="1" documentation="Renders the widget using a template returning a string with the results." name="render" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="51" 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="11" type="void" abstract="0" documentation="Add contents to the widget." name="addContents" static="0" scope="200" >
+    <UML:Operation stereotype="" package="" xmi.id="11" type="void" abstract="0" documentation="Add contents to the container." name="addContents" static="0" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&amp;mixed" abstract="0" documentation="Contents to add." name="contents" static="0" scope="200" />
     </UML:Operation>
     <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_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="200" />
+    <UML:Attribute stereotype="" package="" xmi.id="8" value="" type="array" abstract="0" documentation="Attribute list." name="attrs" static="0" scope="202" />
    </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:Operation stereotype="" package="" xmi.id="53" 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="93" type="void" abstract="0" documentation="Adds contents to the container." name="addContents" static="0" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&amp;mixed" abstract="0" documentation="Contents to add." name="contents" static="0" scope="200" />
+    </UML:Operation>
+    <UML:Operation stereotype="" package="" xmi.id="90" type="string" abstract="0" documentation="Returns the rendered widget as a string." name="render" static="0" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&amp;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="89" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="202" />
    </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:Operation stereotype="" package="" xmi.id="82" type="void" abstract="0" documentation="Renders the widget returning a string with the results." name="render" static="0" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&amp;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="78" value="" type="string" abstract="0" documentation="Widget name." name="name" static="0" scope="200" />
-    <UML:Attribute stereotype="" package="" xmi.id="77" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
+    <UML:Attribute stereotype="" package="" xmi.id="78" value="" type="string" abstract="0" documentation="Widget name." name="name" static="0" scope="202" />
+    <UML:Attribute stereotype="" package="" xmi.id="77" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="202" />
+   </UML:Class>
+   <UML:Class stereotype="" package="BIFE" xmi.id="85" abstract="0" documentation="Root container class." name="Root" static="0" scope="200" >
+    <UML:Operation stereotype="" package="" xmi.id="87" type="void" abstract="0" documentation="Constructor." name="BIFE_Root" static="0" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
+    </UML:Operation>
+    <UML:Operation stereotype="" package="" xmi.id="88" type="void" abstract="0" documentation="Constructor." name="__construct" static="0" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
+    </UML:Operation>
    </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="320" linecolour="#ff0000" y="30" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="45" usefillcolor="1" showattributes="1" xmi.id="3" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="145" showattsigs="601" usesdiagramusefillcolour="0" x="210" linecolour="#ff0000" y="130" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="108" usefillcolor="1" showattributes="1" xmi.id="5" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="131" showattsigs="601" usesdiagramusefillcolour="0" x="120" linecolour="#ff0000" y="310" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="108" usefillcolor="1" showattributes="1" xmi.id="7" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="120" showattsigs="601" usesdiagramusefillcolour="0" x="50" linecolour="#ff0000" y="480" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="63" usefillcolor="1" showattributes="1" xmi.id="14" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="120" showattsigs="600" usesdiagramusefillcolour="0" x="210" linecolour="#ff0000" y="480" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="63" usefillcolor="1" showattributes="1" xmi.id="17" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="120" showattsigs="601" usesdiagramusefillcolour="0" x="410" linecolour="#ff0000" y="130" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="90" usefillcolor="1" showattributes="1" xmi.id="20" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="134" showattsigs="601" usesdiagramusefillcolour="0" x="360" linecolour="#ff0000" y="310" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="63" usefillcolor="1" showattributes="1" xmi.id="61" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="120" showattsigs="601" usesdiagramusefillcolour="0" x="367" linecolour="#ff0000" y="436" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="108" usefillcolor="1" showattributes="1" xmi.id="76" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="104" showattsigs="601" usesdiagramusefillcolour="0" x="301" linecolour="#ff0000" y="32" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="45" usefillcolor="1" showattributes="1" xmi.id="3" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="145" showattsigs="601" usesdiagramusefillcolour="0" x="191" linecolour="#ff0000" y="132" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="108" usefillcolor="1" showattributes="1" xmi.id="5" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="131" showattsigs="601" usesdiagramusefillcolour="0" x="41" linecolour="#ff0000" y="322" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="108" usefillcolor="1" showattributes="1" xmi.id="7" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="127" showattsigs="601" usesdiagramusefillcolour="0" x="352" linecolour="#ff0000" y="436" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="108" usefillcolor="1" showattributes="1" xmi.id="14" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="120" showattsigs="600" usesdiagramusefillcolour="0" x="46" linecolour="#ff0000" y="481" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="63" usefillcolor="1" showattributes="1" xmi.id="17" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="120" showattsigs="601" usesdiagramusefillcolour="0" x="391" linecolour="#ff0000" y="132" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="90" usefillcolor="1" showattributes="1" xmi.id="20" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="134" showattsigs="601" usesdiagramusefillcolour="0" x="196" linecolour="#ff0000" y="322" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="63" usefillcolor="1" showattributes="1" xmi.id="61" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="120" showattsigs="601" usesdiagramusefillcolour="0" x="203" linecolour="#ff0000" y="436" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="108" usefillcolor="1" showattributes="1" xmi.id="76" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,10,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="120" showattsigs="601" usesdiagramusefillcolour="0" x="355" linecolour="#ff0000" y="321" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="63" usefillcolor="1" showattributes="1" xmi.id="85" showoperations="1" 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="282" starty="130" />
-       <endpoint endx="354" endy="75" />
+       <startpoint startx="263" starty="132" />
+       <endpoint endx="335" endy="77" />
       </linepath>
      </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="5" widgetaid="7" documentation="" type="500" >
+     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="1" widgetbid="5" widgetaid="7" documentation="" type="500" >
       <linepath>
-       <startpoint startx="185" starty="310" />
-       <endpoint endx="258" endy="238" />
+       <startpoint startx="106" starty="322" />
+       <endpoint endx="227" endy="240" />
+       <point x="168" y="282" />
       </linepath>
      </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="7" widgetaid="14" documentation="" type="500" >
+     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="7" widgetaid="17" documentation="" type="500" >
       <linepath>
-       <startpoint startx="110" starty="480" />
-       <endpoint endx="163" endy="418" />
+       <startpoint startx="106" starty="481" />
+       <endpoint endx="106" endy="430" />
       </linepath>
      </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="7" widgetaid="17" documentation="" type="500" >
+     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="3" widgetaid="20" documentation="" type="500" >
       <linepath>
-       <startpoint startx="270" starty="480" />
-       <endpoint endx="207" endy="418" />
+       <startpoint startx="451" starty="132" />
+       <endpoint endx="370" endy="77" />
       </linepath>
      </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="3" widgetaid="20" documentation="" type="500" >
+     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="2" widgetbid="5" widgetaid="61" documentation="" type="500" >
       <linepath>
-       <startpoint startx="470" starty="130" />
-       <endpoint endx="389" endy="75" />
+       <startpoint startx="263" starty="322" />
+       <endpoint endx="263" endy="240" />
       </linepath>
      </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="5" widgetaid="61" documentation="" type="500" >
+     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="61" widgetaid="76" documentation="" type="500" >
       <linepath>
-       <startpoint startx="427" starty="310" />
-       <endpoint endx="306" endy="238" />
+       <startpoint startx="263" starty="436" />
+       <endpoint endx="263" endy="385" />
       </linepath>
      </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="61" widgetaid="76" documentation="" type="500" >
+     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="3" widgetbid="5" widgetaid="85" documentation="" type="500" >
       <linepath>
-       <startpoint startx="427" starty="436" />
-       <endpoint endx="427" endy="373" />
+       <startpoint startx="415" starty="321" />
+       <endpoint endx="299" endy="240" />
+      </linepath>
+     </UML:AssocWidget>
+     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="85" widgetaid="14" documentation="" type="500" >
+      <linepath>
+       <startpoint startx="415" starty="436" />
+       <endpoint endx="415" endy="384" />
       </linepath>
      </UML:AssocWidget>
     </associations>
       <listitem open="0" type="813" id="14" label="Page" >
        <listitem open="0" type="815" id="15" label="BIFE_Page" />
        <listitem open="0" type="815" id="53" label="__construct" />
+       <listitem open="0" type="815" id="93" label="addContents" />
+       <listitem open="0" type="814" id="89" label="attrs" />
+       <listitem open="0" type="815" id="90" label="render" />
+      </listitem>
+      <listitem open="0" type="813" id="85" label="Root" >
+       <listitem open="0" type="815" id="87" label="BIFE_Root" />
+       <listitem open="0" type="815" id="88" label="__construct" />
       </listitem>
       <listitem open="0" type="813" id="17" label="Title" >
        <listitem open="0" type="815" id="18" label="BIFE_Title" />
index cd198be55009f6e7ace6e42a59165105e8da559e..4d7651a5f7cc3d450a2fb8b73f58b8fe3a959c6e 100644 (file)
@@ -35,7 +35,7 @@ require_once 'BIFE/Parser.php';
 require_once 'BIFE/Copy.php';
 require_once 'BIFE/Page.php';
 require_once 'BIFE/Title.php';
-require_once 'BIFE/Album.php';
+#require_once 'BIFE/Album.php';
 #require_once 'BIFE.php';
 
 $file = 'simple.xbf';
index e3dcd892ffd9de2c6c0ddfce1f1c5ebaf661910b..61383a8aec18ad3555397f405a551bc25b6dccf9 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<Page title="Hola mundo!" menu="true" use="Album:Perfil">
+<Page title="Hola mundo!" menu="true" use="Album">
     <Title>Datos!</Title>
     <H3>Photo album</H3>
     <Album dir="../.." columns="8"/>
index 1d39031e01f68dfb94416375c19e19364f971d8c..c26fadace80dbc426aa0422e47a463ba26a5b73b 100644 (file)
@@ -41,7 +41,7 @@ class BIFE_Copy extends BIFE_Fallback {
      * Widget name.
      *
      * @var    string $name
-     * @access public
+     * @access protected
      */
     var $name;
 
@@ -49,7 +49,7 @@ class BIFE_Copy extends BIFE_Fallback {
      * Attributes.
      *
      * @var    array $attrs
-     * @access public
+     * @access protected
      */
     var $attrs;
 
@@ -116,4 +116,4 @@ class BIFE_Copy extends BIFE_Fallback {
 
 } // -X2C Class :Copy
 
-?>
+?>
\ No newline at end of file
index 296a4c8213b57dedb9edb9c97885c24728727caf..c98bc49d09ac6e2bba2fabbbd7fa2869088aeeb0 100644 (file)
@@ -26,7 +26,6 @@
 // $Id$
 //
 
-
 // +X2C includes
 require_once 'BIFE/Container.php';
 // ~X2C
@@ -43,7 +42,7 @@ class BIFE_Generic extends BIFE_Container {
      * Attribute list.
      *
      * @var    array $attrs
-     * @access public
+     * @access protected
      */
     var $attrs;
 
@@ -82,7 +81,7 @@ class BIFE_Generic extends BIFE_Container {
 
     // +X2C Operation 11
     /**
-     * Add contents to the widget.
+     * Add contents to the container.
      *
      * @param  mixed &$contents Contents to add.
      *
index 0d6455c14df1dc9a33cdb0404a2f13df27f52e29..7f8fa3010b560aba15c7344e84d28139df73b060 100644 (file)
@@ -27,7 +27,7 @@
 //
 
 // +X2C includes
-require_once 'BIFE/Generic.php';
+require_once 'BIFE/Root.php';
 // ~X2C
 
 // +X2C Class 14 :Page
@@ -36,7 +36,15 @@ require_once 'BIFE/Generic.php';
  *
  * @access public
  */
-class BIFE_Page extends BIFE_Generic {
+class BIFE_Page extends BIFE_Root {
+    /**
+     * Attributes.
+     *
+     * @var    array $attrs
+     * @access protected
+     */
+    var $attrs;
+
     // ~X2C
 
     // +X2C Operation 15
@@ -66,6 +74,46 @@ class BIFE_Page extends BIFE_Generic {
     function __construct($attrs) // ~X2C
     {
         parent::__construct($attrs);
+        $this->attrs = $attrs;
+    }
+    // -X2C
+
+    // +X2C Operation 93
+    /**
+     * Adds contents to the container.
+     *
+     * @param  mixed &$contents Contents to add.
+     *
+     * @return void
+     * @access public
+     */
+    function addContents(&$contents) // ~X2C
+    {
+        if (is_string($contents)) {
+            $contents = trim($contents);
+        }
+        if ($contents) {
+            parent::addContents($contents);
+        }
+    }
+    // -X2C
+
+    // +X2C Operation 90
+    /**
+     * Returns the rendered widget as a string.
+     *
+     * @param  HTML_Template_Sigma &$template Template to use to render the widget.
+     *
+     * @return string
+     * @access public
+     */
+    function render(&$template) // ~X2C
+    {
+        $contents = parent::render($template);
+        $template->loadTemplateFile('bife_page.html');
+        $template->setVariable($this->attrs);
+        $template->setVariable('CONTENTS', $contents);
+        return $template->get();
     }
     // -X2C
 
index bf9632626a5f523de86227521254ea0b57ecf406..66be14942130c7f985c6081a25faff7e72b611d2 100644 (file)
@@ -128,9 +128,6 @@ class BIFE_Parser {
     function startElement($parser, $name, $attrs) // ~X2C
     {
         $class = "BIFE_$name";
-        if (!class_exists($class)) {
-            @include_once 'BIFE/' . ucfirst(strtolower($name)) . '.php';
-        }
         if (class_exists($class)) {
             $obj =& new $class($attrs);
             if (!is_a($obj, 'bife_widget')) {
diff --git a/src/BIFE/Root.php b/src/BIFE/Root.php
new file mode 100644 (file)
index 0000000..66f9cbc
--- /dev/null
@@ -0,0 +1,80 @@
+<?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: Thu May 22 18:53:36 2003                                  |
+// | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+// +X2C includes
+require_once 'BIFE/Container.php';
+// ~X2C
+
+// +X2C Class 85 :Root
+/**
+ * Root container class.
+ *
+ * @access public
+ */
+class BIFE_Root extends BIFE_Container {
+    // ~X2C
+
+    // +X2C Operation 87
+    /**
+     * Constructor.
+     *
+     * @param  string $attrs Attributes.
+     *
+     * @return void
+     * @access public
+     */
+    function BIFE_Root($attrs) // ~X2C
+    {
+        $this->__construct($attrs);
+    }
+    // -X2C
+
+    // +X2C Operation 88
+    /**
+     * Constructor.
+     *
+     * @param  string $attrs Attributes.
+     *
+     * @return void
+     * @access public
+     */
+    function __construct($attrs) // ~X2C
+    {
+        if (@$attrs['USE']) {
+            foreach (split(':', $attrs['USE']) as $require) {
+                require_once "BIFE/$require.php";
+            }
+            unset($attrs['USE']);
+        }
+        parent::__construct($attrs);
+    }
+    // -X2C
+
+} // -X2C Class :Root
+
+?>
\ No newline at end of file
index 688b61e10bb9c3057e140ff5c67862eb7e8b1268..684f54198107ac68310603ce5604e2626c29b19a 100644 (file)
@@ -43,4 +43,5 @@
   <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>