| // +--------------------------------------------------------------------+ // // $Id$ // // +X2C includes require_once 'BIFE/Widget.php'; // ~X2C require_once 'Album.php'; // +X2C Class 20 :Album /** * Photo album widget. [TODO: Make a better explanation] * * @access public */ class BIFE_Album extends BIFE_Widget { /** * Attributes. * * @var array $attrs * @access public */ var $attrs; // ~X2C // +X2C Operation 22 /** * Constructor. * * @param array $attrs Attributes. * * @return void * @access public */ function BIFE_Album($attrs) // ~X2C { $defaults = array( 'DIR' => '.', 'RECURSIVE' => true, 'THUMBSFORMAT' => 'jpeg', 'THUMBSDIR' => '.thumbs', 'EXTENSIONS' => 'png,jpg,jpeg,gif', 'SELECTED' => '', 'MAXROWS' => 0, 'COLUMNS' => 4, ); $this->attrs = array_merge($defaults, $attrs); } // -X2C // +X2C Operation 23 /** * Renders the widget. * * @param HTML_Template_Sigma &$template Template to use to render the widget. * * @return void * @access public */ function render(&$template) // ~X2C { extract($this->attrs, EXTR_SKIP); $album =& new Hook_Album($DIR, $RECURSIVE, $THUMBSFORMAT, $THUMBSDIR, $EXTENSIONS); return $album->album($template, $SELECTED, $MAXROWS, $COLUMNS); } // -X2C } // -X2C Class :Album ?>