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;
            }
        }
    }
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;
            }
        }
    }
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 ; } } }
Splits string by |, loops each segment and returns the first non-null value
@param string $value
@param boolean $allowNoMatch
@return string|null
Splits string by | loops each segment and returns the first non - null value