示例#1
0
 /**
  * Сохраняет глобальные настройки в Globals.php
  */
 public function save2file()
 {
     if (!$this->hasModified()) {
         return;
         //--- Нет модифицированных свойств
     }
     $content = $this->getPhpFileContents();
     check_condition($this->FileMtime === $this->DI->getModificationTime(), 'Файл глобальных настроек был изменён с момента загрузки');
     $this->DI->putToFile($content);
     $this->FileMtimeUpdate();
     //"Коммитим" настройки
     /* @var $prop PsGlobalProp */
     foreach ($this->GLOBALS as $prop) {
         $prop->commit();
     }
 }
示例#2
0
 public function getMtime()
 {
     return $this->di->getModificationTime();
 }