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

PHP ChromePhp类代码示例

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

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



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

示例1: d

function d($arg)
{
    $declared = 'variable';
    ChromePhp::log('xdebug_get_declared_vars', xdebug_get_declared_vars());
    ChromePhp::groupCollapsed('backtrace');
    ChromePhp::log(debug_backtrace());
    ChromePhp::groupEnd();
    ChromePhp::info('Triggered notice.');
    trigger_error('Custom notice', E_USER_NOTICE);
    ChromePhp::warn('Triggered warning.');
    trigger_error('Custom warning', E_USER_WARNING);
    ChromePhp::error('Triggered error.');
    trigger_error('Custom error', E_USER_ERROR);
}
开发者ID:aikeay,项目名称:sandbox,代码行数:14,代码来源:demo.php


示例2: _write

 /**
  * Write the data
  *
  * @param array $event Event Data
  */
 public function _write($event)
 {
     $event = Mage::helper('firegento_logger')->getEventObjectFromArray($event);
     $priority = $event->getPriority();
     $message = $this->_formatter->format($event);
     if ($priority !== false) {
         switch ($priority) {
             case Zend_Log::EMERG:
             case Zend_Log::ALERT:
             case Zend_Log::CRIT:
             case Zend_Log::ERR:
                 ChromePhp::error($message);
                 break;
             case Zend_Log::WARN:
                 ChromePhp::warn($message);
                 break;
             case Zend_Log::NOTICE:
             case Zend_Log::INFO:
             case Zend_Log::DEBUG:
                 ChromePhp::info($message);
                 break;
             default:
                 Mage::log('Unknown loglevel at ' . __CLASS__);
                 break;
         }
     } else {
         Mage::log('Attached message event has no priority - skipping !');
     }
 }
开发者ID:kirchbergerknorr,项目名称:firegento-logger,代码行数:34,代码来源:Chromelogger.php


示例3: deleteRoom

 function deleteRoom($name)
 {
     $idusuario = $this->usuario->getUsuarioId();
     $sql = "DELETE FROM `habitaciones` WHERE descripcion=\"" . $name . " \"and id_usuario=" . $idusuario;
     ChromePhp::log($sql);
     $consulta = $this->db->prepare($sql);
     $consulta->execute();
 }
开发者ID:emanuel029,项目名称:tesis,代码行数:8,代码来源:habitaciones_model.php


示例4: followers

 public function followers(Request $request, User $user)
 {
     if (!($followers = $user->followers) or $followers->isEmpty()) {
         throw new HttpException('404', $user->name . " does not have any followers yet.");
     }
     \ChromePhp::log($followers);
     $this->authorize("viewFollowedUsers", $user);
     return $followers;
 }
开发者ID:nveeed,项目名称:Laravel-Social-App,代码行数:9,代码来源:UsersController.php


示例5: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, Setting $setting)
 {
     $this->validate($request, ['who_can_see_my_skills' => 'required|in:' . join(",", Setting::$options), 'who_can_see_who_i_am_following' => 'required|in:' . join(",", Setting::$options)]);
     \ChromePhp::log($setting->getTable());
     $this->authorize('owns', $setting);
     $setting->who_can_see_my_skills = $request->who_can_see_my_skills;
     $setting->who_can_see_who_i_am_following = $request->who_can_see_who_i_am_following;
     $setting->save();
     return "Settings updated.";
 }
开发者ID:nveeed,项目名称:Laravel-Social-App,代码行数:17,代码来源:SettingsController.php


示例6: canFollow

 public function canFollow(User $user, Connection $connection)
 {
     if ($user->id == $connection->follows) {
         throw new HttpException('403', "You can not follow yourself");
     }
     $alreadyFollowing = Connection::where("follower", $user->id)->where("follows", $connection->follows)->first();
     \ChromePhp::log($alreadyFollowing);
     if ($alreadyFollowing) {
         throw new HttpException('403', "You are already following this user.");
     }
     return true;
 }
开发者ID:nveeed,项目名称:Laravel-Social-App,代码行数:12,代码来源:ConnectionPolicy.php


示例7: getTypemachine

 /**
  * Renvoie un type machine
  * 
  * @param type $id
  * @return type
  * @throws Exception
  */
 public function getTypemachine($id)
 {
     $sql = "select ID_type_machine as id, code_type_machine as nom, libelle_type_machine\n                from type_machines where ID_type_machine=?";
     $typemachine = $this->executerRequete($sql, array($id));
     ChromePhp::log('$id : ', $id);
     if ($typemachine->rowCount() == 1) {
         return $typemachine->fetch();
         // Accès à la première ligne de résultat
     } else {
         throw new Exception("Aucun type machine ne correspond à l'identifiant '{$id}'");
     }
 }
