• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Trace类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __construct

 function __construct($TraceURI, $ModelName)
 {
     $this->TraceURI = $TraceURI;
     $this->ModelName = $ModelName;
     $Trace = new Trace($TraceURI);
     $this->BaseURI = $Trace->getBaseURI();
     //$this->BaseURI="http://ktbs.univ-lyon1.fr/semasema34/";
     $this->Obsels = $Trace->getObsels();
     //$TraceInfo = RestfulHelper::getInfo($TraceURI);
     //$this->BaseURI= json_decode($TraceInfo,true)['inBase'];
     //$ObselListInfo = RestfulHelper::getInfo(json_decode($TraceInfo,true)['hasObselList']);
     // $this->Obsels = json_decode($ObselListInfo,true)['obsels'];
 }
开发者ID:algorgeous,项目名称:Assistant-Samo-Trace-Me,代码行数:13,代码来源:GenerateModel.php


示例2: __construct

 function __construct($BaseURI, $TraceName, $TraceSourceName, $ModelURI)
 {
     $this->TraceName = $TraceName;
     $this->BaseURI = $BaseURI;
     $this->TraceSourceName = $TraceSourceName;
     $this->TraceURI = $this->BaseURI . $this->TraceName;
     if ($ModelURI == null) {
         $trace = new Trace($this->TraceURI);
         $this->ModelURI = $trace->getModel();
     } else {
         $this->ModelURI = $ModelURI;
     }
 }
开发者ID:algorgeous,项目名称:Assistant-Samo-Trace-Me,代码行数:13,代码来源:CreateComputedTrace.php


示例3: handle

 function handle(Trace $trace)
 {
     $controllerName = $trace->getRequiredParameter(self::PARAMETER_CONTROLLER_NAME);
     $controllerClassName = $this->getControllerClassName($controllerName);
     if (!class_exists($controllerClassName, true)) {
         throw new TraceException(sprintf('unknown controller %s', $controllerClassName), $trace);
     }
     if (!in_array('IController', class_implements($controllerClassName, true))) {
         throw new TraceException(sprintf('%s is not a controller due it does not implement IController', $controllerClassName), $trace);
     }
     $controllerObject = $this->getControllerInstance($controllerClassName, $trace);
     $controllerObject->handle($trace);
 }
开发者ID:phoebius,项目名称:ajax-example,代码行数:13,代码来源:MvcDispatcher.class.php


示例4: checkCredentials

 protected function checkCredentials(Trace $trace)
 {
     if (!$this->clientToken) {
         $this->clientToken = new ClientToken($trace->getWebContext()->getServer()->getClientHash(true));
         $request = $trace->getWebContext()->getRequest();
         try {
             $authkey = $request[self::ADMIN_AUTHORIZED_COOKIE_NAME];
             $this->clientToken->getData($authkey);
             $this->setAdminAuthorized();
         } catch (Exception $e) {
             $this->setAdminNotAuthorized();
         }
     }
 }
开发者ID:phoebius,项目名称:phoebius.com,代码行数:14,代码来源:BasePhoebiusController.class.php


示例5: fatalErrorHandler

 public function fatalErrorHandler()
 {
     $error = error_get_last();
     $code = $this->getArrayValue($error, "type");
     if ($code === E_ERROR) {
         $message = $error["message"];
         $file = $error["file"];
         $line = $error["line"];
         $traces = [];
         $trace = new Trace();
         $trace->setFile($file);
         $trace->setLine($line);
         $traces[] = $trace;
         $this->log($message, $traces);
     }
 }
开发者ID:wispira,项目名称:framework,代码行数:16,代码来源:Handler.php


