コード例 #1
0
ファイル: PsProfiler.php プロジェクト: ilivanoff/ps-sdk-dev
 private function __construct()
 {
     $this->CAHCE = new SimpleDataCache();
     $this->enabled = PsDefines::isProfilingEnabled();
     $this->dirManager = DirManager::autogen('profilers');
     if ($this->enabled) {
         PsShotdownSdk::registerDestructable($this, PsShotdownSdk::PsProfiler);
     }
 }
コード例 #2
0
 /**
  * Функция, выполняющая закрытие классов.
  * Должна быть именно public, иначе не будет вызвана!
  */
 static final function _doShotdown()
 {
     PsCheck::arr(self::$DESTRUCTS);
     ksort(self::$DESTRUCTS);
     /* @var $inst Destructable */
     foreach (self::$DESTRUCTS as $ord => $inst) {
         //Пишем в логгер до закрытия класса, так как логгер закрывается последним
         PsLogger::inst(__CLASS__)->info($ord . '. ' . get_class($inst) . ' - desctucted');
         $inst->onDestruct();
     }
     self::$DESTRUCTS = null;
 }
コード例 #3
0
ファイル: PsLogger.php プロジェクト: ilivanoff/ps-sdk-dev
 private function __construct()
 {
     $this->CACHE = new SimpleDataCache();
     $this->emptyLogger = new PsLoggerEmpty();
     /*
      * Вычислим признак включённости логирования.
      */
     $this->enabled = PsDefines::isLoggingEnabled();
     if ($this->enabled) {
         $this->writer = AbstractLogWriter::inst(PsDefines::getLoggingStream());
         $this->writer->initAndWriteFirstLog();
         PsShotdownSdk::registerDestructable($this, PsShotdownSdk::PsLogger);
     }
 }
コード例 #4
0
 protected function __construct()
 {
     $this->CACHE = new SimpleDataCache();
     $this->LOGGER = PsLogger::inst(__CLASS__);
     if ($this->LOGGER->isEnabled()) {
         PsShotdownSdk::registerDestructable($this, PsShotdownSdk::FoldedResourcesManager);
     }
 }
コード例 #5
0
ファイル: PsLock.php プロジェクト: ilivanoff/ps-sdk-dev
 protected function __construct()
 {
     $this->LOGGER = PsLogger::inst(__CLASS__);
     PsShotdownSdk::registerDestructable($this, PsShotdownSdk::PsLock);
 }