- Merged Copy and Generic class into a new Fallback implementation: Translate.
It searchs for a template and if it doesn't find it, it copy the output like
Copy.
- Removed Title and Page (now are created by Translate fallback since they are
too simple).
- Removed a lot of unused constructors.
- Cleaned up Link constructor (now it uses getURL()) and inherits directly
from Container.
HIT Changes:
- Added searching for templates in include_path capabilities (much slower).
- Added optional group parameter to parse() method.
- Added exists() method to check if a template exists.
- Fixed paramters of getBuffer() and popBuffer().
- Renamed setGroup() as pushGroup() and unsetGroup() as popGroup().
Other updates:
- Updated ROADMAP.
- Updated UML diagrams.
- Updated example.
- Bugfixes.
*/
class BIFE_Container extends BIFE_Widget {
/**
+ * Widget contents.
+ *
* @var array $contents
* @access public
*/
- var $contents;
+ var $contents = array();
// ~X2C
- // +X2C Operation 48
- /**
- * Constructor.
- *
- * @param array $attrs Attributes.
- *
- * @return void
- * @access public
- */
- function BIFE_Container($attrs) // ~X2C
- {
- $this->__construct($attrs);
- }
- // -X2C
-
- // +X2C Operation 50
- /**
- * Constructor.
- *
- * @param array $attrs Attributes.
- *
- * @return void
- * @access public
- */
- function __construct($attrs) // ~X2C
- {
- parent::__construct($attrs);
- $this->contents = array();
- }
- // -X2C
-
// +X2C Operation 6
/**
* Adds contents to the container.
* @return string
* @access public
*/
- function render(&$template) // ~X2C
+ function renderContents(&$template) // ~X2C
{
$c = count($this->contents);
$o = '';
}
// -X2C
+
} // -X2C Class :Container
?>
\ No newline at end of file
*/
class BIFE_Fallback extends BIFE_Container {
/**
+ * Name of the widget.
+ *
* @var string $name
* @access private
*/
- var $name;
+ var $name = '';
// ~X2C
function __construct($name, $attrs) // ~X2C
{
parent::__construct($attrs);
- $this->name = $name;
+ $this->name = strtolower(strtr($name, ':', '_'));
}
// -X2C
function render(&$template) // ~X2C
{
trigger_error('Method not implemented '.get_class($this).
- '::addContents().', E_USER_ERROR);
+ '::render().', E_USER_ERROR);
}
// -X2C
*/
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).
*
* 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 = '.', $group = '') // ~X2C
+ function HTML_Template_HIT($root = '.', $useIncludePath = false, $group = '') // ~X2C
{
- $this->__construct($root, $group);
+ $this->__construct($root, $useIncludePath, $group);
}
// -X2C
* Constructor.
*
* @param int $root Root directory where template files are.
- * @param int $group Group of templates to use (a subdirectory in root).
+ * @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 = '.', $group = '') // ~X2C
+ function __construct($root = '.', $useIncludePath = false, $group = '') // ~X2C
{
$this->root = $root;
- $this->setGroup($group);
+ $this->useIncludePath = $useIncludePath;
+ $this->pushGroup($group);
}
// -X2C
* @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 = '') // ~X2C
+ function parse($name, $vars = '', $val = '', $group = null) // ~X2C
{
- $group = end($this->group);
+ $group = is_null($group) ? end($this->group) : $group;
if ($group) {
$file = "{$this->root}/$group/$name.tpl.html";
} else {
}
if (!isset($this->cache[$file])) {
// FIXME - replace join(file()) with file_get_contents().
- $this->cache[$file] = join('', file($file));
+ $this->cache[$file] = join('', file($file, $this->useIncludePath));
}
- //if (!is_readable($file)) {
- // trigger_error("Can't read '$file'.");
- //}
if ($vars) {
if (is_string($vars)) {
$vars = array($vars => $val);
* Gets a parsed buffer.
*
* @param string $name Name of the parsed template to get.
- * @param bool $flush Flush buffer.
*
* @return string
* @access public
+ * @static
*/
- function getBuffer($name, $flush = true) // ~X2C
+ function getBuffer($name) // ~X2C
{
return @$this->buffer["{$this->group}/$name"];
}
/**
* Gets a parsed buffer and removes it.
*
- * @param int $name Name of the buffer to flush.
+ * @param string $name Name of the buffer to flush.
*
* @return void
* @access public
*/
- function popBuffer($name = '') // ~X2C
+ function popBuffer($name) // ~X2C
{
$return = @$this->buffer["{$this->group}/$name"];
unset($this->buffer["{$this->group}/$name"]);
* @return void
* @access public
*/
- function setGroup($group = '') // ~X2C
+ function pushGroup($group = '') // ~X2C
{
- if ($group) {
- $this->group[] = $group;
- } else {
- $this->group[] = '';
- }
+ $this->group[] = $group;
}
// -X2C
/**
* Removes the group from the groups stack and returns to the previous used group.
*
- * @return void
+ * @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 unsetGroup() // ~X2C
+ function exists($name, $group = null) // ~X2C
{
- array_pop($this->group);
+ $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
<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="156" />
+ <docsettings viewid="2" documentation="Parse XML data getting widgets." uniqueid="159" />
<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="126" type="void" abstract="0" documentation="Constructor." name="BIFE_Widget" static="0" scope="200" >
<UML:Attribute stereotype="" package="" xmi.id="125" value="array()" type="array" abstract="0" documentation="Attribute list." name="attrs" static="0" scope="202" />
</UML:Class>
<UML:Class stereotype="" package="BIFE" xmi.id="5" abstract="1" documentation="Base container widget class." name="Container" static="0" scope="200" >
- <UML:Operation stereotype="" package="" xmi.id="48" type="void" abstract="0" documentation="Constructor." name="BIFE_Container" 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="50" 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="6" 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="&mixed" abstract="0" documentation="Contents to add to the container." name="contents" static="0" scope="200" />
</UML:Operation>
- <UML:Operation stereotype="" package="" xmi.id="59" type="string" abstract="0" 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="59" type="string" abstract="0" documentation="Renders the widget using a template returning a string with the results." name="renderContents" static="0" scope="200" >
<UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&HTML_Template_HIT" abstract="0" documentation="Template object to render the widget." name="template" static="0" scope="200" />
</UML:Operation>
- <UML:Attribute stereotype="" package="" xmi.id="47" value="" type="array" abstract="0" documentation="" name="contents" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="47" value="array()" type="array" abstract="0" documentation="Widget contents." name="contents" static="0" scope="200" />
</UML:Class>
<UML:Class stereotype="" package="BIFE" xmi.id="25" abstract="0" documentation="This is the XML Parser." name="Parser" static="0" scope="200" >
<UML:Operation stereotype="" package="" xmi.id="30" type="void" abstract="0" documentation="Constructor." name="BIFE_Parser" static="0" scope="200" >
<UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="Name of the widget." name="name" static="0" scope="200" />
<UML:Parameter stereotype="" package="" xmi.id="2" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
</UML:Operation>
- <UML:Attribute stereotype="" package="" xmi.id="129" value="" type="string" abstract="0" documentation="" name="name" static="0" scope="201" />
+ <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="HTML/Template" xmi.id="130" abstract="0" documentation="Hooks vs. IT (HIT) is a simple template implementation, based on hooks and IT template systems." name="HIT" static="0" scope="200" >
<UML:Operation stereotype="" package="" xmi.id="136" type="void" abstract="0" documentation="Constructor." name="HTML_Template_HIT" static="0" scope="200" >
<UML:Parameter stereotype="" package="" xmi.id="1" value="'.'" type="string" abstract="0" documentation="Root directory where template files are." name="root" static="0" scope="200" />
- <UML:Parameter stereotype="" package="" xmi.id="2" value="''" type="string" abstract="0" documentation="Group of templates to use (a subdirectory in root)." name="group" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="3" value="false" type="bool" abstract="0" documentation="If it's true, it looks for template files in PHP's include_path." name="useIncludePath" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="4" value="''" type="string" abstract="0" documentation="Group of templates to use (a subdirectory in root)." name="group" static="0" scope="200" />
</UML:Operation>
<UML:Operation stereotype="" package="" xmi.id="137" type="void" abstract="0" documentation="Constructor." name="__construct" static="0" scope="200" >
<UML:Parameter stereotype="" package="" xmi.id="1" value="'.'" type="int" abstract="0" documentation="Root directory where template files are." name="root" static="0" scope="200" />
- <UML:Parameter stereotype="" package="" xmi.id="2" value="''" type="int" abstract="0" documentation="Group of templates to use (a subdirectory in root)." name="group" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="3" value="false" type="false" abstract="0" documentation="If it's true, it looks for template files in PHP's include_path." name="useIncludePath" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="4" value="''" type="string" abstract="0" documentation="Group of templates to use (a subdirectory in root)." name="group" static="0" scope="200" />
</UML:Operation>
<UML:Operation stereotype="" package="" xmi.id="138" type="string" abstract="0" documentation="Parse a template returning the results.
<UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="Name of template to parse." name="name" static="0" scope="200" />
<UML:Parameter stereotype="" package="" xmi.id="2" value="''" type="mixed" abstract="0" documentation="Variables to replace in the template." name="vars" static="0" scope="200" />
<UML:Parameter stereotype="" package="" xmi.id="3" value="''" type="string" abstract="0" documentation="If $vars is a string, the value to replace for $vars." name="val" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="4" value="null" type="mixed" abstract="0" documentation="Group to use to parse this template. Null to use the current group." name="group" static="0" scope="200" />
</UML:Operation>
<UML:Operation stereotype="" package="" xmi.id="144" type="void" abstract="0" documentation="Parse a template buffering the results.
<UML:Parameter stereotype="" package="" xmi.id="2" value="''" type="mixed" abstract="0" documentation="Variables to replace in the template." name="vars" static="0" scope="200" />
<UML:Parameter stereotype="" package="" xmi.id="3" value="''" type="string" abstract="0" documentation="If $vars is a string, the value to replace for $vars." name="val" static="0" scope="200" />
</UML:Operation>
- <UML:Operation stereotype="" package="" xmi.id="145" type="string" abstract="0" documentation="Gets a parsed buffer." name="getBuffer" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="145" type="string" abstract="0" documentation="Gets a parsed buffer." name="getBuffer" static="1" scope="200" >
<UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="Name of the parsed template to get." name="name" static="0" scope="200" />
- <UML:Parameter stereotype="" package="" xmi.id="2" value="true" type="bool" abstract="0" documentation="Flush buffer." name="flush" static="0" scope="200" />
</UML:Operation>
<UML:Operation stereotype="" package="" xmi.id="146" type="void" abstract="0" documentation="Gets a parsed buffer and removes it." name="popBuffer" static="0" scope="200" >
- <UML:Parameter stereotype="" package="" xmi.id="1" value="''" type="int" abstract="0" documentation="Name of the buffer to flush." name="name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="Name of the buffer to flush." name="name" static="0" scope="200" />
</UML:Operation>
- <UML:Operation stereotype="" package="" xmi.id="139" type="void" abstract="0" documentation="Sets the group to use and add it to the groups stack." name="setGroup" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="139" type="void" abstract="0" documentation="Sets the group to use and add it to the groups stack." name="pushGroup" static="0" scope="200" >
<UML:Parameter stereotype="" package="" xmi.id="1" value="''" type="string" abstract="0" documentation="Group to use." name="group" static="0" scope="200" />
</UML:Operation>
- <UML:Operation stereotype="" package="" xmi.id="140" type="void" abstract="0" documentation="Removes the group from the groups stack and returns to the previous used group." name="unsetGroup" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="140" type="string" abstract="0" documentation="Removes the group from the groups stack and returns to the previous used group." name="popGroup" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="159" type="bool" abstract="0" documentation="True if the template $name exists in $group (or the current group)." name="exists" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="Name of the template." name="name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="2" value="null" type="mixed" abstract="0" documentation="Template's group. If it's null it uses the current group." name="group" static="0" scope="200" />
+ </UML:Operation>
<UML:Attribute stereotype="" package="" xmi.id="133" value="'.'" type="string" abstract="0" documentation="Root directory where template files are." name="root" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="158" value="false" type="bool" abstract="0" documentation="If it's true, it looks for template files in PHP's include_path." name="useIncludePath" static="0" scope="200" />
<UML:Attribute stereotype="" package="" xmi.id="134" value="''" type="string" abstract="0" documentation="Group of templates to use (a subdirectory in root)." name="group" static="0" scope="202" />
<UML:Attribute stereotype="" package="" xmi.id="135" value="array()" type="array" abstract="0" documentation="Templates cache." name="cache" static="0" scope="202" />
<UML:Attribute stereotype="" package="" xmi.id="147" value="array()" type="array" abstract="0" documentation="" name="buffer" static="0" scope="202" />
<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="80" linecolour="#ff0000" y="20" 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="127" showattsigs="601" usesdiagramusefillcolour="0" x="91" linecolour="#ff0000" y="150" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="90" 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="118" showattsigs="601" usesdiagramusefillcolour="0" x="95" linecolour="#ff0000" y="295" 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="173" showattsigs="601" usesdiagramusefillcolour="0" x="68" linecolour="#ff0000" y="140" 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="93" linecolour="#ff0000" y="241" 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="301" linecolour="#ff0000" y="20" 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="154" starty="150" />
+ <startpoint startx="154" starty="140" />
<endpoint endx="154" endy="95" />
</linepath>
</UML:AssocWidget>
<UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="5" widgetaid="61" documentation="" type="500" >
<linepath>
- <startpoint startx="154" starty="295" />
- <endpoint endx="154" endy="240" />
+ <startpoint startx="154" starty="241" />
+ <endpoint endx="154" endy="200" />
</linepath>
</UML:AssocWidget>
</associations>
</diagram>
<diagram snapgrid="1" showattsig="1" fillcolor="#ffffc0" showgrid="1" showopsig="0" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="132" documentation="" type="402" showops="1" showpackage="1" name="HIT Classes" localid="30000" showstereotype="0" showscope="1" font="Helvetica,9,-1,5,50,0,0,0,0,0" linecolor="#ff0000" >
<widgets>
- <UML:ConceptWidget usesdiagramfillcolour="0" width="161" showattsigs="601" usesdiagramusefillcolour="0" x="50" linecolour="#ff0000" y="40" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="195" usefillcolor="1" showattributes="1" xmi.id="130" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="195" showattsigs="601" usesdiagramusefillcolour="0" x="50" linecolour="#ff0000" y="40" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="225" usefillcolor="1" showattributes="1" xmi.id="130" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,50,0,0,0,0,0" />
</widgets>
<messages/>
<associations/>
<listitem open="1" type="801" id="-1" label="Logical View" >
<listitem open="1" type="803" id="-1" label="BIFE" >
<listitem open="0" type="813" id="5" label="Container" >
- <listitem open="0" type="815" id="48" label="BIFE_Container" />
- <listitem open="0" type="815" id="50" label="__construct" />
<listitem open="0" type="815" id="6" label="addContents" />
<listitem open="0" type="814" id="47" label="contents" />
- <listitem open="0" type="815" id="59" label="render" />
+ <listitem open="0" type="815" id="59" label="renderContents" />
</listitem>
<listitem open="0" type="807" id="2" label="Core Classes" />
<listitem open="0" type="813" id="61" label="Fallback" >
<listitem open="0" type="815" id="137" label="__construct" />
<listitem open="0" type="814" id="147" label="buffer" />
<listitem open="0" type="814" id="135" label="cache" />
+ <listitem open="0" type="815" id="159" label="exists" />
<listitem open="0" type="815" id="145" label="getBuffer" />
<listitem open="0" type="814" id="134" label="group" />
<listitem open="0" type="815" id="138" label="parse" />
<listitem open="0" type="815" id="144" label="parseBuffered" />
<listitem open="0" type="815" id="146" label="popBuffer" />
+ <listitem open="0" type="815" id="140" label="popGroup" />
+ <listitem open="0" type="815" id="139" label="pushGroup" />
<listitem open="0" type="814" id="133" label="root" />
- <listitem open="0" type="815" id="139" label="setGroup" />
- <listitem open="0" type="815" id="140" label="unsetGroup" />
+ <listitem open="0" type="814" id="158" label="useIncludePath" />
</listitem>
<listitem open="1" type="807" id="132" label="HIT Classes" />
</listitem>
============
- Add XML file caching. [done!]
- - Remove Root widget, is has no sense with the new autoincludin method.
- [done!]
+ - Remove Root widget, is has no sense with the new autoincluding
+ method. [done!]
- Make the proyect modular. [done as a first draft]
- Make a Core module with the core classes (Parser, Widget, Container,
Fallback). [almost done]
[almost done]
- Fix bugs: all classes should done the dynamic work in the render()
method or using __sleep() and __wakeup() because of the new cache
- capabilities.
+ capabilities. [started]
Version 0.11
require_once 'HTML/Template/HIT.php';
require_once 'BIFE/Parser.php';
-require_once 'BIFE/Copy.php';
+require_once 'BIFE/Translate.php';
require_once 'BIFE/Link.php';
$file = isset($_REQUEST['BIFE']) ? $_REQUEST['BIFE'] : 'index.xbf';
$template =& new HTML_Template_HIT('templates');
-$parser =& new BIFE_Parser('BIFE_Copy');
+$parser =& new BIFE_Parser('BIFE_Translate');
$page =& $parser->parseFile($file);
$parser->__destruct();
echo $page->render($template);
// $Id$
//
-
-
// +X2C includes
require_once 'BIFE/Widget.php';
// ~X2C
// -X2C
} // -X2C Class :Pager
+
?>
\ No newline at end of file
class BIFE_Album_Photo extends BIFE_Widget {
// ~X2C
- // +X2C Operation 106
- /**
- * Constructor.
- *
- * @param array $attrs Attributes.
- *
- * @return void
- * @access public
- */
- function BIFE_Album_Photo($attrs) // ~X2C
- {
- $this->__construct($attrs);
- }
- // -X2C
-
- // +X2C Operation 107
- /**
- * Constructor.
- *
- * @param array $attrs Attributes.
- *
- * @return void
- * @access public
- */
- function __construct($attrs) // ~X2C
- {
- $new_attrs['FILE'] = @$attrs['FILE'] ? $attrs['FILE'] : @$_REQUEST['BIFE_ALBUM_FILE'];
- $new_attrs['DESC'] = @$attrs['DESC'] ? $attrs['DESC'] : basename($new_attrs['FILE']);
- parent::__construct($new_attrs);
- }
- // -X2C
-
// +X2C Operation 108
/**
* Renders the widget using a template returning a string with the results.
*/
function render(&$template) // ~X2C
{
- $template->setGroup('album');
- $out = $template->parse('photo', $this->attrs);
- $template->unsetGroup();
+ $attrs['FILE'] = @$this->attrs['FILE'] ? $this->attrs['FILE'] : @$_REQUEST['BIFE_ALBUM_FILE'];
+ $attrs['DESC'] = @$this->attrs['DESC'] ? $this->attrs['DESC'] : basename($attrs['FILE']);
+ $out = $template->parse('photo', $attrs, '', 'album');
return $out;
}
// -X2C
*/
function render(&$template) // ~X2C
{
- $template->setGroup('album');
+ $template->pushGroup('album');
$list = $this->getList();
$tot = count($list);
$rows = ceil($tot / $this->attrs['COLUMNS']);
}
$template->parseBuffered('cell', 'CONTENTS', $cell);
}
- $template->parseBuffered('row', 'CONTENTS', $template->popBuffer('cell'));
+ $template->parseBuffered('row', 'CONTENTS',
+ $template->popBuffer('cell'));
}
- $out = $template->parse(
- 'body',
- array('DESC' => $this->getDescription(), 'CONTENTS' => $template->popBuffer('row'))
- );
- $template->unsetGroup();
+ $out = $template->parse('body', array(
+ 'DESC' => $this->getDescription(),
+ 'CONTENTS' => $template->popBuffer('row')));
+ $template->popGroup();
return $out;
}
// -X2C
</UML:Operation>
</UML:Class>
<UML:Class stereotype="" package="BIFE/Album" xmi.id="103" abstract="0" documentation="Photo widget." name="Photo" static="0" scope="200" >
- <UML:Operation stereotype="" package="" xmi.id="106" type="void" abstract="0" documentation="Constructor." name="BIFE_Album_Photo" 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="107" 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="108" type="string" abstract="0" documentation="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_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="HTML/Template" xmi.id="130" abstract="0" documentation="Hooks vs. IT (HIT) is a simple template implementation, based on hooks and IT template systems.
-x2c:extern" name="HIT" static="0" scope="200" />
<UML:Class stereotype="" package="BIFE/Album" xmi.id="151" abstract="0" documentation="Album pager to an easier navigation when viewing photos." name="Pager" static="0" scope="200" >
<UML:Operation stereotype="" package="" xmi.id="153" type="void" abstract="0" documentation="Constructor." name="BIFE_Album_Pager" static="0" scope="200" >
<UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
<widgets>
<UML:ConceptWidget usesdiagramfillcolour="0" width="90" showattsigs="600" usesdiagramusefillcolour="0" x="222" linecolour="#ff0000" y="23" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="25" usefillcolor="1" showattributes="0" xmi.id="3" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
<UML:ConceptWidget usesdiagramfillcolour="0" width="161" showattsigs="601" usesdiagramusefillcolour="0" x="22" linecolour="#ff0000" y="175" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="142" usefillcolor="1" showattributes="1" xmi.id="20" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
- <UML:ConceptWidget usesdiagramfillcolour="0" width="149" showattsigs="601" usesdiagramusefillcolour="0" x="193" linecolour="#ff0000" y="175" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="67" usefillcolor="1" showattributes="1" xmi.id="103" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="126" showattsigs="601" usesdiagramusefillcolour="0" x="204" linecolour="#ff0000" y="175" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="37" usefillcolor="1" showattributes="1" xmi.id="103" 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="352" linecolour="#ff0000" y="175" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="67" usefillcolor="1" showattributes="1" xmi.id="151" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
</widgets>
<messages/>
<listitem open="0" type="815" id="155" label="render" />
</listitem>
<listitem open="0" type="813" id="103" label="Photo" >
- <listitem open="0" type="815" id="106" label="BIFE_Album_Photo" />
- <listitem open="0" type="815" id="107" label="__construct" />
<listitem open="0" type="815" id="108" label="render" />
</listitem>
<listitem open="0" type="813" id="20" label="Thumbs" >
<listitem open="1" type="803" id="-1" label="BIFE" >
<listitem open="0" type="813" id="3" label="Widget" />
</listitem>
- <listitem open="1" type="803" id="-1" label="HIT" >
- <listitem open="0" type="813" id="130" label="HIT" />
- </listitem>
</listitem>
<listitem open="1" type="802" id="-1" label="Use Case View" />
</listitem>
+++ /dev/null
-<?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/Container.php';
-// ~X2C
-
-// +X2C Class 7 :Generic
-/**
- * This is a generic and simple BIFE_Container implementation.
- *
- * @access public
- * @abstract
- */
-class BIFE_Generic extends BIFE_Container {
- // ~X2C
-
- // +X2C Operation 10
- /**
- * Constructor.
- *
- * @param array $attrs Attributes.
- *
- * @return void
- * @access public
- */
- function BIFE_Generic($attrs) // ~X2C
- {
- $this->__construct($attrs);
- }
- // -X2C
-
- // +X2C Operation 51
- /**
- * Constructor.
- *
- * @param array $attrs Attributes.
- *
- * @return void
- * @access public
- */
- function __construct($attrs) // ~X2C
- {
- parent::__construct($attrs);
- }
- // -X2C
-
- // +X2C Operation 11
- /**
- * Add 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 12
- /**
- * 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'] = parent::render($template);
- $template->setGroup();
- $out = $template->parse(get_class($this), $this->attrs);
- $template->unsetGroup();
- return $out;
- }
- // -X2C
-
-} // -X2C Class :Generic
-
-?>
\ No newline at end of file
//
// +X2C includes
-require_once 'BIFE/Generic.php';
+require_once 'BIFE/Container.php';
// ~X2C
// +X2C Class 110 :Link
*
* @access public
*/
-class BIFE_Link extends BIFE_Generic {
+class BIFE_Link extends BIFE_Container {
// ~X2C
// +X2C Operation 111
*/
function __construct($attrs) // ~X2C
{
- $link_attrs['URL'] = @$attrs['URL'];
- unset($attrs['URL']);
- $link_attrs['DESC'] = @$attrs['DESC'];
- unset($attrs['DESC']);
- if (isset($attrs['BIFE'])) {
- $link_attrs['BIFE'] = $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) {
- $link_attrs['URL'] .= '?' . join('&', $query);
- }
+ $link_attrs['URL'] = $this->getURL($attrs);
+ $link_attrs['DESC'] = @$attrs['DESC'];
+ $link_attrs['TARGET'] = @$attrs['TARGET'];
parent::__construct($link_attrs);
}
// -X2C
}
// -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
+++ /dev/null
-<?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/Generic.php';
-// ~X2C
-
-// +X2C Class 14 :Page
-/**
- * Page widget.
- *
- * @access public
- */
-class BIFE_Page extends BIFE_Generic {
- // ~X2C
-
-} // -X2C Class :Page
-
-?>
+++ /dev/null
-<?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/Generic.php';
-// ~X2C
-
-// +X2C Class 17 :Title
-/**
- * Title widget.
- *
- * @access public
- */
-class BIFE_Title extends BIFE_Generic {
- // ~X2C
-
-} // -X2C Class :Title
-
-?>
// | 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 21 15:55:29 2003 |
+// | Created: Wed May 17 18:16:54 ART 2003 |
// | Authors: Leandro Lucarella <luca@lugmen.org.ar> |
// +--------------------------------------------------------------------+
//
require_once 'BIFE/Fallback.php';
// ~X2C
-// +X2C Class 76 :Copy
+// +X2C Class 7 :Translate
/**
- * Fallback widget that copies the XML.
+ * This is a generic and simple (but very usefull) BIFE_Fallback implementation. Translate widgets using a template with it's name, prepended with 'bife_'.
*
* @access public
*/
-class BIFE_Copy extends BIFE_Fallback {
+class BIFE_Translate extends BIFE_Fallback {
// ~X2C
- // +X2C Operation 79
+ // +X2C Operation 12
/**
- * Constructor.
- *
- * @param string $name Widget name.
- * @param array $attrs Attributes.
- *
- * @return void
- * @access public
- */
- function BIFE_Copy($name, $attrs) // ~X2C
- {
- $this->__construct($name, $attrs);
- }
- // -X2C
-
- // +X2C Operation 80
- /**
- * Constructor.
- *
- * @param string $name Widget name.
- * @param array $attrs Attributes.
- *
- * @return void
- * @access public
- */
- function __construct($name, $attrs) // ~X2C
- {
- parent::__construct($name, $attrs);
- }
- // -X2C
-
- // +X2C Operation 82
- /**
- * Renders the widget returning a string with the results.
+ * Renders the widget.
*
* @param HTML_Template_HIT &$template Template to use to render the widget.
*
- * @return void
+ * @return string
* @access public
*/
function render(&$template) // ~X2C
{
- $name = $this->name;
- $ret = "<$name";
- foreach ($this->attrs as $attr => $val) {
- $ret .= sprintf(' %s="%s"', $attr, $val);
- }
- $contents = parent::render($template);
- if ($contents) {
- $ret .= ">$contents</$name>";
+ $this->attrs['CONTENTS'] = $this->renderContents($template);
+ $name = "bife_{$this->name}";
+ if ($template->exists($name, '')) {
+ $out = $template->parse($name, $this->attrs, '', '');
} else {
- $ret .= "/>";
+ $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 $ret;
+ return $out;
}
// -X2C
-} // -X2C Class :Copy
+} // -X2C Class :Translate
?>
\ No newline at end of file
<XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
</XMI.header>
<XMI.content>
- <docsettings viewid="113" documentation="Parse XML data getting widgets." uniqueid="155" />
+ <docsettings viewid="113" documentation="Parse XML data getting widgets." uniqueid="157" />
<umlobjects>
<UML:Class stereotype="" package="BIFE" xmi.id="5" abstract="1" documentation="Base container widget class.
x2c:extern" name="Container" static="0" scope="200" />
- <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="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 container." name="addContents" static="0" scope="200" >
- <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&mixed" abstract="0" documentation="Contents to add." name="contents" static="0" scope="200" />
- </UML:Operation>
+ <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_'." 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="&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="14" abstract="0" documentation="Page widget." name="Page" static="0" scope="200" />
- <UML:Class stereotype="" package="BIFE" xmi.id="17" abstract="0" documentation="Title widget." name="Title" 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.
x2c:extern" name="Fallback" static="0" scope="200" />
- <UML:Class stereotype="" package="BIFE" xmi.id="76" abstract="0" documentation="Fallback widget that copies the XML." name="Copy" static="0" scope="200" >
- <UML:Operation stereotype="" package="" xmi.id="79" type="void" abstract="0" documentation="Constructor." name="BIFE_Copy" static="0" scope="200" >
- <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="Widget name." name="name" static="0" scope="200" />
- <UML:Parameter stereotype="" package="" xmi.id="2" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
- </UML:Operation>
- <UML:Operation stereotype="" package="" xmi.id="80" 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="Widget name." name="name" static="0" scope="200" />
- <UML:Parameter stereotype="" package="" xmi.id="2" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
- </UML:Operation>
- <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="&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 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="&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="HTML/Template" xmi.id="130" abstract="0" documentation="Hooks vs. IT (HIT) is a simple template implementation, based on hooks and IT template systems.
-x2c:extern" name="HIT" static="0" scope="200" />
</umlobjects>
<diagrams>
<diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="1" showopsig="0" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="113" documentation="Class diagram for the basic classes." 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="107" showattsigs="601" usesdiagramusefillcolour="0" x="55" linecolour="#ff0000" y="330" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="67" usefillcolor="1" showattributes="1" xmi.id="76" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
- <UML:ConceptWidget usesdiagramfillcolour="0" width="117" showattsigs="601" usesdiagramusefillcolour="0" x="308" linecolour="#ff0000" y="150" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="82" 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="1" width="107" showattsigs="601" usesdiagramusefillcolour="1" x="313" linecolour="none" y="330" showopsigs="600" usesdiagramlinecolour="1" fillcolour="none" height="67" 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="0" width="79" showattsigs="601" usesdiagramusefillcolour="0" x="447" linecolour="#ff0000" y="330" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="29" usefillcolor="1" showattributes="1" xmi.id="14" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
- <UML:ConceptWidget usesdiagramfillcolour="0" width="76" showattsigs="601" usesdiagramusefillcolour="0" x="210" linecolour="#ff0000" y="330" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="29" usefillcolor="1" showattributes="1" xmi.id="17" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
- <UML:ConceptWidget usesdiagramfillcolour="0" width="97" showattsigs="600" usesdiagramusefillcolour="0" x="60" linecolour="#ff0000" y="150" 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="0" width="106" showattsigs="600" usesdiagramusefillcolour="0" x="178" linecolour="#ff0000" y="30" 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="104" showattsigs="601" usesdiagramusefillcolour="0" x="184" linecolour="#ff0000" y="110" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" 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="107" showattsigs="601" usesdiagramusefillcolour="0" x="40" linecolour="#ff0000" y="110" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" 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="0" width="97" showattsigs="600" usesdiagramusefillcolour="0" x="188" linecolour="#ff0000" y="30" 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="0" width="106" showattsigs="601" usesdiagramusefillcolour="0" x="40" linecolour="#ff0000" y="30" 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" />
</widgets>
<messages/>
<associations>
- <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="1" widgetbid="7" widgetaid="17" documentation="" type="500" >
- <linepath>
- <startpoint startx="248" starty="330" />
- <endpoint endx="337" endy="232" />
- </linepath>
- </UML:AssocWidget>
- <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="2" widgetbid="7" widgetaid="110" documentation="" type="500" >
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="61" widgetaid="7" documentation="" type="500" >
<linepath>
- <startpoint startx="366" starty="330" />
- <endpoint endx="366" endy="232" />
+ <startpoint startx="236" starty="110" />
+ <endpoint endx="236" endy="55" />
</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="2" indexb="1" widgetbid="5" widgetaid="110" documentation="" type="500" >
<linepath>
- <startpoint startx="108" starty="330" />
- <endpoint endx="108" endy="175" />
- </linepath>
- </UML:AssocWidget>
- <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="5" widgetaid="7" documentation="" type="500" >
- <linepath>
- <startpoint startx="366" starty="150" />
- <endpoint endx="248" endy="55" />
- </linepath>
- </UML:AssocWidget>
- <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="5" widgetaid="61" documentation="" type="500" >
- <linepath>
- <startpoint startx="108" starty="150" />
- <endpoint endx="213" endy="55" />
- </linepath>
- </UML:AssocWidget>
- <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="3" widgetbid="7" widgetaid="14" documentation="" type="500" >
- <linepath>
- <startpoint startx="486" starty="330" />
- <endpoint endx="395" endy="232" />
+ <startpoint startx="93" starty="110" />
+ <endpoint endx="93" endy="55" />
</linepath>
</UML:AssocWidget>
</associations>
</listitem>
<listitem open="1" type="803" id="-1" label="Basic" >
<listitem open="0" type="807" id="113" label="Basic Classes" />
- <listitem open="0" type="813" id="76" label="Copy" >
- <listitem open="0" type="815" id="79" label="BIFE_Copy" />
- <listitem open="0" type="815" id="80" label="__construct" />
- <listitem open="0" type="815" id="82" label="render" />
- </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="51" label="__construct" />
- <listitem open="0" type="815" id="11" label="addContents" />
- <listitem open="0" type="815" id="12" label="render" />
- </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="7" label="Translate" >
+ <listitem open="0" type="815" id="12" label="render" />
</listitem>
- <listitem open="0" type="813" id="14" label="Page" />
- <listitem open="0" type="813" id="17" label="Title" />
- </listitem>
- <listitem open="1" type="803" id="-1" label="HIT" >
- <listitem open="0" type="813" id="130" label="HIT" />
</listitem>
</listitem>
<listitem open="1" type="802" id="-1" label="Use Case View" />
<UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&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="HTML/Template" xmi.id="130" abstract="0" documentation="Hooks vs. IT (HIT) is a simple template implementation, based on hooks and IT template systems.
-x2c:extern" name="HIT" static="0" scope="200" />
</umlobjects>
<diagrams>
<diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="1" showopsig="0" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="116" documentation="" type="402" showops="1" showpackage="1" name="Menu Classes" localid="30000" showstereotype="0" showscope="1" font="Helvetica,9,-1,5,48,0,0,0,0,0" linecolor="#ff0000" >
<listitem open="1" type="803" id="-1" label="BIFE" >
<listitem open="0" type="813" id="3" label="Widget" />
</listitem>
- <listitem open="1" type="803" id="-1" label="HIT" >
- <listitem open="0" type="813" id="130" label="HIT" />
- </listitem>
<listitem open="1" type="803" id="-1" label="Menu" >
<listitem open="0" type="813" id="115" label="Menu" >
<listitem open="0" type="815" id="121" label="BIFE_Menu_Menu" />