src/Shared/Reference/ReferenceTrait.php
public function deReference(/*# string */ $subject)
    {
        // @since 2.1.0
        if (!$this->ref_enabled) {
            return $subject;
        }

        $loop = 0;
        $matched = [];
        while ($this->hasReference($subject, $matched)) {
            $this->checkReferenceLoop($loop++, $matched[2]); // avoid looping
            $val = $this->resolveReference($matched[2]);
            if (is_string($val)) {
                $subject = str_replace($matched[1], $val, $subject);
            } else {
                return $this->checkValue($val, $subject, $matched[1]);
            }
        }
        return $subject;
    }
public function deReference(/*# string */ $subject)
    {
        // @since 2.1.0
        if (!$this->ref_enabled) {
            return $subject;
        }

        $loop = 0;
        $matched = [];
        while ($this->hasReference($subject, $matched)) {
            $this->checkReferenceLoop($loop++, $matched[2]); // avoid looping
            $val = $this->resolveReference($matched[2]);
            if (is_string($val)) {
                $subject = str_replace($matched[1], $val, $subject);
            } else {
                return $this->checkValue($val, $subject, $matched[1]);
            }
        }
        return $subject;
    }
public function deReference ( /*# string */ $ subject ) { // @since 2.1.0 if ( ! $ this -> ref_enabled ) { return $ subject ; } $ loop = 0 ; $ matched = [ ] ; while ( $ this -> hasReference ( $ subject , $ matched ) ) { $ this -> checkReferenceLoop ( $ loop ++ , $ matched [ 2 ] ) ; // avoid looping $ val = $ this -> resolveReference ( $ matched [ 2 ] ) ; if ( is_string ( $ val ) ) { $ subject = str_replace ( $ matched [ 1 ] , $ val , $ subject ) ; } else { return $ this -> checkValue ( $ val , $ subject , $ matched [ 1 ] ) ; } } return $ subject ; }
{@inheritDoc}
{