public function validateFile($file)
    {
        if (file_exists($file) !== true) {
            throw new Exception('File not found');
        }
        if (is_readable($file) !== true) {
            throw new Exception('File not readable');
        }

        $data = file_get_contents($file);
        if ($data === false) {
            throw new Exception('Failed get file');
        }

        return $this->validateFragment($data);
    }
public function validateFile($file)
    {
        if (file_exists($file) !== true) {
            throw new Exception('File not found');
        }
        if (is_readable($file) !== true) {
            throw new Exception('File not readable');
        }

        $data = file_get_contents($file);
        if ($data === false) {
            throw new Exception('Failed get file');
        }

        return $this->validateFragment($data);
    }
public function validateFile ( $ file ) { if ( file_exists ( $ file ) !== true ) { throw new Exception ( 'File not found' ) ; } if ( is_readable ( $ file ) !== true ) { throw new Exception ( 'File not readable' ) ; } $ data = file_get_contents ( $ file ) ; if ( $ data === false ) { throw new Exception ( 'Failed get file' ) ; } return $ this -> validateFragment ( $ data ) ; }
Validates the local file

Requests validation on the local file, from an instance of the W3C validator.

@param string $file file to be validated.

@throws Exception

@return Response object HTMLValidator\Response
Validates the local file