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


PHP __DEBUG__函数代码示例

本文整理汇总了PHP中__DEBUG__函数的典型用法代码示例。如果您正苦于以下问题:PHP __DEBUG__函数的具体用法?PHP __DEBUG__怎么用?PHP __DEBUG__使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: fn_strtolower

    if (!empty($objects[$type])) {
        if (!empty($numeric_objects[$type]) && !is_numeric($prefix)) {
            $prefix = '';
        }
        $code = $prefix . $id;
        require Registry::get('config.dir.addons') . 'barcode/lib/barcodegenerator/' . fn_strtolower($objects[$type]) . '.php';
        $obj = new $objects[$type]($width, $height, $style, $code);
        if ($obj) {
            $obj->SetFont($font);
            $obj->DrawObject($xres);
            $obj->FlushObject();
            $obj->DestroyObject();
            unset($obj);
        }
    } else {
        __DEBUG__("Need bar code type ex. C39");
    }
    exit;
}
function fn_spsr_pre_check_invoice_create($order_id, $section, $spsr_shipments = array())
{
    $shipping = array();
    if (empty($order_id)) {
        return array(CONTROLLER_STATUS_REDIRECT, "orders.manage");
    }
    $order_info = fn_get_order_info($order_id, false, true, true, true);
    if (!empty($order_info)) {
        list($_shipments) = fn_get_shipments_info(array('order_id' => $order_id, 'advanced_info' => true));
        if (!empty($_shipments)) {
            $shipments = array();
            foreach ($_shipments as $shipment) {
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:orders.post.php

示例2: DrawObject

 function DrawObject($xres)
 {
     $len = strlen($this->mValue);
     if (($size = $this->GetSize($xres)) == 0) {
         __DEBUG__("GetSize: failed");
         return false;
     }
     if ($this->mStyle & BCS_ALIGN_CENTER) {
         $sPos = (int) (($this->mWidth - $size) / 2);
     } else {
         if ($this->mStyle & BCS_ALIGN_RIGHT) {
             $sPos = $this->mWidth - $size;
         } else {
             $sPos = 0;
         }
     }
     /* Total height of bar code -Bars only- */
     if ($this->mStyle & BCS_DRAW_TEXT) {
         $ysize = $this->mHeight - BCD_DEFAULT_MAR_Y1 - BCD_DEFAULT_MAR_Y2 - $this->GetFontHeight($this->mFont);
     } else {
         $ysize = $this->mHeight - BCD_DEFAULT_MAR_Y1 - BCD_DEFAULT_MAR_Y2;
     }
     /* Draw text */
     if ($this->mStyle & BCS_DRAW_TEXT) {
         if ($this->mStyle & BCS_STRETCH_TEXT) {
             for ($i = 0; $i < $len; $i++) {
                 $this->DrawChar($this->mFont, $sPos + (2 * BCD_C128_BAR_2 * $xres + 3 * BCD_C128_BAR_1 * $xres + BCD_C128_BAR_4 * $xres) + $size / $len * $i, $ysize + BCD_DEFAULT_MAR_Y1 + BCD_DEFAULT_TEXT_OFFSET, $this->mValue[$i]);
             }
         } else {
             /* Center */
             $text_width = $this->GetFontWidth($this->mFont) * strlen($this->mValue);
             $this->DrawText($this->mFont, $sPos + ($size - $text_width) / 2 + (2 * BCD_C128_BAR_2 * $xres + 3 * BCD_C128_BAR_1 * $xres + BCD_C128_BAR_4 * $xres), $ysize + BCD_DEFAULT_MAR_Y1 + BCD_DEFAULT_TEXT_OFFSET, $this->mValue);
         }
     }
     $cPos = 0;
     $DrawPos = $this->DrawStart($sPos, BCD_DEFAULT_MAR_Y1, $ysize, $xres);
     do {
         $c = $this->GetCharIndex($this->mValue[$cPos]);
         $cset = $this->mCharSet[$c];
         $this->DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, $this->GetBarSize($cset[0], $xres), $ysize);
         $DrawPos += $this->GetBarSize($cset[0], $xres);
         $DrawPos += $this->GetBarSize($cset[1], $xres);
         $this->DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, $this->GetBarSize($cset[2], $xres), $ysize);
         $DrawPos += $this->GetBarSize($cset[2], $xres);
         $DrawPos += $this->GetBarSize($cset[3], $xres);
         $this->DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, $this->GetBarSize($cset[4], $xres), $ysize);
         $DrawPos += $this->GetBarSize($cset[4], $xres);
         $DrawPos += $this->GetBarSize($cset[5], $xres);
         $cPos++;
     } while ($cPos < $len);
     $DrawPos = $this->DrawCheckChar($DrawPos, BCD_DEFAULT_MAR_Y1, $ysize, $xres);
     $DrawPos = $this->DrawStop($DrawPos, BCD_DEFAULT_MAR_Y1, $ysize, $xres);
     return true;
 }
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:54,代码来源:c128bobject.php

示例3: FlushObject2EnFile

 function FlushObject2EnFile()
 {
     if ($this->mStyle & BCS_BORDER) {
         $this->DrawBorder();
     }
     if ($this->mStyle & BCS_IMAGE_PNG) {
         ImagePng($this->mImg, '../../cache/barcodes/en_temp.png');
     } else {
         if ($this->mStyle & BCS_IMAGE_JPEG) {
             ImagePng($this->mImg, '../../cache/barcodes/en_temp.jpg');
         } else {
             __DEBUG__("FlushObject: No output type");
         }
     }
 }
开发者ID:patmark,项目名称:care2x-tz,代码行数:15,代码来源:barcode.php

示例4: DrawObject

 function DrawObject($xres)
 {
     $len = strlen($this->mValue);
     $narrow = BCD_C39_NARROW_BAR * $xres;
     $wide = BCD_C39_WIDE_BAR * $xres;
     if (($size = $this->GetSize($xres)) == 0) {
         __DEBUG__("GetSize: failed");
         return false;
     }
     $cPos = 0;
     if ($this->mStyle & BCS_ALIGN_CENTER) {
         $sPos = (int) (($this->mWidth - $size) / 2);
     } else {
         if ($this->mStyle & BCS_ALIGN_RIGHT) {
             $sPos = $this->mWidth - $size;
         } else {
             $sPos = 0;
         }
     }
     /* Total height of bar code -Bars only- */
     if ($this->mStyle & BCS_DRAW_TEXT) {
         $ysize = $this->mHeight - BCD_DEFAULT_MAR_Y1 - BCD_DEFAULT_MAR_Y2 - $this->GetFontHeight($this->mFont);
     } else {
         $ysize = $this->mHeight - BCD_DEFAULT_MAR_Y1 - BCD_DEFAULT_MAR_Y2;
     }
     /* Draw text */
     if ($this->mStyle & BCS_DRAW_TEXT) {
         if ($this->mStyle & BCS_STRETCH_TEXT) {
             for ($i = 0; $i < $len; $i++) {
                 $this->DrawChar($this->mFont, $sPos + ($narrow * 6 + $wide * 3) + $size / $len * $i, $ysize + BCD_DEFAULT_MAR_Y1 + BCD_DEFAULT_TEXT_OFFSET, $this->mValue[$i]);
             }
         } else {
             /* Center */
             $text_width = $this->GetFontWidth($this->mFont) * strlen($this->mValue);
             $this->DrawText($this->mFont, $sPos + ($size - $text_width) / 2 + ($narrow * 6 + $wide * 3), $ysize + BCD_DEFAULT_MAR_Y1 + BCD_DEFAULT_TEXT_OFFSET, $this->mValue);
         }
     }
     $DrawPos = $this->DrawStart($sPos, BCD_DEFAULT_MAR_Y1, $ysize, $xres);
     do {
         $c = $this->GetCharIndex($this->mValue[$cPos]);
         $cset = $this->mCharSet[$c];
         $this->DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, $cset[0] == '0' ? $narrow : $wide, $ysize);
         $DrawPos += $cset[0] == '0' ? $narrow : $wide;
         $DrawPos += $cset[1] == '0' ? $narrow : $wide;
         $this->DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, $cset[2] == '0' ? $narrow : $wide, $ysize);
         $DrawPos += $cset[2] == '0' ? $narrow : $wide;
         $DrawPos += $cset[3] == '0' ? $narrow : $wide;
         $this->DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, $cset[4] == '0' ? $narrow : $wide, $ysize);
         $DrawPos += $cset[4] == '0' ? $narrow : $wide;
         $DrawPos += $cset[5] == '0' ? $narrow : $wide;
         $this->DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, $cset[6] == '0' ? $narrow : $wide, $ysize);
         $DrawPos += $cset[6] == '0' ? $narrow : $wide;
         $DrawPos += $cset[7] == '0' ? $narrow : $wide;
         $this->DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, $cset[8] == '0' ? $narrow : $wide, $ysize);
         $DrawPos += $cset[8] == '0' ? $narrow : $wide;
         $DrawPos += $narrow;
         /* Space between chars */
         $cPos++;
     } while ($cPos < $len);
     $DrawPos = $this->DrawStop($DrawPos, BCD_DEFAULT_MAR_Y1, $ysize, $xres);
     return true;
 }
