| // +--------------------------------------------------------------------+ // // $Id$ // // +X2C includes require_once 'BIFE/Generic.php'; // ~X2C // +X2C Class 110 :Link /** * Link to another page. * * @access public */ class BIFE_Link extends BIFE_Generic { // ~X2C // +X2C Operation 111 /** * Constructor. * * @param array $attrs Attributes. * * @return void * @access public */ function BIFE_Link($attrs) // ~X2C { $this->__construct($attrs); } // -X2C // +X2C Operation 112 /** * Constructor. * * @param array $attrs Attributes. * * @return void * @access public */ function __construct($attrs) // ~X2C { if (isset($attrs['URL'])) { $this->attrs['URL'] = $attrs['URL']; unset($attrs['URL']); } else { $this->attrs['URL'] = ''; } if (isset($attrs['BIFE'])) { $this->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) { $this->attrs['QUERY'] = '?' . join('&', $query); } else { $this->attrs['QUERY'] = ''; } } // -X2C } // -X2C Class :Link ?>