当前位置: 首页>>代码示例>>PHP>>正文


PHP Context::isDebugMode方法代码示例

本文整理汇总了PHP中thebuggenie\core\framework\Context::isDebugMode方法的典型用法代码示例。如果您正苦于以下问题:PHP Context::isDebugMode方法的具体用法?PHP Context::isDebugMode怎么用?PHP Context::isDebugMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在thebuggenie\core\framework\Context的用法示例。


在下文中一共展示了Context::isDebugMode方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: domReady

                domReady(function () {
                    TBG = tbgjs;
                    jQuery = jquery;
                    require(['scriptaculous']);
                    var f_init = function() {TBG.initialize({ basepath: '<?php 
echo $webroot;
?>
', data_url: '<?php 
echo make_url('userdata');
?>
', autocompleter_url: '<?php 
echo \thebuggenie\core\framework\Context::isProjectContext() ? make_url('project_quicksearch', array('project_key' => \thebuggenie\core\framework\Context::getCurrentProject()->getKey())) : make_url('quicksearch');
?>
'})};
                    <?php 
if (\thebuggenie\core\framework\Context::isDebugMode()) {
    ?>
                        TBG.debug = true;
                        TBG.debugUrl = '<?php 
    echo make_url('debugger', array('debug_id' => '___debugid___'));
    ?>
';
                        <?php 
    $load_time = \thebuggenie\core\framework\Context::getLoadTime();
    $load_time = $load_time >= 1 ? round($load_time, 2) . 's' : round($load_time * 1000, 1) . 'ms';
    ?>
                        TBG.Core.AjaxCalls.push({location: 'Page loaded', time: new Date(), debug_id: '<?php 
    echo \thebuggenie\core\framework\Context::getDebugID();
    ?>
', loadtime: '<?php 
    echo $load_time;
开发者ID:ellipsonic,项目名称:thebuggenige_app,代码行数:31,代码来源:layout.php

示例2: link_tag

echo link_tag(make_url('about'), 'The Bug Genie') . '&nbsp;' . \thebuggenie\core\framework\Settings::getVersion();
?>
    <?php 
if ($tbg_user->canAccessConfigurationPage()) {
    ?>
        | <b><?php 
    echo link_tag(make_url('configure'), __('Configure %thebuggenie_name', array('%thebuggenie_name' => \thebuggenie\core\framework\Settings::getSiteHeaderName())));
    ?>
</b>
    <?php 
}
?>
    | <a href="http://www.thebuggenie.com/support">Support</a>
    | <a href="http://www.thebuggenie.com/feedback">Feedback</a>
    <?php 
if (\thebuggenie\core\framework\Context::isDebugMode() && \thebuggenie\core\framework\Logging::isEnabled()) {
    ?>
        <script>
            function tbg_debug_show_menu_tab(tab, clicked) {
                $('debug-bar').childElements().each(function (unclicked) {
                    unclicked.removeClassName('selected');
                });
                clicked.addClassName('selected');
                $('debug-frames-container').childElements().each(function (container) {
                    (container.id == tab) ? container.addClassName('selected') : container.removeClassName('selected');
                });
            }
        </script>
        <div id="tbg___DEBUGINFO___" style="position: fixed; bottom: 0; left: 0; z-index: 100; display: none; width: 100%;">
        </div>
        <?php 
开发者ID:founderio,项目名称:thebuggenie,代码行数:31,代码来源:footer.inc.php

示例3: __

 public function __($text, $replacements = array(), $html_decode = false)
 {
     if (isset($this->_strings[$text])) {
         $retstring = $this->_strings[$text];
     } else {
         $retstring = $this->__e($text);
         if (Context::isDebugMode()) {
             Logging::log('The text "' . $text . '" does not exist in list of translated strings.', 'i18n');
             $this->_missing_strings[$text] = true;
         }
     }
     if (!empty($replacements)) {
         $retstring = str_replace(array_keys($replacements), array_values($replacements), $retstring);
     }
     if ($html_decode) {
         $retstring = html_entity_decode($retstring);
     }
     return $retstring;
 }
开发者ID:shoreless-Limited,项目名称:thebuggenie,代码行数:19,代码来源:I18n.php

示例4: runGetBackdropPartial


//.........这里部分代码省略.........
                     $options['item_name'] = $details['description'];
                     $options['item_id'] = $request['item_id'];
                     $options['access_level'] = $request['access_level'];
                 }
                 break;
             case 'site_icons':
                 $template_name = 'configuration/siteicons';
                 break;
             case 'project_config':
                 $template_name = 'project/projectconfig_container';
                 $project = entities\Project::getB2DBTable()->selectById($request['project_id']);
                 $options['project'] = $project;
                 $options['section'] = $request->getParameter('section', 'info');
                 if ($request->hasParameter('edition_id')) {
                     $edition = entities\Edition::getB2DBTable()->selectById($request['edition_id']);
                     $options['edition'] = $edition;
                     $options['selected_section'] = $request->getParameter('section', 'general');
                 }
                 break;
             case 'issue_add_item':
                 $issue = entities\Issue::getB2DBTable()->selectById($request['issue_id']);
                 $template_name = 'main/issueadditem';
                 break;
             case 'client_users':
                 $options['client'] = entities\Client::getB2DBTable()->selectById($request['client_id']);
                 $template_name = 'main/clientusers';
                 break;
             case 'dashboard_config':
                 $template_name = 'main/dashboardconfig';
                 $options['tid'] = $request['tid'];
                 $options['target_type'] = $request['target_type'];
                 $options['previous_route'] = $request['previous_route'];
                 $options['mandatory'] = true;
                 break;
             case 'archived_projects':
                 $template_name = 'main/archivedprojects';
                 $options['mandatory'] = true;
                 break;
             case 'team_archived_projects':
                 $template_name = 'main/archivedprojects';
                 $options['target'] = 'team';
                 $options['id'] = $request['tid'];
                 $options['mandatory'] = true;
                 break;
             case 'client_archived_projects':
                 $template_name = 'main/archivedprojects';
                 $options['target'] = 'client';
                 $options['id'] = $request['cid'];
                 $options['mandatory'] = true;
                 break;
             case 'project_archived_projects':
                 $template_name = 'main/archivedprojects';
                 $options['target'] = 'project';
                 $options['id'] = $request['pid'];
                 $options['mandatory'] = true;
                 break;
             case 'bulk_workflow':
                 $template_name = 'search/bulkworkflow';
                 $options['issue_ids'] = $request['issue_ids'];
                 break;
             case 'confirm_username':
                 $template_name = 'main/confirmusername';
                 $options['username'] = $request['username'];
                 break;
             case 'add_dashboard_view':
                 $template_name = 'main/adddashboardview';
                 break;
             case 'userscopes':
                 if (!framework\Context::getScope()->isDefault()) {
                     throw new \Exception($this->getI18n()->__('This is not allowed outside the default scope'));
                 }
                 $template_name = 'configuration/userscopes';
                 $options['user'] = new entities\User((int) $request['user_id']);
                 break;
             case 'milestone':
                 $template_name = 'project/milestone';
                 $options['project'] = \thebuggenie\core\entities\tables\Projects::getTable()->selectById($request['project_id']);
                 if ($request->hasParameter('milestone_id')) {
                     $options['milestone'] = \thebuggenie\core\entities\tables\Milestones::getTable()->selectById($request['milestone_id']);
                 }
                 break;
             default:
                 $event = new \thebuggenie\core\framework\Event('core', 'get_backdrop_partial', $request['key']);
                 $event->triggerUntilProcessed();
                 $options = $event->getReturnList();
                 $template_name = $event->getReturnValue();
         }
         if ($template_name !== null) {
             return $this->renderJSON(array('content' => $this->getComponentHTML($template_name, $options)));
         }
     } catch (\Exception $e) {
         $this->getResponse()->cleanBuffer();
         $this->getResponse()->setHttpStatus(400);
         return $this->renderJSON(array('error' => framework\Context::getI18n()->__('An error occured: %error_message', array('%error_message' => $e->getMessage()))));
     }
     $this->getResponse()->cleanBuffer();
     $this->getResponse()->setHttpStatus(400);
     $error = framework\Context::isDebugMode() ? framework\Context::getI18n()->__('Invalid template or parameter') : $this->getI18n()->__('Could not show the requested popup');
     return $this->renderJSON(array('error' => $error));
 }
开发者ID:nrensen,项目名称:thebuggenie,代码行数:101,代码来源:Main.php

示例5: foreach

        ?>
]</strong> <span style="color: #555; font-size: 10px; font-style: italic;"><?php 
        echo $entry['time'];
        ?>
</span>&nbsp;&nbsp;<?php 
        echo $entry['message'];
        ?>
</div>
                    <?php 
    }
    ?>
                <?php 
}
?>
                <?php 
if (class_exists("\\b2db\\Core") && \thebuggenie\core\framework\Context::isDebugMode() && (!isset($exception) || !$exception instanceof \thebuggenie\core\framework\exceptions\ComposerException)) {
    ?>
                    <h3>SQL queries:</h3>
                        <ol>
                        <?php 
    foreach (\b2db\Core::getSQLHits() as $details) {
        ?>
                            <li>
                                <span class="faded_out dark small"><b>[<?php 
        echo $details['time'] >= 1 ? round($details['time'], 2) . ' seconds' : round($details['time'] * 1000, 1) . 'ms';
        ?>
]</b></span>
                                from <b><?php 
        echo $details['filename'];
        ?>
, line <?php 
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:31,代码来源:error.php


注:本文中的thebuggenie\core\framework\Context::isDebugMode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。