/**
  * ValueViolation constructor.
  *
  * @param string $field
  * @param string $code
  * @param string $message
  */
 public function __construct($field, $code, $message)
 {
     parent::__construct(self::TYPE, $field, $code, $message);
 }
 /**
  * @covers W3C\Validation\Violation::setSource
  * @covers W3C\Validation\Violation::getSource
  */
 public function testSetSource()
 {
     $this->violation->setSource('My Source');
     $this->assertSame('My Source', $this->violation->getSource());
 }
Exemple #3
0
        $pdf->SetFont('Arial', '', 18);
        $pdf->SetXY(170, 160);
        $pdf->Write(0, $date);
        $attachment = $pdf->output('Certificate.pdf', 'S');
        header('Pragma: public');
        header('Expires: -1');
        header('Content-Transfer-Encoding: binary');
        header('Content-Type: application/pdf');
        header('Content-Disposition: attachment;filename="ISOS%20Certificate.pdf"');
        header('Cache-Control: max-age=0');
        // output the file
        echo $attachment;
        exit;
        break;
    case 'violationlist':
        $v = new Violation($_POST['vSelect']);
        $v->makeInactive();
        $v->saveToDB();
        $_SESSION['message'] = "You have successfully removed the violation form.";
        break;
    case 'aelist':
        $ae = new AdverseEvent($_POST['aeSelect']);
        $ae->makeInactive();
        $ae->saveToDB();
        $_SESSION['message'] = "You have successfully removed the adverse event form.";
        break;
    default:
        $_SESSION['error'] = "An error has occurred, please try again. Code - 0x01";
        break;
}
header("Location:index.php");