/** * * @param string markup to validate * @return bool Is valid? */ public function validate(Document $htmlDocument) { $rawDocument = $htmlDocument->getHtml(); $postVars = array('htmlcontent' => $rawDocument); $request = Symfony::create(new Uri($this->richTextValidatorUri), \Base\Http\Request\Request::POST, $postVars); $response = $this->httpClient->request($request); return $this->parseValidationReponse($response->getBody()); }
/** * * @see Base\Validator.Html::validateHtml() * * @param string markup to validate * @return bool Is valid markup? */ public function validate(Document $htmlDocument) { $rawDocument = $htmlDocument->getHtml(); $postVars = array('output' => 'soap12', 'fragment' => $rawDocument); $request = Symfony::create(new Uri($this->_validatorUri), \Base\Http\Request\Request::POST, $postVars); $response = $this->_httpClient->request($request); return $this->_parseReponse($response->getBody()); }