| [ Index ] |
PHP Cross Reference of Quick Form DataBase |
[Summary view] [Print] [Text view]
1 <?php 2 if (!defined('QFDB_SECURITY')) { 3 die("You can't access this file directly..."); 4 } 5 6 7 /** 8 * Graphic QFDB Object: print LEGEND 9 * 10 * @author Everaldo Wanderlei Uavniczak <everaldouav [at] gmail.com> 11 * @since 0.1 12 * @package quickformdb 13 * @see http://www.qfdb.net/ 14 * @see quickformdb::dtd 15 * @license BSD License <http://www.qfdb.net/bsd_license.txt> 16 * @link http://w3schools.com/tags/tag_legend.asp 17 * @link http://w3schools.com/tags/tag_fieldset.asp 18 * @todo implement warning if used DTD strict with 'align' (legend attribute) 19 * @todo Add Error Constant 'QFDBOBJ_LEGEND_TEXT_EMPTY' in Docs 20 */ 21 22 23 24 class qfdbobj_legend { 25 26 static function obj_struct(&$qfdb) 27 { 28 $qfdb->m['object'] = 'legend'; // string (fixed) 29 $qfdb->m['status'] = '12345'; // string 30 $qfdb->m['if'] = ''; // string 31 $qfdb->m['alias'] = ''; // string 32 33 $qfdb->m['text'] = ''; // string 34 $qfdb->m['align'] = ''; // string 35 36 $qfdb->m['id'] = ''; // string 37 $qfdb->m['style'] = ''; // string 38 $qfdb->m['class'] = $qfdb->get_css_value('qfdb_legend'); // string 39 $qfdb->m['title'] = ''; // string 40 41 $qfdb->m['others'] = ''; // string 42 43 $qfdb->m['object_properties'] = count($qfdb->m) +2; // int 44 } // end func 45 46 47 static function obj_html(&$qfdb) 48 { 49 $object = '<legend'; 50 if ($qfdb->m['align']) { 51 $object .= ' align="'.$qfdb->m['align'].'"'; 52 } 53 if ($qfdb->m['style']) { 54 $object .= ' style="'.$qfdb->m['style'].'"'; 55 } 56 if ($qfdb->m['class']) { 57 $object .= ' class="'.$qfdb->m['class'].'"'; 58 } 59 if ($qfdb->m['title']) { 60 $object .= ' title="'.$qfdb->m['title'].'"'; 61 } 62 if ($qfdb->m['id']) { 63 $object .= ' id="'.$qfdb->m['id'].'"'; 64 } 65 $object .= $qfdb->m['others'].">{$qfdb->m['text']}</legend>\n"; 66 $qfdb->add_output('html', $object); 67 68 } // end func 69 70 71 static function obj_db(&$qfdb) 72 { 73 self::obj_html($qfdb); 74 } // end func 75 76 77 78 static function obj_debug(&$qfdb) 79 { 80 if (!$qfdb->m['text']) { 81 $qfdb->set_warning(QFDBOBJ_LEGEND_TEXT_EMPTY); 82 } 83 } // end func 84 85 86 static function obj_fixed(&$qfdb) 87 { 88 $qfdb->fix_others(); 89 } // end func 90 91 } // end class
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Nov 14 17:48:13 2008 | Cross-referenced by PHPXref 0.7 |