当前位置: 首页>>代码示例>>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;未经允许,请勿转载。