public function getParams($options = array())
 {
     static $params;
     if (!isset($params)) {
         $params = array();
     }
     // set blank key if not set
     if (!isset($options['key'])) {
         $options['key'] = '';
     }
     // set blank path if not set
     if (!isset($options['path'])) {
         $options['path'] = '';
     }
     $signature = serialize($options);
     if (empty($params[$signature])) {
         wfimport('admin.helpers.extension');
         // get component
         $component = WFExtensionHelper::getComponent();
         // get params data for this profile
         $profile = $this->getProfile();
         $profile_params = array();
         $component_params = array();
         if (!empty($component->params)) {
             $component_params = json_decode($component->params, true);
             // set null as array
             if (!$component_params) {
                 $component_params = array();
             }
         }
         if ($profile) {
             $profile_params = json_decode($profile->params, true);
             // set null as array
             if (!$profile_params) {
                 $profile_params = array();
             }
         }
         // merge data and convert to json string
         $data = WFParameter::array_to_object(array_merge_recursive($component_params, $profile_params));
         $params[$signature] = new WFParameter($data, $options['path'], $options['key']);
     }
     return $params[$signature];
 }