本文整理汇总了PHP中ChromePhp::log方法的典型用法代码示例。如果您正苦于以下问题:PHP ChromePhp::log方法的具体用法?PHP ChromePhp::log怎么用?PHP ChromePhp::log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChromePhp
的用法示例。
在下文中一共展示了ChromePhp::log方法的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: 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();
}
示例3: 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;
}
示例4: 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.";
}
示例5: 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}'");
}
}
示例6: 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();
}
}
示例7: 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;
}
示例8: 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}'");
}
}
示例9: 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');
}
示例10: 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 !");
}
}
示例11: 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;
}
示例12: 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;
}
示例13: log
/**
* log to console directly with this method passing only the first required parameter and to change
* the log type the third parameter according to allowed log types. pass a lable for second parameter
* to describe the message send to console.
*
* @error 10908
* @param null|mixed $mixed expects the message of any type to send to console
* @param null|string $label expects the optional label to describe the first parameter
* @param string $type expects the log type - see log type array
* @param array $options expects optional parameters
* @return void
* @throws Xapp_Error
*/
public function log($mixed = null, $label = null, $type = 'info', array $options = array())
{
$type = strtolower((string) $type);
if (array_key_exists($type, self::$_typeMap)) {
if ($type === 'ini') {
$this->ini($mixed, $label, $options);
}
if ($label !== null) {
$label = trim(trim($label), ':') . ':';
}
switch ($this->_driver) {
case 'chromephp':
switch ($type) {
case $type === 'ungroup' || $mixed === null:
$this->console->groupEnd();
break;
case 'group':
$this->console->group($mixed);
break;
case 'trace':
$this->console->log((string) $label, $mixed, 'info');
break;
default:
$this->console->log((string) $label, $mixed, self::$_typeMap[$type]);
}
break;
case 'firephp':
switch ($type) {
case $type === 'ungroup' || $mixed === null:
$this->console->groupEnd();
break;
case 'group':
$this->console->group($mixed, $options);
break;
case 'trace':
$this->console->trace($label);
break;
default:
$this->console->{$type}($mixed, (string) $label, $options);
}
break;
}
} else {
throw new Xapp_Error(xapp_sprintf(_("xapp console log type: %s not supported"), $type), 1090801);
}
}
示例14: 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;
}
}
示例15: 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__);
}
}