1: <?php
 2:     /**
 3:      * QRadioButton Base File
 4:      * 
 5:      * The QJqRadioButtonBase class defined here provides an interface between the generated
 6:      * QJqRadioButtonGen class, and QCubed. This file is part of the core and will be overwritten
 7:      * when you update QCubed. To override, make your changes to the QJqRadioButton.class.php file instead.
 8:      *
 9:      */
10: 
11:      /**
12:       * Implements a JQuery UI Radio Button
13:       * 
14:       * Use in the same way you would use a standard radio button
15:       * 
16:       * One of the QJqRadioButtonGen properties use the same names as standard QCubed properties.
17:       * The text property is a boolean in the JqUi object that specifies whether
18:       * to show text or just icons (provided icons are defined), and the Label property overrides
19:       * the standard HTML of the button. Because of the name conflict, the JQ UI property is called
20:       * ->JqText. You can also use ShowText as an alias to this as well so that your code is more readable.
21:       *     Text = standard html text of button
22:       *  Label = override of standard HTML text, if you want a button to say something different when JS is on or off
23:       *  ShowText = whether or not to hide the text of the button when icons are set
24:       * 
25:       *  @property boolean $ShowText Causes text to be shown when icons are also defined.
26:       *  
27:       *  @link http://jqueryui.com/button/#radio
28:       *  @package Controls\Base
29:       * 
30:       */
31:      
32:     class QJqRadioButtonBase extends QJqRadioButtonGen
33:     {
34:         public function __get($strName) {
35:             switch ($strName) {
36:                 case 'ShowText': return $this->blnJqText;
37:                 
38:                 default: 
39:                     try { 
40:                         return parent::__get($strName); 
41:                     } catch (QCallerException $objExc) { 
42:                         $objExc->IncrementOffset(); 
43:                         throw $objExc; 
44:                     }
45:             }
46:         }
47:         
48:         public function __set($strName, $mixValue) {
49:             switch ($strName) {
50:                 case 'ShowText':    // true if the text should be shown when icons are defined
51:                     $this->JqText = $mixValue;
52:                     break;
53:                                     
54:                 default:
55:                     try {
56:                         parent::__set($strName, $mixValue);
57:                     } catch (QCallerException $objExc) {
58:                         $objExc->IncrementOffset();
59:                         throw $objExc;
60:                     }
61:                     break;
62:             }
63:         }
64:         
65:     }