original_string: protected function renderCrumbs()
      {
          end($this->breadcrumbs);
          $lastKey = key($this->breadcrumbs);
  
          $output = '';
  
          $hrefSegments = array();
  
          $position = 1;
  
          foreach ($this->breadcrumbs as $key => $crumb) {
              $isLast = ($lastKey === $key);
  
              if ($crumb['hrefIsFullUrl']) {
                  $hrefSegments = array();
              }
  
              if ($crumb['href']) {
                  $hrefSegments[] = $crumb['href'];
              }
  
              $href = implode('/', $hrefSegments);
  
              if (!preg_match('#^https?://.*#', $href)) {
                  $href = "/{$href}";
              }
  
              $output .= $this->renderCrumb($crumb['name'], $href, $isLast, $position);
              $position++;
          }
  
          return $output;
      }
code: protected function renderCrumbs()
      {
          end($this->breadcrumbs);
          $lastKey = key($this->breadcrumbs);
  
          $output = '';
  
          $hrefSegments = array();
  
          $position = 1;
  
          foreach ($this->breadcrumbs as $key => $crumb) {
              $isLast = ($lastKey === $key);
  
              if ($crumb['hrefIsFullUrl']) {
                  $hrefSegments = array();
              }
  
              if ($crumb['href']) {
                  $hrefSegments[] = $crumb['href'];
              }
  
              $href = implode('/', $hrefSegments);
  
              if (!preg_match('#^https?://.*#', $href)) {
                  $href = "/{$href}";
              }
  
              $output .= $this->renderCrumb($crumb['name'], $href, $isLast, $position);
              $position++;
          }
  
          return $output;
      }
code_tokens: protected function renderCrumbs ( ) { end ( $ this -> breadcrumbs ) ; $ lastKey = key ( $ this -> breadcrumbs ) ; $ output = '' ; $ hrefSegments = array ( ) ; $ position = 1 ; foreach ( $ this -> breadcrumbs as $ key => $ crumb ) { $ isLast = ( $ lastKey === $ key ) ; if ( $ crumb [ 'hrefIsFullUrl' ] ) { $ hrefSegments = array ( ) ; } if ( $ crumb [ 'href' ] ) { $ hrefSegments [ ] = $ crumb [ 'href' ] ; } $ href = implode ( '/' , $ hrefSegments ) ; if ( ! preg_match ( '#^https?://.*#' , $ href ) ) { $ href = "/{$href}" ; } $ output .= $ this -> renderCrumb ( $ crumb [ 'name' ] , $ href , $ isLast , $ position ) ; $ position ++ ; } return $ output ; }
docstring: Renders the crumbs one by one, and returns them concatenated.
  
  @return string
docstring_tokens: Renders the crumbs one by one and returns them concatenated .