original_string: protected function getUrlInstanceFromConfig(
          $urlConfig,
          array $defaultHTTPCodes,
          array $defaultOptions,
          array $profiles
      ) {
          $url = $this->getUrlPathFromConfig($urlConfig);
  
          $urlHTTPCodes = $this->getUrlHTTPCodesFromConfig(
              $urlConfig,
              $defaultHTTPCodes
          );
  
          $urlOptions = $this->getUrlOptionsFromConfig(
              $urlConfig,
              $defaultOptions
          );
  
          if (
              isset($urlOptions['profile']) &&
              isset($profiles[$urlOptions['profile']]) &&
              is_array($profiles[$urlOptions['profile']])
          ) {
              $urlOptions = array_merge(
                  $profiles[$urlOptions['profile']],
                  $urlOptions
              );
          }
  
          return $this
              ->urlFactory
              ->create(
                  $url,
                  $urlHTTPCodes,
                  $urlOptions
              );
      }
code: protected function getUrlInstanceFromConfig(
          $urlConfig,
          array $defaultHTTPCodes,
          array $defaultOptions,
          array $profiles
      ) {
          $url = $this->getUrlPathFromConfig($urlConfig);
  
          $urlHTTPCodes = $this->getUrlHTTPCodesFromConfig(
              $urlConfig,
              $defaultHTTPCodes
          );
  
          $urlOptions = $this->getUrlOptionsFromConfig(
              $urlConfig,
              $defaultOptions
          );
  
          if (
              isset($urlOptions['profile']) &&
              isset($profiles[$urlOptions['profile']]) &&
              is_array($profiles[$urlOptions['profile']])
          ) {
              $urlOptions = array_merge(
                  $profiles[$urlOptions['profile']],
                  $urlOptions
              );
          }
  
          return $this
              ->urlFactory
              ->create(
                  $url,
                  $urlHTTPCodes,
                  $urlOptions
              );
      }
code_tokens: protected function getUrlInstanceFromConfig ( $ urlConfig , array $ defaultHTTPCodes , array $ defaultOptions , array $ profiles ) { $ url = $ this -> getUrlPathFromConfig ( $ urlConfig ) ; $ urlHTTPCodes = $ this -> getUrlHTTPCodesFromConfig ( $ urlConfig , $ defaultHTTPCodes ) ; $ urlOptions = $ this -> getUrlOptionsFromConfig ( $ urlConfig , $ defaultOptions ) ; if ( isset ( $ urlOptions [ 'profile' ] ) && isset ( $ profiles [ $ urlOptions [ 'profile' ] ] ) && is_array ( $ profiles [ $ urlOptions [ 'profile' ] ] ) ) { $ urlOptions = array_merge ( $ profiles [ $ urlOptions [ 'profile' ] ] , $ urlOptions ) ; } return $ this -> urlFactory -> create ( $ url , $ urlHTTPCodes , $ urlOptions ) ; }
docstring: Get Url instance given its configuration
  
  @param mixed    $urlConfig        Url configuration
  @param string[] $defaultHTTPCodes Array of HTTP Codes
  @param array    $defaultOptions   Default options
  @param array    $profiles         Profiles
  
  @return URL Url instance
docstring_tokens: Get Url instance given its configuration