dump() public static method

clean up any output before kint and place the dump at the top of page: - Kint::dump() ***** expand all nodes on display: ! Kint::dump() ***** dump variables disregarding their depth: + Kint::dump() ***** return output instead of displaying it: @ Kint::dump() ***** force output as plain text ~ Kint::dump() Modifiers are supported by all dump wrapper functions, including Kint::trace(). Space is optional. You can also use the following shorthand to display debug_backtrace(): Kint::dump( 1 ); Passing the result from debug_backtrace() to kint::dump() as a single parameter will display it as trace too: $trace = debug_backtrace( true ); Kint::dump( $trace ); Or simply: Kint::dump( debug_backtrace() );
public static dump ( mixed $data = null ) : void | string
$data mixed
return void | string
 public static function sandbox()
 {
     // Testaa koodiasi täällä
     // Kint-luokan dump-metodi tulostaa muuttujan arvon
     $m = Teammember::findByBoth(1, 1);
     Kint::dump($p);
 }
Ejemplo n.º 2
0
 public static function store()
 {
     self::check_logged_in();
     $params = $_POST;
     if (empty($_POST['projects'])) {
         $errors[] = 'Select at least one project!';
         $projects = '';
     } else {
         $projects = $_POST['projects'];
     }
     $attributes = array('description' => $params['description'], 'priority' => $params['priority'], 'status' => 0, 'projectids' => $projects);
     $task = new Task($attributes);
     //$errors = $task->errors(); // Deprecated: Switched to valitron. Calls all validators
     $errors = $task->validateTask();
     // Valitron takes care of putting all errors in one array
     //Kint::dump($params); // Debug, comment out Redirect if used!
     //Kint::dump($task);
     if (count($errors) == 0) {
         $task->save();
         // Tell task-model to save this object to DB
         foreach ($projects as $project) {
             Project::addTask($task->id, $project);
             // We don't know the id before it is saved!
             Project::updateCount($project);
         }
         Redirect::to('/task/' . $task->id, array('message' => 'Task added to database!'));
     } else {
         Kint::dump($errors);
         $projects = Project::all();
         Kint::dump($attributes);
         Kint::dump($projects);
         View::make('task/new.html', array('errors' => $errors, 'attributes' => $attributes, 'projects' => $projects));
     }
 }
Ejemplo n.º 3
0
 public static function show($id)
 {
     $reader = Reader::find($id);
     $bookCount = Book::getNumberOfBooksByReader($id);
     Kint::dump($bookCount);
     View::make('reader/show_reader.html', array('reader' => $reader, 'bookCount' => $bookCount));
 }
Ejemplo n.º 4
0
 public function showList()
 {
     $imageService = new ImageService();
     $images = $imageService->getAllImages();
     \Kint::dump($images);
     $this->slim->render('gallery/list.phtml', ['images' => $images]);
 }
 public static function sandbox()
 {
     // Testaa koodiasi täällä
     $wokki = new Resepti(array('ruokalaji' => '', 'annosmaara' => ''));
     $errors = $wokki->errors();
     Kint::dump($errors);
 }
Ejemplo n.º 6
0
 public function forgot($usuario)
 {
     try {
         $this->load->library('email');
         $data['errores'] = false;
         Kint::dump();
         if ($this->email->valid_email($usuario['email'])) {
             echo 'valido email OKA';
             die;
             $query = $this->db->query("SELECT u.* FROM usuarios u WHERE u.estado_usuario ' AND email = " . $this->db->escape($usuario['email']));
             if ($query->num_rows() == 1) {
                 $usuario = $query->row_array();
                 $newData = $this->cambiarClave($usuario);
                 $usuario['clave'] = $newData['clave'];
                 $data['usuario'] = $usuario;
             } else {
                 $data['errores'] = true;
                 $data['noExiste'] = true;
             }
         } else {
             echo 'no valido el mail';
             $data['errores'] = true;
             $data['email'] = true;
         }
         return $data;
     } catch (Exception $e) {
         $data['errores'] = true;
         return $data;
     }
 }
 public static function sandbox()
 {
     // Testaa koodiasi täällä
     $Sven = new Hero(array('name' => 's', 'primaryattribute' => 'jäbäys', 'damagetype' => 'Physical', 'primaryrole' => 'core', 'attacktype' => 'Melee'));
     $errors = $Sven->errors();
     Kint::dump($errors);
 }
Ejemplo n.º 8
0
 public static function sandbox()
 {
     $first = Recipe::find(1);
     $recipes = Recipe::all();
     Kint::dump($recipes);
     Kint::dump($first);
 }
