/**
  * Apply the description changes
  * 
  * @param SiteComponent $siteComponent
  * @return void
  * @access public
  * @since 1/16/07
  */
 function applyWidth($siteComponent)
 {
     if (!is_null(RequestContext::value('width')) && RequestContext::value('width') !== $siteComponent->getWidth()) {
         if (preg_match('/([0-9]+)\\s*(px|%|em)/i', RequestContext::value('width'), $matches)) {
             $siteComponent->updateWidth($matches[1] . strtolower($matches[2]));
         } else {
             $siteComponent->updateWidth('');
         }
     }
 }
 /**
  * Apply common properties a siteComponent
  * 
  * @param object SiteComponent $siteComponent
  * @param object DOMElement $element
  * @return void
  * @access protected
  * @since 1/22/08
  */
 protected function applyCommonProperties(SiteComponent $siteComponent, DOMElement $element)
 {
     if ($element->hasAttribute('showDisplayNames')) {
         $siteComponent->updateShowDisplayNames($element->getAttribute('showDisplayNames'));
     }
     if ($element->hasAttribute('showHistory')) {
         $siteComponent->updateShowHistorySetting($element->getAttribute('showHistory'));
     }
     if ($element->hasAttribute('showDates')) {
         $siteComponent->updateShowDatesSetting($element->getAttribute('showDates'));
     }
     if ($element->hasAttribute('showAttribution')) {
         $siteComponent->updateShowAttributionSetting($element->getAttribute('showAttribution'));
     }
     if ($element->hasAttribute('sortMethod')) {
         $siteComponent->updateSortMethodSetting($element->getAttribute('sortMethod'));
     }
     if ($element->hasAttribute('commentsEnabled')) {
         $siteComponent->updateCommentsEnabled($element->getAttribute('commentsEnabled'));
     }
     if ($element->hasAttribute('width')) {
         $siteComponent->updateWidth($element->getAttribute('width'));
     }
     if ($element->hasAttribute('showDates')) {
         $siteComponent->updateShowDatesSetting($element->getAttribute('showDates'));
     }
     if ($element->hasAttribute('showAttribution')) {
         $siteComponent->updateShowAttributionSetting($element->getAttribute('showAttribution'));
     }
 }