public class TimestampValidator

class.timestampvalidator.php #13

This class checks against the Database for the latest timestamp, to make sure the data being saved is the one the user saw.


void __construct(string $table)

Creates a new TimestampValidator object, for a particular table. The tbl_ prefix is automatically added.

  • $table stringThe table name

boolean check(int|string $id, string $timestamp)

Checks if the modified date of the record identified with $id if equal to the supplied $timestamp

  • $id int|stringThe record id to check

  • $timestamp stringThe user supplied timestamp


true if the $timestamp is the latest or the $id is invalid, false other wise

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details