开发者ID:Dacendi,项目名称:timelab,代码行数:19,代码来源:Typemachines.php


示例8: connect

 function connect()
 {
     try {
         //$connection = new PDO( "sqlsrv:Server=". self::SERVER . " ; Database =". self::DATABASE , self::USER, self::PASSWORD);
         $connection = new PDO("mysql:host=localhost;dbname=harvpren_magicCards;charset=utf8", self::USER, self::PASSWORD);
         $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
         return $connection;
     } catch (Exception $e) {
         ChromePhp::log($e);
         return $e->getMessage();
     }
 }
开发者ID:harvPrentiss,项目名称:Magic,代码行数:12,代码来源:databaseConnector.php


示例9: getMarque

 /**
  * Renvoie un fournisseur
  * 
  * @param type $id
  * @return type
  * @throws Exception
  */
 public function getMarque($id)
 {
     $sql = "select ID_marque as id, libelle_court_marque as nom, libelle_long_marque, ad_1, ad_2, ad_num, ad_rue, ad_cp, ad_ville,\n        \t\t ad_pays, ad_website, contact1, contact2, phone1, phone2, ad_mail1, ad_mail2\n                from marques where ID_marque=?";
     $marque = $this->executerRequete($sql, array($id));
     ChromePhp::log('$id : ', $id);
     if ($marque->rowCount() == 1) {
         return $marque->fetch();
         // Accès à la première ligne de résultat
     } else {
         throw new Exception("Aucune marque ne correspond à l'identifiant '{$id}'");
     }
 }
开发者ID:Dacendi,项目名称:timelab,代码行数:19,代码来源:Marques.php


示例10: init

 public static function init()
 {
     // \Template::instance()->extend('img',function($node){
     //     var_dump($node);
     //      array(1) {
     //       ["@attrib"]=>
     //       array(1) {
     //         ["src"]=>
     //         string(25) "{{'ui/images/'[email protected]}}"
     //       }
     //     }
     // });
     \ChromePhp::log('INIT');
 }
开发者ID:daslicht,项目名称:F3Helper,代码行数:14,代码来源:F3Helper.php


示例11: getMenu

 /**
  * Renvoie les infos sur un menu
  * 
  * @param type $id
  * @return type
  * @throws Exception
  */
 public function getMenu($id)
 {
     //  $sql = "select ID_menu as id, libelle_menu from menus where ID_menu=?";
     $sql = "select code_menu, libelle_menu from menus where code_menu=?";
     $menu = $this->executerRequete($sql, array($id));
     //  $menu = $this->executerRequete($sql, array($codeMenu));
     ChromePhp::log('$menu : ', $menu);
     ChromePhp::log('$id : ', $id);
     if ($menu->rowCount() == 1) {
         return $menu->fetch();
         // Accés à la première ligne de résultat
     } else {
         throw new Exception("La page '{$id}' est introuvable !");
     }
 }
开发者ID:Dacendi,项目名称:timelab,代码行数:22,代码来源:Menu.php


示例12: __construct

 private function __construct()
 {
     // Handles debugging. If TRUE, displays all errors and enables FirePHP logging
     if (ACTIVATE_DEBUG_MODE === TRUE) {
         ini_set("display_errors", 1);
         ERROR_REPORTING(E_ALL);
         FB::setEnabled(TRUE);
         FB::warn("FirePHP logging is enabled! Sensitive data may be exposed.");
         ChromePhp::warn("ChromePHP logging is enabled! Sensitive data may be exposed.");
     } else {
         ini_set("display_errors", 0);
         error_reporting(0);
         FB::setEnabled(FALSE);
     }
 }
开发者ID:RobMacKay,项目名称:Helix,代码行数:15,代码来源:class.dbg.inc.php


