Exemplo n.º 1
0
 /**
  *
  * @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());
 }
Exemplo n.º 2
0
Arquivo: W3.php Projeto: phmlabs/base
 /**
  *
  * @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());
 }