本文整理汇总了PHP中ChromePhp类的典型用法代码示例。如果您正苦于以下问题:PHP ChromePhp类的具体用法?PHP ChromePhp怎么用?PHP ChromePhp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ChromePhp类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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 !');
}
}
示例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();
}
示例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;
}
示例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.";
}
示例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;
}
示例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}'");
}
}
示例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();
}
}
示例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}'");
}
}
示例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/'.@article.image}}"
// }
// }
// });
\ChromePhp::log('INIT');
}
示例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 !");
}
}
示例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);
}
}
示例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;
}
示例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);
}
示例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;
}