classes/phing/filters/ReplaceTokensWithFile.php
public function read($len = null)
    {
        if (!$this->getInitialized()) {
            $this->_initialize();
            $this->setInitialized(true);
        }

        // read from next filter up the chain
        $buffer = $this->in->read($len);

        if ($buffer === -1) {
            return -1;
        }

        // filter buffer
        $buffer = preg_replace_callback(
            "$" . preg_quote($this->_beginToken) . "([\w\.\-:\/]+?)" . preg_quote($this->_endToken) . "$",
            [$this, 'replaceTokenCallback'],
            $buffer
        );

        return $buffer;
    }
public function read($len = null)
    {
        if (!$this->getInitialized()) {
            $this->_initialize();
            $this->setInitialized(true);
        }

        // read from next filter up the chain
        $buffer = $this->in->read($len);

        if ($buffer === -1) {
            return -1;
        }

        // filter buffer
        $buffer = preg_replace_callback(
            "$" . preg_quote($this->_beginToken) . "([\w\.\-:\/]+?)" . preg_quote($this->_endToken) . "$",
            [$this, 'replaceTokenCallback'],
            $buffer
        );

        return $buffer;
    }
public function read ( $ len = null ) { if ( ! $ this -> getInitialized ( ) ) { $ this -> _initialize ( ) ; $ this -> setInitialized ( true ) ; } // read from next filter up the chain $ buffer = $ this -> in -> read ( $ len ) ; if ( $ buffer === - 1 ) { return - 1 ; } // filter buffer $ buffer = preg_replace_callback ( "$" . preg_quote ( $ this -> _beginToken ) . "([\w\.\-:\/]+?)" . preg_quote ( $ this -> _endToken ) . "$" , [ $ this , 'replaceTokenCallback' ] , $ buffer ) ; return $ buffer ; }
Returns stream with tokens having been replaced with appropriate values.
If a replacement value is not found for a token, the token is left in the stream.

@param  null $len
@return mixed filtered stream, -1 on EOF.
Returns stream with tokens having been replaced with appropriate values . If a replacement value is not found for a token the token is left in the stream .