Exemple #1
0
 function parse_file($now, $filekey, $fun)
 {
     $lines = file($this->files[$filekey]);
     try {
         $lines = $this->get_lines($filekey, $lines);
     } catch (Exception $e) {
         $this->errorlog[] = $e->getMessage();
         return;
     }
     $count = CoursePrefsConfig::findByUnique($filekey . '_lines');
     foreach ($lines as $line) {
         $count->setValue($count->getValue() + 1);
         $this->{$fun}($now, $line);
         // Update counter
         $count->save();
     }
 }
Exemple #2
0
 static function getNamedValue($name)
 {
     return CoursePrefsConfig::findByUnique($name)->getValue();
 }