示例13: mergeClientes

 public function mergeClientes($clientes)
 {
     global $cnx;
     $idClientesAdd = array();
     $idClientes = array();
     $ind = 0;
     foreach ($clientes as $cliente) {
         $idCliente = $cliente[0];
         $cveCliente = $cliente[1];
         $nomCliente = utf8_decode($cliente[2]);
         $apCliente = utf8_decode($cliente[3]);
         $amCliente = utf8_decode($cliente[4]);
         $direccion = utf8_decode($cliente[5]);
         $fechaNacimiento = $cliente[6];
         $telefono = $cliente[7];
         $correo = $cliente[8];
         $idTipCliente = $cliente[9];
         $ind = $cliente[13];
         if ($idCliente == "") {
             // NUEVO REGRISTRO
             $query = "INSERT INTO cliente(cveCliente,nombreCliente,apCliente,amCliente,direccionCliente,telefonoCliente,mailCliente,fechaNCliente,idTipoCliente) VALUES('{$cveCliente}','{$nomCliente}','{$apCliente}','{$amCliente}','{$direccion}',{$telefono},'{$correo}','{$fechaNacimiento}',{$idTipCliente})";
             //                ChromePhp::log($query);
             try {
                 $rs = $cnx->Execute($query);
                 array_push($idClientes, array($cnx->Insert_ID(), $ind));
                 $idClientesAdd['mesaje'] = "ok";
             } catch (Exception $exc) {
                 $idClientesAdd['mesaje'] = $exc->getTraceAsString();
                 return $idClientesAdd;
             }
         } else {
             //ACTUALIZACION DE PRODUCTO
             $query = "UPDATE cliente set cveCliente ='{$cveCliente}', nombreCliente = '{$nomCliente}', apCliente='{$apCliente}',amCliente = '{$amCliente}',direccionCliente='{$direccion}',telefonoCliente={$telefono},mailCliente='{$correo}',fechaNCliente='{$fechaNacimiento}' ,idTipoCliente={$idTipCliente} WHERE idCliente = {$idCliente}";
             ChromePhp::log($query);
             try {
                 $rs = $cnx->Execute($query);
                 $idClientesAdd['mesaje'] = "ok";
             } catch (Exception $exc) {
                 $idClientesAdd['mesaje'] = $exc->getTraceAsString();
                 return $idClientesAdd;
             }
         }
     }
     $idClientesAdd['nuevosIds'] = $idClientes;
     //        print_r($idProductosAdd);
     //
     return $idClientesAdd;
 }
开发者ID:kinno,项目名称:Inventario,代码行数:48,代码来源:funcionesClientesModel.php


示例14: ejecutar

 public function ejecutar($valor)
 {
     /*$data = array("value" => $valor);                                                                    
     		$data_string = json_encode($data);                                                                                   
                                                                                                                          
     		$ch = curl_init($this->propiedades['apideejecucion']);                                                                      
     		curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
     		curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);                                                                  
     		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
     		curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
     			'Content-Type: application/json',                                                                                
     			'Content-Length: ' . strlen($data_string))                                                                       
     		);                                                                                                                                                                                                                                       
     		$result = curl_exec($ch);*/
     ChromePhp::Log("cambio a " . $valor);
 }
开发者ID:emanuel029,项目名称:tesis,代码行数:16,代码来源:componente.php


示例15: ajouterReservation

    public function ajouterReservation()
    {
        // on crée une nouvelle machine
        ChromePhp::log('$machineToAdd (Machines) : ', $machineToAdd);
        $error = false;
        $sql = 'insert into machines(code_machine,libelle_machine,image_machine, id_type_machine,id_sous_type_machine, id_marque,
		serial, date_entree, commentaire, lien_consigne
    	) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
        try {
            $this->executerRequete($sql, array($machineToAdd['code_machine'], $machineToAdd['libelle_machine'], $machineToAdd['image_machine'], $machineToAdd['id_type_machine'], $machineToAdd['id_sous_type_machine'], $machineToAdd['id_marque'], $machineToAdd['serial'], $machineToAdd['date_entree'], $machineToAdd['commentaire'], $machineToAdd['lien_consigne']));
        } catch (Exception $e) {
            $error = true;
            ChromePhp::log('$machineToAdd (erreur) : ', $e);
        }
        return $error;
    }
开发者ID:Dacendi,项目名称:timelab,代码行数:16,代码来源:Reservations.php


示例16: handle

 /**
  * Using ChromePhp, log the message
  */
 public function handle(PteLogMessage $message)
 {
     switch ($message->getType()) {
         case PteLogMessage::$ERROR:
             ChromePhp::error($message->getMessage());
             break;
         case PteLogMessage::$WARN:
             ChromePhp::warn($message->getMessage());
             break;
         case PteLogMessage::$INFO:
             ChromePhp::info($message->getMessage());
             break;
         case PteLogMessage::$DEBUG:
         default:
             ChromePhp::log($message->getMessage());
             break;
     }
 }
开发者ID:ilke-zilci,项目名称:newcomers-wp,代码行数:21,代码来源:log.php


