當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Debugger::fireLog方法代碼示例

本文整理匯總了PHP中Nette\Diagnostics\Debugger::fireLog方法的典型用法代碼示例。如果您正苦於以下問題:PHP Debugger::fireLog方法的具體用法?PHP Debugger::fireLog怎麽用?PHP Debugger::fireLog使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Nette\Diagnostics\Debugger的用法示例。


在下文中一共展示了Debugger::fireLog方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: log_write

function log_write($data, FileDownload $file, IDownloader $downloader)
{
    $cache = Environment::getCache("FileDownloader/log");
    $log = array();
    $tid = (string) $file->getTransferId();
    if (!isset($cache["registry"])) {
        $cache["registry"] = array();
    }
    $reg = $cache["registry"];
    $reg[$tid] = true;
    $cache["registry"] = $reg;
    if (isset($cache[$tid])) {
        $log = $cache[$tid];
    }
    Debugger::fireLog("Data: " . $data . "; " . $downloader->end);
    $data = $data . ": " . Helpers::bytes($file->transferredBytes) . " <->; ";
    if ($downloader instanceof AdvancedDownloader and $downloader->isInitialized()) {
        $data .= "position: " . Helpers::bytes($downloader->position) . "; ";
        //$data .= "length: ".Helpers::bytes($downloader->length)."; ";
        $data .= "http-range: " . Helpers::bytes($downloader->start) . "-" . Helpers::bytes($downloader->end) . "; ";
        $data .= "progress (con: " . round($file->transferredBytes / $downloader->end * 100) . "% X ";
        $data .= "file: " . round($downloader->position / $file->sourceFileSize * 100) . "%)";
    }
    $log[] = $data;
    $cache[$tid] = $log;
}
開發者ID:jkuchar,項目名稱:FileDownloader-example,代碼行數:26,代碼來源:example_library.php

示例2: createComponentGrid

 protected function createComponentGrid($name)
 {
     $grid = new \Gridder\Gridder($this, $name);
     $grid->setTranslator($this->context->translator);
     $persister = new \Gridder\Persisters\SessionPersister($this->getSession('gridder'));
     $grid->setPersister($persister);
     $array = array();
     $start = microtime();
     for ($i = 1; $i <= 2000; $i++) {
         $array[] = array('id' => (int) $i, 'name' => 'name' . $i);
     }
     $stop = microtime();
     \Nette\Diagnostics\Debugger::fireLog($stop - $start);
     $dataSource = new \Gridder\Sources\ArraySource($array);
     $dataSource->setPrimaryKey('id');
     $grid->setDataSource($dataSource);
     $grid->addColumn('id')->setAlias('Idecko')->setFilter('text');
     $grid->addColumn('name')->setFilter('text');
     /*
     $ac = $grid->addActionColumn('actions');
     $ac->addAction('test', 'delete!');
     $ac->addAction('test2', 'delete!');
     $ac->addAction('test3', 'delete!');
     */
     /*
     	$grid->addOperation('test', function($records){
        $message = sprintf('You have selected %s records in method %s', count($records), __FUNCTION__);
        $type = 'ok';
        return new \Gridder\Message($message, $type);
     	})->setAlias('TEST');
     	
     	$operation = new \Gridder\Operation('ohohoo');
     	$callback = callback($this, 'mehehe');
     	$operation->setAlias('BUBUBU')->setCallback($callback);
     	
     	$grid->addOperation($operation);
     * 
     */
 }
開發者ID:bazo,項目名稱:Tatami,代碼行數:39,代碼來源:TestPresenter.php

示例3: flog

function flog($message)
{
    Debugger::fireLog($message);
}
開發者ID:peterzadori,項目名稱:movi,代碼行數:4,代碼來源:loader.php

示例4: f

function f($var)
{
    \Nette\Diagnostics\Debugger::fireLog($var);
}
開發者ID:Blizqery,項目名稱:Boilerplate,代碼行數:4,代碼來源:shortcuts.php


注:本文中的Nette\Diagnostics\Debugger::fireLog方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。