protected function beforeProcess()
    {
        // -- Deal with file handling.
        $sourceFp = @fopen($this->getSource(), 'r');
        $destinationFp = @fopen($this->getDestination(), 'w');
        
        if ($sourceFp === false) {
            return new Report(
                Report::TYPE_ERROR,
                "Source file '" . $this->getSource() . "' could not be open."
            );
        } else {
            $this->setSourceFp($sourceFp);
        }
        
        if ($destinationFp === false) {
            return new Report(
                Report::TYPE_ERROR,
                "Destination file '" . $this->getDestination() . "' could not be open."
            );
        } else {
            $this->setDestinationFp($destinationFp);
            return new Report(
                Report::TYPE_SUCCESS,
                "Source and destination files open."
            );
        }
    }
protected function beforeProcess()
    {
        // -- Deal with file handling.
        $sourceFp = @fopen($this->getSource(), 'r');
        $destinationFp = @fopen($this->getDestination(), 'w');
        
        if ($sourceFp === false) {
            return new Report(
                Report::TYPE_ERROR,
                "Source file '" . $this->getSource() . "' could not be open."
            );
        } else {
            $this->setSourceFp($sourceFp);
        }
        
        if ($destinationFp === false) {
            return new Report(
                Report::TYPE_ERROR,
                "Destination file '" . $this->getDestination() . "' could not be open."
            );
        } else {
            $this->setDestinationFp($destinationFp);
            return new Report(
                Report::TYPE_SUCCESS,
                "Source and destination files open."
            );
        }
    }
protected function beforeProcess ( ) { // -- Deal with file handling. $ sourceFp = @ fopen ( $ this -> getSource ( ) , 'r' ) ; $ destinationFp = @ fopen ( $ this -> getDestination ( ) , 'w' ) ; if ( $ sourceFp === false ) { return new Report ( Report :: TYPE_ERROR , "Source file '" . $ this -> getSource ( ) . "' could not be open." ) ; } else { $ this -> setSourceFp ( $ sourceFp ) ; } if ( $ destinationFp === false ) { return new Report ( Report :: TYPE_ERROR , "Destination file '" . $ this -> getDestination ( ) . "' could not be open." ) ; } else { $ this -> setDestinationFp ( $ destinationFp ) ; return new Report ( Report :: TYPE_SUCCESS , "Source and destination files open." ) ; } }
Behaviour to be triggered at the beginning of the script.

This method contains the behaviours to be aplied at the very
beginning of the script. In this abstract class, it opens the source
and destination files. Implementors can override this method to add
additional behaviours.

@return \common_report_Report
Behaviour to be triggered at the beginning of the script .