Ejemplo n.º 9
0
 public function save()
 {
     $pdo_connection = DB::connection();
     $success = true;
     //the begin of transaction
     $pdo_connection->beginTransaction();
     try {
         $query = $pdo_connection->prepare("INSERT INTO saalistieto (pvm, kellonaika," . " kalalaji, lkm, pituus, paino, vesisto, paikka, tuulenvoimakkuus," . " tuulensuunta, ilmanlampo, vedenlampo, pilvisyys, huomiot," . " saaliskuva, pyydys) VALUES(:pvm, NULLIF(:aika,'')::time, :laji, :lkm," . " NULLIF(:pituus,'')::numeric, NULLIF(:paino,'')::numeric, :vesisto," . " :paikka, :tuulenVoima, :tuulenSuunta," . " NULLIF(:ilmanLampo,'')::integer, NULLIF(:vedenLampo,'')::integer, :pilvisyys," . " :huomiot, :kuva, NULLIF(:pyydys,'default')::integer) RETURNING saalisid");
         $query->execute(array('pvm' => $this->date, 'aika' => $this->time, 'laji' => $this->species, 'lkm' => $this->count, 'pituus' => $this->length, 'paino' => $this->weight, 'vesisto' => $this->water_sys, 'paikka' => $this->location, 'tuulenVoima' => $this->wind_speed, 'tuulenSuunta' => $this->wind_dir, 'ilmanLampo' => $this->air_temp, 'vedenLampo' => $this->water_temp, 'pilvisyys' => $this->cloudiness, 'huomiot' => $this->notes, 'kuva' => $this->picture_url, 'pyydys' => $this->trap_id));
         $resultRow = $query->fetch();
         $this->catch_id = $resultRow['saalisid'];
         $catchers;
         $username = array($_SESSION['user']);
         if (isset($this->friends)) {
             $catchers = array_merge($username, $this->friends);
         } else {
             $catchers = $username;
         }
         $query_2 = $pdo_connection->prepare("INSERT INTO pyydystaja VALUES(" . ":kalastaja, :saalisid)");
         foreach ($catchers as $catcher) {
             $query_2->execute(array('kalastaja' => $catcher, 'saalisid' => $this->catch_id));
         }
     } catch (PDOException $e) {
         $success = false;
         Kint::dump($e);
         Kint::trace();
     }
     //end of transaction
     if (!$success) {
         $pdo_connection->rollBack();
     } else {
         $pdo_connection->commit();
     }
 }
Ejemplo n.º 10
0
 public static function sandbox()
 {
     $postedTo1 = ForumUser::findPostedTo(1);
     $postedTo2 = ForumUser::findPostedTo(2);
     Kint::dump($postedTo1);
     Kint::dump($postedTo2);
 }
Ejemplo n.º 11
0
 public function update()
 {
     $query = DB::connection()->prepare('UPDATE Task SET (description, status, priority, projectids) = (:description, :status, :priority, :projectids) WHERE id = :id');
     Kint::dump($query);
     $query->execute(array('id' => $this->id, 'description' => $this->description, 'status' => $this->status, 'priority' => $this->priority, 'projectids' => implode(",", $this->projectids)));
     $row = $query->fetch();
     // row is false if db is angry, great for debugging
 }
Ejemplo n.º 12
0
 public static function sandbox()
 {
     $skyrim = Astiat::find(1);
     $astia = Astiat::all();
     // Kint-luokan dump-metodi tulostaa muuttujan arvon
     Kint::dump($astia);
     Kint::dump($skyrim);
 }
 public static function sandbox()
 {
     // Testaa koodiasi täällä
     //$logged_user = self::get_user_logged_in();
     $params = $_POST;
     Kint::dump($params);
     View::make('notimplemented.html');
 }
 public static function sandbox()
 {
     // Testaa koodiasi täällä
     //$catch_1 = CatchModel::find(1);
     $catch = new CatchModel(array('kalalaji' => "lahna", 'lkm' => '0', 'vedenLampo' => '-3'));
     $errors = $catch->errors();
     Kint::dump($errors);
 }
Ejemplo n.º 15
0
 public static function updateCount($id)
 {
     $count = self::taskcount($id);
     Kint::dump($count);
     $query = DB::connection()->prepare('UPDATE Project SET taskcount = :taskcount WHERE id = :id');
     $query->execute(array('id' => $id, 'taskcount' => $count));
     $row = $query->fetch();
 }
 public static function sandbox()
 {
     // Testaa koodiasi täällä
     $pokemon = Pokemons::find(1);
     $pokemons = Pokemons::all();
     Kint::dump($pokemon);
     Kint::dump($pokemons);
 }
Ejemplo n.º 17
0
 public function delete($id)
 {
     $query = DB::connection()->prepare('DELETE FROM Customer WHERE id= :id RETURNING id');
     $query->execute(array('id' => $id));
     $row = $query->fetch();
     Kint::dump($row);
     //$this->id = $row['id'];
 }
