/** * @return void */ public function __loggerShutDown() { if ($this->bUsed) { $aStatistic = \MailSo\Base\Loader::Statistic(); // $this->WriteDump($aStatistic, \MailSo\Log\Enumerations\Type::INFO); if (\is_array($aStatistic) && isset($aStatistic['php']['memory_get_peak_usage'])) { $this->Write('Memory peak usage: ' . $aStatistic['php']['memory_get_peak_usage'], \MailSo\Log\Enumerations\Type::MEMORY); } } }
/** * @return void */ public function __loggerShutDown() { if ($this->bUsed) { $aStatistic = \MailSo\Base\Loader::Statistic(); if (\is_array($aStatistic)) { if (isset($aStatistic['php']['memory_get_peak_usage'])) { $this->Write('Memory peak usage: ' . $aStatistic['php']['memory_get_peak_usage'], \MailSo\Log\Enumerations\Type::MEMORY); } if (isset($aStatistic['time'])) { $this->Write('Time delta: ' . $aStatistic['time'], \MailSo\Log\Enumerations\Type::TIME_DELTA); } } } }
<?php include '../lib/MailSo/MailSo.php'; echo '<pre>'; $oLogger = \MailSo\Log\Logger::SingletonInstance()->Add(\MailSo\Log\Drivers\Inline::NewInstance("\r\n", true)); $oData = null; try { $oMailClient = \MailSo\Mail\MailClient::NewInstance()->SetLogger($oLogger); $oData = $oMailClient->Connect('imap.gmail.com', 993, \MailSo\Net\Enumerations\ConnectionSecurityType::SSL)->Login('*****@*****.**', 'test')->MessageList('INBOX'); $oMailClient->LogoutAndDisconnect(); } catch (Exception $e) { var_dump($e); } $oLogger->WriteDump($oData); $oLogger->WriteDump(\MailSo\Base\Loader::Statistic());