示例6: Show

 public static function Show()
 {
     $viewName = "";
     $includeHeaderAndFooter = true;
     for ($i = 0; $i < func_num_args(); $i++) {
         $testArg = func_get_arg($i);
         if (is_string($testArg) && $i == 0) {
             $viewName = $testArg;
         } else {
             if (is_bool($testArg)) {
                 $includeHeaderAndFooter = $testArg;
             } else {
                 $_ViewData = $testArg;
             }
         }
     }
     $callTrace = Trace::GetLastMethodCall();
     $viewPath = self::parseViewPath($viewName, $callTrace);
     if (self::verifyView($viewPath)) {
         if ($includeHeaderAndFooter) {
             self::includeHeader();
         }
         include $viewPath;
         if ($includeHeaderAndFooter) {
             self::includeFooter();
         }
     } else {
         Router::UnknownResource();
     }
 }
开发者ID:afliw,项目名称:ponponpon,代码行数:30,代码来源:view.php


示例7: saveImg

 public function saveImg()
 {
     Trace::output($this->traceID, "saveImg");
     //----------------------------------------------------------
     //init var
     //----------------------------------------------------------
     $chk = array("bool" => 1);
     //----------------------------------------------------------
     $img = str_replace('data:image/png;base64,', '', $this->img);
     $img = str_replace(' ', '+', $img);
     $data = base64_decode($img);
     $date = new DateTime();
     //----------------------------------------------------------
     if (is_null($imgName) || $encrypt) {
         $imgName = alphaID($date->getTimestamp()) . ".png";
     }
     //----------------------------------------------------------
     if (file_exists($this->dir)) {
         FileFolder::file_put_contents($this->dir . $imgName, $data);
         $chk["result"] = $this->fullURL . $imgName;
     } else {
         $chk['bool'] = false;
         $chk['message'] = $this->fullURL . " does no exist!!";
     }
     //----------------------------------------------------------
     return $chk;
 }
开发者ID:awwthentic1234,项目名称:hey,代码行数:27,代码来源:CreateImage.php


示例8: __construct

 function __construct($conf)
 {
     Trace::add_trace('construct class', __METHOD__);
     self::$conf = $conf;
     self::$conn = new DB($conf);
     $this->Func = new Func();
 }
开发者ID:shlomohass,项目名称:IID,代码行数:7,代码来源:Basic.class.php


示例9: dojetDidStart

 public function dojetDidStart()
 {
     if (MRuntime::currentRuntime() === C_RUNTIME_SAE) {
         Trace::setDelegate(new LibSAETrace());
     }
     parent::dojetDidStart();
 }
开发者ID:setimouse,项目名称:be-shop-pc,代码行数:7,代码来源:MainWebService.class.php


示例10: getData

 public static function getData($file)
 {
     Trace::output(self::$traceID, "getData");
     //----------------------------------------------------------
     //init var
     //----------------------------------------------------------
     $chk = array("bool" => true, 'traceID' => "getData");
     //----------------------------------------------------------
     $swfheader = new swfheader($file);
     $file_swf = new File_SWF($file);
     //----------------------------------------------------------
     if ($file_swf->is_valid()) {
         $stat = $file_swf->stat();
         $fileSize = $stat['fileSize'][0];
         $swfheader->size = $fileSize;
         $chk['result'] = $swfheader;
     } else {
         $chk['bool'] = false;
         $chk['error'] = true;
         $chk['message'] = "swf was no valid";
     }
     //----------------------------------------------------------
     $chk['output'] = Trace::$output;
     //----------------------------------------------------------
     return $chk;
 }
开发者ID:awwthentic1234,项目名称:hey,代码行数:26,代码来源:SwfData.php


示例11: load

 /** Load Dictionary
  * 
  * @param Array $load - Dictionary array 
  * 
  */
 public static function load($load)
 {
     Trace::add_trace('construct class', __METHOD__);
     self::$dic = isset($load['dic']) ? $load['dic'] : array();
     self::$hooks = isset($load['js']) ? $load['js'] : array();
     self::$lang = isset($load['lang']) ? $load['lang'] : array();
 }
开发者ID:shlomohass,项目名称:IID,代码行数:12,代码来源:Lang.class.php


