original_string: public function getComponentProperties($componentName)
      {
          $key = md5($this->theme->getPath()).'component-properties';
  
          if (self::$objectComponentPropertyMap !== null) {
              $objectComponentMap = self::$objectComponentPropertyMap;
          }
          else {
              $cached = Cache::get($key, false);
              $unserialized = $cached ? @unserialize(@base64_decode($cached)) : false;
              $objectComponentMap = $unserialized ?: [];
              if ($objectComponentMap) {
                  self::$objectComponentPropertyMap = $objectComponentMap;
              }
          }
  
          $objectCode = $this->getBaseFileName();
  
          if (array_key_exists($objectCode, $objectComponentMap)) {
              if (array_key_exists($componentName, $objectComponentMap[$objectCode])) {
                  return $objectComponentMap[$objectCode][$componentName];
              }
  
              return [];
          }
  
          if (!isset($this->settings['components'])) {
              $objectComponentMap[$objectCode] = [];
          }
          else {
              foreach ($this->settings['components'] as $name => $settings) {
                  $nameParts = explode(' ', $name);
                  if (count($nameParts) > 1) {
                      $name = trim($nameParts[0]);
                  }
  
                  $component = $this->getComponent($name);
                  if (!$component) {
                      continue;
                  }
  
                  $componentProperties = [];
                  $propertyDefinitions = $component->defineProperties();
                  foreach ($propertyDefinitions as $propertyName => $propertyInfo) {
                      $componentProperties[$propertyName] = $component->property($propertyName);
                  }
  
                  $objectComponentMap[$objectCode][$name] = $componentProperties;
              }
          }
  
          self::$objectComponentPropertyMap = $objectComponentMap;
  
          Cache::put($key, base64_encode(serialize($objectComponentMap)), Config::get('cms.parsedPageCacheTTL', 10));
  
          if (array_key_exists($componentName, $objectComponentMap[$objectCode])) {
              return $objectComponentMap[$objectCode][$componentName];
          }
  
          return [];
      }
code: public function getComponentProperties($componentName)
      {
          $key = md5($this->theme->getPath()).'component-properties';
  
          if (self::$objectComponentPropertyMap !== null) {
              $objectComponentMap = self::$objectComponentPropertyMap;
          }
          else {
              $cached = Cache::get($key, false);
              $unserialized = $cached ? @unserialize(@base64_decode($cached)) : false;
              $objectComponentMap = $unserialized ?: [];
              if ($objectComponentMap) {
                  self::$objectComponentPropertyMap = $objectComponentMap;
              }
          }
  
          $objectCode = $this->getBaseFileName();
  
          if (array_key_exists($objectCode, $objectComponentMap)) {
              if (array_key_exists($componentName, $objectComponentMap[$objectCode])) {
                  return $objectComponentMap[$objectCode][$componentName];
              }
  
              return [];
          }
  
          if (!isset($this->settings['components'])) {
              $objectComponentMap[$objectCode] = [];
          }
          else {
              foreach ($this->settings['components'] as $name => $settings) {
                  $nameParts = explode(' ', $name);
                  if (count($nameParts) > 1) {
                      $name = trim($nameParts[0]);
                  }
  
                  $component = $this->getComponent($name);
                  if (!$component) {
                      continue;
                  }
  
                  $componentProperties = [];
                  $propertyDefinitions = $component->defineProperties();
                  foreach ($propertyDefinitions as $propertyName => $propertyInfo) {
                      $componentProperties[$propertyName] = $component->property($propertyName);
                  }
  
                  $objectComponentMap[$objectCode][$name] = $componentProperties;
              }
          }
  
          self::$objectComponentPropertyMap = $objectComponentMap;
  
          Cache::put($key, base64_encode(serialize($objectComponentMap)), Config::get('cms.parsedPageCacheTTL', 10));
  
          if (array_key_exists($componentName, $objectComponentMap[$objectCode])) {
              return $objectComponentMap[$objectCode][$componentName];
          }
  
          return [];
      }
code_tokens: public function getComponentProperties ( $ componentName ) { $ key = md5 ( $ this -> theme -> getPath ( ) ) . 'component-properties' ; if ( self :: $ objectComponentPropertyMap !== null ) { $ objectComponentMap = self :: $ objectComponentPropertyMap ; } else { $ cached = Cache :: get ( $ key , false ) ; $ unserialized = $ cached ? @ unserialize ( @ base64_decode ( $ cached ) ) : false ; $ objectComponentMap = $ unserialized ? : [ ] ; if ( $ objectComponentMap ) { self :: $ objectComponentPropertyMap = $ objectComponentMap ; } } $ objectCode = $ this -> getBaseFileName ( ) ; if ( array_key_exists ( $ objectCode , $ objectComponentMap ) ) { if ( array_key_exists ( $ componentName , $ objectComponentMap [ $ objectCode ] ) ) { return $ objectComponentMap [ $ objectCode ] [ $ componentName ] ; } return [ ] ; } if ( ! isset ( $ this -> settings [ 'components' ] ) ) { $ objectComponentMap [ $ objectCode ] = [ ] ; } else { foreach ( $ this -> settings [ 'components' ] as $ name => $ settings ) { $ nameParts = explode ( ' ' , $ name ) ; if ( count ( $ nameParts ) > 1 ) { $ name = trim ( $ nameParts [ 0 ] ) ; } $ component = $ this -> getComponent ( $ name ) ; if ( ! $ component ) { continue ; } $ componentProperties = [ ] ; $ propertyDefinitions = $ component -> defineProperties ( ) ; foreach ( $ propertyDefinitions as $ propertyName => $ propertyInfo ) { $ componentProperties [ $ propertyName ] = $ component -> property ( $ propertyName ) ; } $ objectComponentMap [ $ objectCode ] [ $ name ] = $ componentProperties ; } } self :: $ objectComponentPropertyMap = $ objectComponentMap ; Cache :: put ( $ key , base64_encode ( serialize ( $ objectComponentMap ) ) , Config :: get ( 'cms.parsedPageCacheTTL' , 10 ) ) ; if ( array_key_exists ( $ componentName , $ objectComponentMap [ $ objectCode ] ) ) { return $ objectComponentMap [ $ objectCode ] [ $ componentName ] ; } return [ ] ; }
docstring: Returns component property names and values.
  This method implements caching and can be used in the run-time on the front-end.
  @param string $componentName Specifies the component name.
  @return array Returns an associative array with property names in the keys and property values in the values.
docstring_tokens: Returns component property names and values . This method implements caching and can be used in the run - time on the front - end .