Ejemplo n.º 18
0
 public function save()
 {
     $query = DB::connection()->prepare('INSERT INTO Hero (name, primaryattribute, attacktype, primaryrole, damagetype, description) VALUES(:name, :primaryattribute, :attacktype, :primaryrole, :damagetype, :description) RETURNING id');
     $query->execute(array('name' => $this->name, 'primaryattribute' => $this->primaryattribute, 'attacktype' => $this->attacktype, 'primaryrole' => $this->primaryrole, 'damagetype' => $this->damagetype, 'description' => $this->description));
     $row = $query->fetch();
     Kint::trace();
     Kint::dump($row);
 }
 public static function sandbox()
 {
     // Testaa koodiasi täällä
     $eka = Survey::find(1);
     $kaikki = Survey::all();
     Kint::dump($eka);
     Kint::dump($kaikki);
 }
 public static function sandbox()
 {
     // Testaa koodiasi täällä
     //View::make('helloworld.html');
     $uusiKurssi = new Kurssi(array('nimi' => '1', 'aika' => 'III periodi', 'tyyppi' => 'agf', 'kuvaus' => 'Metriikkaa', 'opettaja' => ''));
     $errors = $uusiKurssi->errors();
     Kint::dump($errors);
 }
Ejemplo n.º 21
0
 public function save()
 {
     $query = DB::connection()->prepare('INSERT INTO Askare (perheenjasen_id, nimi, tarkeys, lisatty, valmis, muuta)VALUES(:perheenjasen_id, :nimi, :tarkeys, NOW(), :valmis, :muuta)RETURNING id');
     $query->execute(array('perheenjasen_id' => BaseController::get_user_logged_in()->id, 'nimi' => $this->nimi, 'tarkeys' => $this->tarkeys, 'valmis' => $this->valmis, 'muuta' => $this->muuta));
     $row = $query->fetch();
     Kint::dump($row);
     $this->id = $row['id'];
 }
 public static function sandbox()
 {
     $Bouillabaisse = Resepti::find(1);
     $reseptit = Resepti::all();
     // Kint-luokan dump-metodi tulostaa muuttujan arvon
     Kint::dump($reseptit);
     Kint::dump($Bouillabaisse);
 }
 public static function sandbox()
 {
     // Testaa koodiasi täällä
     //View::make('helloworld.html');
     $torakat = Book::find(1);
     $books = Book::all();
     Kint::dump($books);
     Kint::dump($torakat);
 }
 public static function sandbox()
 {
     // Testaa koodiasi täällä
     // View::make('helloworld.html');
     $indi = Recipe::find(1);
     $indis = Recipe::all();
     Kint::dump($indi);
     Kint::dump($indis);
 }
Ejemplo n.º 25
0
 public function save()
 {
     $query = DB::connection()->prepare('INSERT INTO Aanestys (nimi, aanestysalkaa, aanestysloppuu, kuvaus, onkoid, luojaid) VALUES (:nimi, :aanestysalkaa, :aanestysloppuu, :kuvaus, :onkoid, :luojaid) RETURNING id');
     $query->execute(array('nimi' => $this->nimi, 'aanestysalkaa' => $this->aanestysalkaa, 'aanestysloppuu' => $this->aanestysloppuu, 'kuvaus' => $this->kuvaus, 'onkoid' => $this->onkoid, 'luojaid' => $this->luojaid));
     $row = $query->fetch();
     $this->id = $row['id'];
     Kint::trace();
     Kint::dump($row);
 }
Ejemplo n.º 26
0
 public function update()
 {
     $query = DB::connection()->prepare('UPDATE Requests (name, description, hashtags) VALUES (:name, :start_date, :end_date, :description, :hashtags) RETURNING id');
     $query->execute(array('name' => $this->name, 'description' => $this->description, 'hashtags' => $this->hashtags));
     $row = $query->fetch();
     Kint::trace();
     Kint::dump($row);
     $this->id = $row['id'];
 }
Ejemplo n.º 27
0
 public static function varastotuote_lisaa_show($varasto_id)
 {
     self::check_logged_in();
     Kint::dump($varasto_id);
     // Hae ja listaa kaikki tuotteet tähän taulukkoon
     $Tuotteet = TuoteController::tuote_list_all();
     Kint::dump($Tuotteet);
     View::make('VarastoTuote/Lisaauusivarastotuote.html', array('Tuotteet' => $Tuotteet));
 }
 public static function sandbox()
 {
     // Testaa koodiasi täällä
     // echo 'Hello World!';
     // View::make('helloworld.html');
     $tali = Course::find(2);
     $courses = Course::all();
     Kint::dump($tali);
     Kint::dump($courses);
 }
 public static function sandbox()
 {
     // Testaa koodiasi täällä
     $viski = new Drink(array('id' => 0));
     $viskicola = Drink::find(1);
     $drinks = Drink::all();
     // Kint-luokan dump-metodi tulostaa muuttujan arvon
     Kint::dump($drinks);
     Kint::dump($viskicola);
 }
Ejemplo n.º 30
0
 public function update()
 {
     // JUPDATE:ssa joku vika??
     $query = DB::connection()->prepare('INSERT INTO Waybill (customer_id, receiver_id, arrived) VALUES ( :customer_id, :receiver_id, :arrived) RETURNING id');
     $query->execute(array('customer_id' => $this->customer_id, 'receiver_id' => $this->receiver_id, 'arrived' => $this->arrived, 'id' => $this->id));
     $row = $query->fetch();
     Kint::trace();
     Kint::dump($row);
     $this->id = $row['id'];
 }