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


PHP Trace类代码示例

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


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


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