示例17: Add

 public function Add()
 {
     \ChromePhp::log("Subscr CRUD Add");
     if ($subscriber = $this->getSubscriber()) {
         $this->user = \CUser::GetByID($subscriber)->Fetch();
         \CUser::Authorize($this->user["ID"]);
         if ($subscribe = \CSubscription::GetList(False, array("ACTIVE" => "Y", "USER_ID" => $this->user["ID"]))->Fetch()) {
             return $subscribe["ID"];
         } else {
             try {
                 return $this->addSubscribe();
             } catch (SubscribeException $e) {
                 prentExpection($e->getMessage());
             }
         }
     } else {
         throw new SubscribeUserException("No user for add to subscribers" . ". Line: " . __LINE__);
     }
 }
开发者ID:ASDAFF,项目名称:bitrix_tehnomir,代码行数:19,代码来源:CRUD.php


示例18: log

 /**
  * @param null $obj
  * @param null $label
  * @param string $type
  */
 public static function log($obj = null, $label = null, $type = LoggerLevel::LEVEL_LOG)
 {
     if (!static::$_enabled) {
         return;
     }
     if ($type == LoggerLevel::LEVEL_TRACE) {
         $e = new \Exception();
         $obj = explode("\n", $e->getTraceAsString());
         $label = empty($label) ? 'TRACE' : $label . ' | TRACE';
         $type = null;
     }
     $type = strtoupper($type);
     $delay = static::getTimer();
     $label = $delay . ' :: ' . $label;
     \ChromePhp::log($type, $label);
     \ChromePhp::log($type, $obj);
     $instance = \FirePHP::getInstance(true);
     $instance->fb($obj, $label, $type);
 }
开发者ID:bixev,项目名称:firelog,代码行数:24,代码来源:Firelog.php


示例19: registrarse

 function registrarse($email, $nombre, $pass)
 {
     if (!empty($nombre)) {
         // comprobamos que el campo nombre no esté vacío
         if (!empty($pass)) {
             if (preg_match('/^[A-Za-z0-9-_.+%]+@[A-Za-z0-9-.]+\\.[A-Za-z]{2,4}$/', $email)) {
                 $email = $this->db->quote($email);
                 $pass = $this->db->quote($pass);
                 $nombre = $this->db->quote($nombre);
                 $consulta = 'SELECT usuario_email FROM usuarios WHERE usuario_email =' . $email . '';
                 $consulta = $this->db->prepare($consulta);
                 $consulta->execute();
                 if ($row = $consulta->fetch()) {
                     return "existe usuario";
                 } else {
                     $pass = md5($pass);
                     $consulta = "SELECT MAX(usuario_id) AS id FROM usuarios";
                     $consulta = $this->db->prepare($consulta);
                     $consulta->execute();
                     if ($row = $consulta->fetch()) {
                         $id = trim($row[0]);
                     } else {
                         $id = 0;
                     }
                     $id = $id + 1;
                     ChromePhp::log($id);
                     $consulta = 'INSERT INTO usuarios (usuario_id, usuario_nombre, usuario_clave, usuario_email, usuario_freg) VALUES (\'' . $id . '\', ' . $nombre . ', \'' . $pass . '\', ' . $email . ', NOW())';
                     ChromePhp::log($consulta);
                     $consulta = $this->db->prepare($consulta);
                     $consulta->execute();
                     return "Registrado";
                 }
             } else {
                 return "Email incorrecto";
             }
         } else {
             return "Password vacio";
         }
     } else {
         return "Nombre vacio";
     }
 }
开发者ID:emanuel029,项目名称:tesis,代码行数:42,代码来源:registro_model.php


示例20: _log

 function _log($data, $label = null, $backtrace = false)
 {
     // Stop execution and log to ChromePhp if the class exists
     if (class_exists('ChromePhp')) {
         if ($label) {
             $r = array('label' => $label, 'data' => $data);
             return ChromePhp::log($r);
         }
         return ChromePhp::log($data);
     }
     $output = '';
     switch (gettype($data)) {
         case "array":
         case "object":
             $output .= print_r($data, TRUE);
             if ($label !== null) {
                 $output .= "\n\n---^^^^^^^ END {$label} ^^^^^^^---";
             }
             break;
         case "integer":
         case "float":
         case "string":
             $output .= $data;
             break;
         case "boolean":
             $converted_data = $data ? 'true' : 'false';
             $output .= $converted_data;
             break;
         default:
             $output .= "ERROR: tried to log bad type [" . gettype($data) . "]";
             break;
     }
     if ($backtrace) {
         _backtrace($label);
     }
     if (!empty($label)) {
         $output = "\t--- [ {$label} ] ---\n\n" . $output . "\n";
     }
     error_log($output);
 }
开发者ID:Josephjbliss,项目名称:stickypictures,代码行数:40,代码来源:logging.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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