/**
  * Check against file if valid stamp
  *
  * @param $stamp
  *
  * @return bool
  */
 public static function is_valid($stamp)
 {
     $path = Configuration::get_configuration_path();
     $filename = $path . '/checksum';
     if (file_exists($filename)) {
         $file_stamp = file_get_contents($filename);
         if ($file_stamp == $stamp) {
             return true;
         }
     }
     return false;
 }
Example #2
0
 /**
  *
  * @return String cpt-ui output folder
  */
 private static function get_configuration_path()
 {
     return Configuration::get_configuration_path('cpt');
 }
Example #3
0
 /**
  * @return string
  * @throws \Exception
  */
 protected static function get_configuration_path()
 {
     $path = Configuration::get_configuration_path('acf');
     if (!file_exists($path)) {
         mkdir($path);
     }
     return $path;
 }