/**
  * Resolves macros in the item key.
  *
  * @param string $key		an item key
  * @param array  $macros	the list of macros (['{<MACRO>}' => '<value>', ...])
  * @param array  $types		the types of macros (see getMacroPositions() for more details)
  *
  * @return string
  */
 protected function resolveItemKeyMacros($key, array $macros, array $types)
 {
     $item_key_parser = new CItemKey();
     if ($item_key_parser->parse($key) == CParser::PARSE_SUCCESS) {
         $key = $this->resolveItemKeyParamsMacros($key, $item_key_parser->getParamsRaw(), $macros, $types);
     }
     return $key;
 }