开发者ID:askzap,项目名称:ultimate,代码行数:62,代码来源:c39object.php

示例5: DrawObject

 function DrawObject($xres)
 {
     $len = strlen($this->mValue);
     if (($size = $this->GetSize($xres)) == 0) {
         __DEBUG__("GetSize: failed");
         return false;
     }
     $cPos = 0;
     if ($this->mStyle & BCS_DRAW_TEXT) {
         $ysize = $this->mHeight - BCD_DEFAULT_MAR_Y1 - BCD_DEFAULT_MAR_Y2 - $this->GetFontHeight($this->mFont);
     } else {
         $ysize = $this->mHeight - BCD_DEFAULT_MAR_Y1 - BCD_DEFAULT_MAR_Y2;
     }
     if ($this->mStyle & BCS_ALIGN_CENTER) {
         $sPos = (int) (($this->mWidth - $size) / 2);
     } else {
         if ($this->mStyle & BCS_ALIGN_RIGHT) {
             $sPos = $this->mWidth - $size;
         } else {
             $sPos = 0;
         }
     }
     if ($this->mStyle & BCS_DRAW_TEXT) {
         if ($this->mStyle & BCS_STRETCH_TEXT) {
             /* Stretch */
             for ($i = 0; $i < $len; $i++) {
                 $this->DrawChar($this->mFont, $sPos + BCD_I25_NARROW_BAR * 4 * $xres + $size / $len * $i, $ysize + BCD_DEFAULT_MAR_Y1 + BCD_DEFAULT_TEXT_OFFSET, $this->mValue[$i]);
             }
         } else {
             /* Center */
             $text_width = $this->GetFontWidth($this->mFont) * strlen($this->mValue);
             $this->DrawText($this->mFont, $sPos + ($size - $text_width) / 2 + BCD_I25_NARROW_BAR * 4 * $xres, $ysize + BCD_DEFAULT_MAR_Y1 + BCD_DEFAULT_TEXT_OFFSET, $this->mValue);
         }
     }
     $sPos = $this->DrawStart($sPos, BCD_DEFAULT_MAR_Y1, $ysize, $xres);
     do {
         $c1 = $this->mValue[$cPos];
         $c2 = $this->mValue[$cPos + 1];
         $cset1 = $this->mCharSet[$c1];
         $cset2 = $this->mCharSet[$c2];
         for ($i = 0; $i < 5; $i++) {
             $type1 = $cset1[$i] == 0 ? BCD_I25_NARROW_BAR * $xres : BCD_I25_WIDE_BAR * $xres;
             $type2 = $cset2[$i] == 0 ? BCD_I25_NARROW_BAR * $xres : BCD_I25_WIDE_BAR * $xres;
             $this->DrawSingleBar($sPos, BCD_DEFAULT_MAR_Y1, $type1, $ysize);
             $sPos += $type1 + $type2;
         }
         $cPos += 2;
     } while ($cPos < $len);
     $sPos = $this->DrawStop($sPos, BCD_DEFAULT_MAR_Y1, $ysize, $xres);
     return true;
 }
开发者ID:patmark,项目名称:care2x-tz,代码行数:51,代码来源:i25object.php

示例6: FlushObject

 function FlushObject()
 {
     if ($this->mStyle & BCS_BORDER) {
         $this->DrawBorder();
     }
     if ($this->mStyle & BCS_IMAGE_PNG) {
         Header("Content-Type: image/png");
         ImagePng($this->mImg);
     } else {
         if ($this->mStyle & BCS_IMAGE_JPEG) {
             Header("Content-Type: image/jpeg");
             ImageJpeg($this->mImg);
         } else {
             __DEBUG__("FlushObject: No output type");
         }
     }
 }
开发者ID:jeromecc,项目名称:tuv2,代码行数:17,代码来源:barcode.php


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