class ValidationException extends Exception
{
/**
* Validation error messages.
*
* @var array
*/
protected $errors = [];
/**
* Constructor.
*
* @param array $errors
*/
public function __construct($errors)
{
$this -> errors = $errors;
}
/* геттер для свойства $errors */
} header('Cache-Control', 'no-cache, no-store, max-age=0, must-revalidate');
header('Pragma', 'no-cache');$document = new Document('http://www.example.com/', true);
echo $document->first('title::text');$links = $document->find('a[href]::attr(href)');
var_dump($links);$links = $document->find('a[href]:has(img)::attr(href)');
var_dump($links);