/** * changeOrder * funkce pozmeni serazeni fotek * vyuziva jQuery sortable */ public function changeOrder($newOrdering) { $newOrdering = explode(",", $newOrdering); Debugger::fireLog($newOrdering); $fotky = $this->db->query('SELECT id_fotky FROM fotky ORDER BY razeni')->fetchAll(); $fotkyId = array(); foreach ($fotky as $fotka) { $fotkyId[] = $fotka->id_fotky; } Debugger::fireLog($fotkyId); for ($i = 0; $i < count($newOrdering); $i++) { $this->db->query("UPDATE fotky SET razeni=? WHERE id_fotky=?", $i, $fotkyId[(int) $newOrdering[$i]]); } $fotky = $this->db->query('SELECT id_fotky FROM fotky ORDER BY razeni')->fetchAll(); $fotkyId = array(); foreach ($fotky as $fotka) { $fotkyId[] = $fotka->id_fotky; } Debugger::fireLog($fotkyId); }
<!DOCTYPE html><link rel="stylesheet" href="assets/style.css"> <h1>FireLogger demo</h1> <p>Requires Firefox, Firebug and <a href="http://firelogger.binaryage.com">FireLogger</a>.</p> <?php require __DIR__ . '/../src/tracy.php'; use Tracy\Debugger; $arr = array(10, 20, array('key1' => 'val1', 'key2' => TRUE)); // will show in FireLogger tab in Firebug Debugger::fireLog('Hello World'); Debugger::fireLog($arr); function first($arg1, $arg2) { second(TRUE, FALSE); } function second($arg1, $arg2) { third(array(1, 2, 3)); } function third($arg1) { throw new Exception('The my exception', 123); } try { first(10, 'any string'); } catch (Exception $e) { Debugger::fireLog($e); }
public function renderEditRezervace($id) { $this->template->nameRezervace = $this->rezervaceModel->getNameById($id); Debugger::fireLog($this->rezervaceModel->getNameById($id)); }
function flg($var) { \Tracy\Debugger::fireLog($var); }
/** * @param $message */ function fire_log($message) { Debugger::fireLog($message); }
/** * Funkce pro otestování existence LM connect mineru * @return bool */ private function testRemoteMinerExists() { try { $remoteMinerId = $this->getRemoteMinerId(); if (!$remoteMinerId) { throw new \Exception('LISpMiner ID was not provided.'); } $url = $this->getRemoteMinerUrl() . '/miners/' . $remoteMinerId; $curlRequest = self::prepareNewCurlRequest($url); $response = $curlRequest->get(); Debugger::fireLog($response, "Test executed"); $this->parseResponse($response, ''); return true; } catch (\Exception $ex) { return false; } }