public function setFileMode($filePath = './cwsdebug.html', $fileClear = false)
    {
        if (empty($filePath)) {
            $this->error('You have to set the file path for debugging in file mode...', self::VERBOSE_QUIET);
            exit();
        }

        $this->filePath = $filePath;
        if (!file_exists($this->filePath)) {
            touch($this->filePath);
        }
        if ($fileClear) {
            unlink($this->filePath);
            touch($this->filePath);
        }

        $this->setMode(self::MODE_FILE);
    }
public function setFileMode($filePath = './cwsdebug.html', $fileClear = false)
    {
        if (empty($filePath)) {
            $this->error('You have to set the file path for debugging in file mode...', self::VERBOSE_QUIET);
            exit();
        }

        $this->filePath = $filePath;
        if (!file_exists($this->filePath)) {
            touch($this->filePath);
        }
        if ($fileClear) {
            unlink($this->filePath);
            touch($this->filePath);
        }

        $this->setMode(self::MODE_FILE);
    }
public function setFileMode ( $ filePath = './cwsdebug.html' , $ fileClear = false ) { if ( empty ( $ filePath ) ) { $ this -> error ( 'You have to set the file path for debugging in file mode...' , self :: VERBOSE_QUIET ) ; exit ( ) ; } $ this -> filePath = $ filePath ; if ( ! file_exists ( $ this -> filePath ) ) { touch ( $ this -> filePath ) ; } if ( $ fileClear ) { unlink ( $ this -> filePath ) ; touch ( $ this -> filePath ) ; } $ this -> setMode ( self :: MODE_FILE ) ; }
Set the mode to file.

@param string $filePath  - The file path - default './cwsdebug.html'.
@param bool   $fileClear - Clear the file at the beginning.
Set the mode to file .