Changeset 10004

Show
Ignore:
Timestamp:
11/22/08 13:02:37 (2 months ago)
Author:
afz
Message:

some temporary changes in core gadget modules

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/jaws/html/include/Jaws/Gadget.php

    r9990 r10004  
    377377        $result = (isset($this->_ValidAction['LayoutAction'])) ? $this->_ValidAction['LayoutAction'] : array(); 
    378378        return $result; 
     379    } 
     380 
     381    /** 
     382     * Add a new registry key 
     383     * 
     384     * @access  public 
     385     * @param   string  $key    The key 
     386     * @param   string  $value  The value 
     387     * @param   string  $comp   Component's name 
     388     * @param   integer $type   Component's type 
     389     */ 
     390    function AddRegKey($key, $value, $comp = '', $type = JAWS_COMPONENT_GADGET) 
     391    { 
     392        $comp = empty($comp)? $this->_Name : $comp; 
     393        return $GLOBALS['app']->Registry->NewKey($key, $value, $comp, $type); 
     394    } 
     395 
     396    /** 
     397     * Search for a key in the registry 
     398     * 
     399     * @access  public 
     400     * @param   string  $key  The key 
     401     * @param   string  $comp Component's name 
     402     * @return  string  The value of the key 
     403     */ 
     404    function GetRegKey($key, $comp = '') 
     405    { 
     406        $comp = empty($comp)? $this->_Name : $comp; 
     407        return $GLOBALS['app']->Registry->Get($key, $comp); 
     408    } 
     409 
     410    /** 
     411     * Updates the value of a registry key 
     412     * 
     413     * @access  public 
     414     * @param   string  $key    The key 
     415     * @param   string  $value  The value 
     416     * @param   string  $comp   Component's name 
     417     */ 
     418    function SetRegKey($key, $value, $comp = '') 
     419    { 
     420        $comp = empty($comp)? $this->_Name : $comp; 
     421        return $GLOBALS['app']->Registry->Set($key, $value, $comp); 
     422    } 
     423 
     424    /** 
     425     * Delete a registry key 
     426     * 
     427     * @access  public 
     428     * @param   string  $key  The key 
     429     * @param   string  $comp Component's name 
     430     */ 
     431    function DelRegKey($key, $comp = '') 
     432    { 
     433        $comp = empty($comp)? $this->_Name : $comp; 
     434        return $GLOBALS['app']->Registry->DeleteKey($key, $comp); 
    379435    } 
    380436 
  • trunk/jaws/html/include/Jaws/Gadget/HTML.php

    r9214 r10004  
    99 * @license    http://www.gnu.org/copyleft/lesser.html 
    1010 */ 
     11require_once JAWS_PATH . 'include/Jaws/Gadget.php'; 
     12 
    1113class Jaws_Gadget_HTML extends Jaws_Gadget 
    1214{ 
  • trunk/jaws/html/include/Jaws/Gadget/Model.php

    r10003 r10004  
    1111 * @license    http://www.gnu.org/copyleft/lesser.html 
    1212 */ 
     13require_once JAWS_PATH . 'include/Jaws/Gadget.php'; 
     14 
    1315class Jaws_Gadget_Model 
    1416{ 
     
    104106    { 
    105107        return $this->_Description; 
    106     } 
    107  
    108     /** 
    109      * Add a new registry key 
    110      * 
    111      * @access  public 
    112      * @param   string  $key    The key 
    113      * @param   string  $value  The value 
    114      * @param   string  $comp   Component's name 
    115      * @param   integer $type   Component's type 
    116      */ 
    117     function AddRegKey($key, $value, $comp = '', $type = JAWS_COMPONENT_GADGET) 
    118     { 
    119         $comp = empty($comp)? $this->_Name : $comp; 
    120         return $GLOBALS['app']->Registry->NewKey($key, $value, $comp, $type); 
    121     } 
    122  
    123     /** 
    124      * Search for a key in the registry 
    125      * 
    126      * @access  public 
    127      * @param   string  $key  The key 
    128      * @param   string  $comp Component's name 
    129      * @return  string  The value of the key 
    130      */ 
    131     function GetRegKey($key, $comp = '') 
    132     { 
    133         $comp = empty($comp)? $this->_Name : $comp; 
    134         return $GLOBALS['app']->Registry->Get($key, $comp); 
    135     } 
    136  
    137     /** 
    138      * Updates the value of a registry key 
    139      * 
    140      * @access  public 
    141      * @param   string  $key    The key 
    142      * @param   string  $value  The value 
    143      * @param   string  $comp   Component's name 
    144      */ 
    145     function SetRegKey($key, $value, $comp = '') 
    146     { 
    147         $comp = empty($comp)? $this->_Name : $comp; 
    148         return $GLOBALS['app']->Registry->Set($key, $value, $comp); 
    149     } 
    150  
    151     /** 
    152      * Delete a registry key 
    153      * 
    154      * @access  public 
    155      * @param   string  $key  The key 
    156      * @param   string  $comp Component's name 
    157      */ 
    158     function DelRegKey($key, $comp = '') 
    159     { 
    160         $comp = empty($comp)? $this->_Name : $comp; 
    161         return $GLOBALS['app']->Registry->DeleteKey($key, $comp); 
    162108    } 
    163109