original_string: private function sregValue($value = '')
      {
          $owner = $this->owner;
          $values = explode('|', $value);
          $count = count($values);
          foreach ($values as $key => $fieldPath) {
              if ($fieldPath == '' || $fieldPath == 'null') {
                  return null;
              } elseif ($relValue = $this->sregTraverse($fieldPath)) {
                  if (is_object($relValue) && method_exists($relValue, 'AbsoluteLink')) {
                      if ($link = $relValue->AbsoluteLink()) {
                          return $link;
                      } else {
                          continue;
                      }
                  } else {
                      return $relValue;
                  }
              } elseif ($key + 1 == $count && !$owner->hasMethod($fieldPath) ) {
                  return $fieldPath;
              }
          }
      }
code: private function sregValue($value = '')
      {
          $owner = $this->owner;
          $values = explode('|', $value);
          $count = count($values);
          foreach ($values as $key => $fieldPath) {
              if ($fieldPath == '' || $fieldPath == 'null') {
                  return null;
              } elseif ($relValue = $this->sregTraverse($fieldPath)) {
                  if (is_object($relValue) && method_exists($relValue, 'AbsoluteLink')) {
                      if ($link = $relValue->AbsoluteLink()) {
                          return $link;
                      } else {
                          continue;
                      }
                  } else {
                      return $relValue;
                  }
              } elseif ($key + 1 == $count && !$owner->hasMethod($fieldPath) ) {
                  return $fieldPath;
              }
          }
      }
code_tokens: private function sregValue ( $ value = '' ) { $ owner = $ this -> owner ; $ values = explode ( '|' , $ value ) ; $ count = count ( $ values ) ; foreach ( $ values as $ key => $ fieldPath ) { if ( $ fieldPath == '' || $ fieldPath == 'null' ) { return null ; } elseif ( $ relValue = $ this -> sregTraverse ( $ fieldPath ) ) { if ( is_object ( $ relValue ) && method_exists ( $ relValue , 'AbsoluteLink' ) ) { if ( $ link = $ relValue -> AbsoluteLink ( ) ) { return $ link ; } else { continue ; } } else { return $ relValue ; } } elseif ( $ key + 1 == $ count && ! $ owner -> hasMethod ( $ fieldPath ) ) { return $ fieldPath ; } } }
docstring: Splits string by |, loops each segment and returns the first non-null value
  @param string $value
  @param boolean $allowNoMatch
  @return string|null
docstring_tokens: Splits string by | loops each segment and returns the first non - null value