示例12: testExecute

 public function testExecute()
 {
     $instance = new Trace('');
     $session = $this->getMock('Pry\\Session', ['getCallStack'], [__FILE__]);
     $callStack = $this->getMock('Pry\\CallStack', ['getTrace']);
     $trace = [['class' => 'A', 'type' => '->', 'function' => 'a', 'args' => ['one', 'two'], 'file' => '/a.php', 'line' => 1337], ['function' => 'b', 'args' => ['one'], 'file' => '/b.php', 'line' => 321], ['class' => 'C', 'type' => '::', 'function' => 'c', 'args' => [], 'file' => '/c.php', 'line' => 42]];
     $callStack->expects($this->once())->method('getTrace')->will($this->returnValue($trace));
     $session->expects($this->once())->method('getCallStack')->will($this->returnValue($callStack));
     ob_start();
     $status = $instance->execute($session);
     $actual = ob_get_contents();
     ob_end_clean();
     $expected = [' A->a($0,$1)  /a.php  1337 ', ' b($0)        /b.php   321 ', ' C::c()       /c.php    42 ', ''];
     $this->assertTrue($status);
     $this->assertEquals(implode(PHP_EOL, $expected), $actual);
     # @TODO check $actual for correct contents
 }
开发者ID:mlessnau,项目名称:pry,代码行数:17,代码来源:TraceTest.php


示例13: __construct

 public function __construct($urlInfo = array())
 {
     parent::__construct();
     //
     if (!empty($urlInfo)) {
         $this->aUrlInfo = $urlInfo;
     }
     $this->addGet('id', 'show');
     Trace::addMessage('DB', '<strong>Старт контроллера</strong>');
 }
开发者ID:gudwin,项目名称:extasy,代码行数:10,代码来源:controller.php


示例14: trace

 /**
  * Esta función recibe el tipo de Trace y el mensaje para guardar el registro en la base de datos
  * @param string $controller
  * @param string $action
  * @param int $date
  * @param int $ip
  */
 public function trace($status, $msg)
 {
     $controller = $this->dispatcher->getControllerName();
     $action = $this->dispatcher->getActionName();
     $date = time();
     $ip = $_SERVER['REMOTE_ADDR'];
     $user = 1;
     $operation = $controller . '::' . $action;
     Trace::createTrace($user, $status, $operation, $msg, $date, $ip);
 }
开发者ID:dorianlopez,项目名称:surticreditos,代码行数:17,代码来源:ControllerBase.php


示例15: record

 /**
  * 记录日志 并且会过滤未经设置的级别
  * @param string $message 日志信息
  * @param string $level  日志级别
  * @param boolean $record  是否强制记录
  * @return void
  */
 static function record($message, $level = self::ERR, $record = false)
 {
     if ($record || in_array($level, config('LOG_RECORD_LEVEL'))) {
         $now = date(self::$format);
         self::$log[] = "{$now} {$level}: {$message}\r\n";
         if (config('APP_DEBUG')) {
             //如果为debug模式的话
             loadCore('Trace');
             Trace::addLog("{$now} {$level}: {$message}");
         }
     }
 }
开发者ID:BGCX261,项目名称:zlskytakeorder-svn-to-git,代码行数:19,代码来源:Log.class.php


示例16: init

 public static function init()
 {
     // 设置系统时区 PHP5支持
     if (function_exists('date_default_timezone_set')) {
         date_default_timezone_set(config('DEFAULT_TIMEZONE'));
     }
     set_error_handler(array('App', 'appError'));
     set_exception_handler(array('App', 'appException'));
     loadCore('Trace');
     loadCore('Dispatcher');
     Dispatcher::dispatch();
     Trace::write();
 }
开发者ID:BGCX261,项目名称:zlskytakeorder-svn-to-git,代码行数:13,代码来源:App.class.php


