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


PHP Symphony::initialiseLog方法代码示例

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


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

示例1: entryPostEdit

 public function entryPostEdit($context)
 {
     $section = $context['section'];
     $errors = Administration::instance()->Page->_errors;
     $isReturn = isset($_POST['fields']['save-and-return-h']) && strlen($_POST['fields']['save-and-return-h']) > 1;
     $isNew = isset($_POST['fields']['save-and-new-h']) && strlen($_POST['fields']['save-and-new-h']) > 1;
     // if save returned no errors and return or new button was hit
     if (($isReturn || $isNew) && count($errors) < 1) {
         try {
             redirect(vsprintf($this->getPath($isNew), array(SYMPHONY_URL, $section->get('handle'))));
         } catch (Exception $e) {
             Symphony::initialiseLog();
             Symphony::Logs()->pushExceptionToLog($e, true, true, false);
         }
     }
 }
开发者ID:hotdoy,项目名称:EDclock,代码行数:16,代码来源:extension.driver.php

示例2: __errorHandler

function __errorHandler($errno = null, $errstr, $errfile = null, $errline = null, $errcontext = null)
{
    global $param;
    if (error_reporting() != 0 && in_array($errno, array(E_WARNING, E_USER_WARNING, E_ERROR, E_USER_ERROR))) {
        Symphony::initialiseLog();
        Symphony::Log()->pushToLog("{$errno} - " . strip_tags(is_object($errstr) ? $errstr->generate() : $errstr) . ($errfile ? " in file {$errfile}" : '') . ($errline ? " on line {$errline}" : ''), $errno, true);
        Symphony::Log()->pushToLog(sprintf('Image class param dump - mode: %d, width: %d, height: %d, position: %d, background: %d, file: %s, external: %d, raw input: %s', $param->mode, $param->width, $param->height, $param->position, $param->background, $param->file, (bool) $param->external, $_GET['param']), E_NOTICE, true);
    }
}
开发者ID:symphonycms,项目名称:jit_image_manipulation,代码行数:9,代码来源:image.php

示例3: min

// Calculate the correct dimensions. If necessary, avoid upscaling the image.
$src_w = $image->Meta()->width;
$src_h = $image->Meta()->height;
if ($settings['image']['disable_upscaling'] == 'yes') {
    $dst_w = min($param->width, $src_w);
    $dst_h = min($param->height, $src_h);
} else {
    $dst_w = $param->width;
    $dst_h = $param->height;
}
// Make sure we have a valid size
if ($dst_w == 0 && $dst_h == 0) {
    // Return 400
    Page::renderStatusCode(Page::HTTP_STATUS_BAD_REQUEST);
    // Init log
    Symphony::initialiseLog();
    // Get referrer
    $httpRef = General::sanitize($_SERVER["HTTP_REFERER"]);
    if (!$httpRef) {
        $httpRef = 'unknown referrer';
    }
    // push to log
    Symphony::Log()->pushToLog(sprintf('Invalid size (0 x 0) requested from "%s"', $httpRef), E_WARNING, true);
    // output and exit
    echo 'Both width and height can not be 0';
    exit;
}
// Apply the filter to the Image class (`$image`)
switch ($param->mode) {
    case MODE_RESIZE:
        $image->applyFilter('resize', array($dst_w, $dst_h));
开发者ID:siimsoni,项目名称:jit_image_manipulation,代码行数:31,代码来源:image.php


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