classes/phing/filters/TidyFilter.php
public function read($len = null)
    {
        if (!class_exists('Tidy')) {
            throw new BuildException("You must enable the 'tidy' extension in your PHP configuration in order to use the Tidy filter.");
        }

        if (!$this->getInitialized()) {
            $this->_initialize();
            $this->setInitialized(true);
        }

        $buffer = $this->in->read($len);
        if ($buffer === -1) {
            return -1;
        }

        $config = $this->getDistilledConfig();

        $tidy = new Tidy();
        $tidy->parseString($buffer, $config, $this->encoding);
        $tidy->cleanRepair();

        return tidy_get_output($tidy);
    }
public function read($len = null)
    {
        if (!class_exists('Tidy')) {
            throw new BuildException("You must enable the 'tidy' extension in your PHP configuration in order to use the Tidy filter.");
        }

        if (!$this->getInitialized()) {
            $this->_initialize();
            $this->setInitialized(true);
        }

        $buffer = $this->in->read($len);
        if ($buffer === -1) {
            return -1;
        }

        $config = $this->getDistilledConfig();

        $tidy = new Tidy();
        $tidy->parseString($buffer, $config, $this->encoding);
        $tidy->cleanRepair();

        return tidy_get_output($tidy);
    }
public function read ( $ len = null ) { if ( ! class_exists ( 'Tidy' ) ) { throw new BuildException ( "You must enable the 'tidy' extension in your PHP configuration in order to use the Tidy filter." ) ; } if ( ! $ this -> getInitialized ( ) ) { $ this -> _initialize ( ) ; $ this -> setInitialized ( true ) ; } $ buffer = $ this -> in -> read ( $ len ) ; if ( $ buffer === - 1 ) { return - 1 ; } $ config = $ this -> getDistilledConfig ( ) ; $ tidy = new Tidy ( ) ; $ tidy -> parseString ( $ buffer , $ config , $ this -> encoding ) ; $ tidy -> cleanRepair ( ) ; return tidy_get_output ( $ tidy ) ; }
Reads input and returns Tidy-filtered output.

@param  null $len
@throws BuildException
@return int the resulting stream, or -1 if the end of the resulting stream has been reached
Reads input and returns Tidy - filtered output .