示例17: test

 public function test($testId)
 {
     Trace::setDisabled();
     $test = new extasyTestModel();
     $found = $test->get($testId);
     if ($found) {
         $test->execute();
         $result = array('lastTestDate' => $test->lastTestDate->getValue(), 'testResult' => $test->obj_lastResult->getAdminViewValue());
         die(json_encode($result));
     } else {
         throw new Exception('test model not found ');
     }
 }
开发者ID:gudwin,项目名称:extasy,代码行数:13,代码来源:launcher.php


示例18: _insertContents

function _insertContents($dirArray, $close = FALSE)
{
    Trace::output($this->traceID, "_insertContents");
    //----------------------------------------------------------
    //init var
    //----------------------------------------------------------
    $i;
    $queryString = "";
    $chk = array("bool" => true, 'function' => "_insertContents");
    //----------------------------------------------------------
    //INSERT INTO tbl_name (a,b,c) VALUES(1,2,3),(4,5,6),(7,8,9);
    for ($i = 0; $i < sizeof($dirArray); $i++) {
        $queryString .= 'CALL insertVideo("' . $dirArray[$i]['path'] . '","' . $dirArray[$i]['title'] . '","' . $dirArray[$i]['hash'] . '","' . $dirArray[$i]['mp4'] . '","' . $dirArray[$i]['thumbnail_url'] . '"); ';
    }
    print_r($queryString);
    //----------------------------------------------------------
    //$chk = MySQL::getResult($queryString);
    //----------------------------------------------------------
    return $chk;
}
开发者ID:awwthentic1234,项目名称:hey,代码行数:20,代码来源:batch.php


示例19: toPreview

 /**
  * Дополняет sitemap данные данными из таблицы моделей. Если указан параметр $bWidthAdditional также берутся данные для парсинга
  *
  * @param $aData           array массив данных
  * @param $bWithAdditional bool подключать ли данные для парсинга
  */
 public static function toPreview($aData, $bWithAdditional = false)
 {
     Trace::addMessage('DB', '<b>Старт метода Sitemap_PagesOperations::toPreview</b>');
     $aResult = array();
     $objectList = self::toObject($aData);
     foreach ($aData as $key => $row) {
         if (!isset($objectList[$key])) {
             continue;
         }
         $obj = $objectList[$key];
         if (!is_object($obj)) {
             continue;
         }
         $aInsert = $row;
         if ($bWithAdditional) {
             $aInsert['additional'] = $objectList[$key]->getPreviewParseData();
         } else {
             $aInsert['document'] = $objectList[$key]->getData();
         }
         $aResult[] = $aInsert;
     }
     return $aResult;
 }
开发者ID:gudwin,项目名称:extasy,代码行数:29,代码来源:pages.php


示例20: sendLink

 public function sendLink($email, $message, $url)
 {
     Trace::output($this->traceID, "sendLink");
     //----------------------------------------------------------
     //init var
     //----------------------------------------------------------
     $chk = array("bool" => true, "traceID" => "sendLink");
     //----------------------------------------------------------
     $chk = GenFun::error_CHK($obj);
     //----------------------------------------------------------
     $emailObj = array("emailTo" => $email, 'link' => "http://awwthentic.com/Modules/DOM/uber_src/server/werm/services/Download.php?url={$url}", 'linkTxt' => "Click here to download file.", "message" => $message, "subject" => $subject = $obj['sender'] . " sent you a file!!!");
     //----------------------------------------------------------
     if ($chk['bool']) {
         $chk = SendEmail_v0::sendDefault($emailObj);
     } else {
         return $chk;
     }
     //----------------------------------------------------------
     if ($chk['bool']) {
         $chk['message'] = "Email was successfully sent to {$email}";
     }
     //----------------------------------------------------------
     return $chk;
 }
开发者ID:awwthentic1234,项目名称:hey,代码行数:24,代码来源:FileUploader.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Track类代码示例发布时间:2022-05-23
下一篇:
PHP Tpl类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap