本文整理汇总了PHP中Kint类的典型用法代码示例。如果您正苦于以下问题:PHP Kint类的具体用法?PHP Kint怎么用?PHP Kint使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Kint类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sandbox
public static function sandbox()
{
// Testaa koodiasi täällä
// Kint-luokan dump-metodi tulostaa muuttujan arvon
$m = Teammember::findByBoth(1, 1);
Kint::dump($p);
}
示例2: sandbox
public static function sandbox()
{
// Testaa koodiasi täällä
$wokki = new Resepti(array('ruokalaji' => '', 'annosmaara' => ''));
$errors = $wokki->errors();
Kint::dump($errors);
}
示例3: show
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));
}
示例4: showList
public function showList()
{
$imageService = new ImageService();
$images = $imageService->getAllImages();
\Kint::dump($images);
$this->slim->render('gallery/list.phtml', ['images' => $images]);
}
示例5: parse
public function parse(&$variable)
{
if (!$variable instanceof Closure) {
return false;
}
$this->name = 'Closure';
$reflection = new ReflectionFunction($variable);
$ret = array('Parameters' => array());
if ($val = $reflection->getParameters()) {
foreach ($val as $parameter) {
// todo http://php.net/manual/en/class.reflectionparameter.php
$ret['Parameters'][] = $parameter->name;
}
}
if ($val = $reflection->getStaticVariables()) {
$ret['Uses'] = $val;
}
if (method_exists($reflection, 'getClousureThis') && ($val = $reflection->getClosureThis())) {
$ret['Uses']['$this'] = $val;
}
if ($val = $reflection->getFileName()) {
$this->value = Kint::shortenPath($val) . ':' . $reflection->getStartLine();
}
return $ret;
}
示例6: forgot
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;
}
}
示例7: sandbox
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);
}
示例8: sandbox
public static function sandbox()
{
$first = Recipe::find(1);
$recipes = Recipe::all();
Kint::dump($recipes);
Kint::dump($first);
}
示例9: save
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();
}
}
示例10: store
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));
}
}
示例11: sandbox
public static function sandbox()
{
$postedTo1 = ForumUser::findPostedTo(1);
$postedTo2 = ForumUser::findPostedTo(2);
Kint::dump($postedTo1);
Kint::dump($postedTo2);
}
示例12: sandbox
public static function sandbox()
{
$Bouillabaisse = Resepti::find(1);
$reseptit = Resepti::all();
// Kint-luokan dump-metodi tulostaa muuttujan arvon
Kint::dump($reseptit);
Kint::dump($Bouillabaisse);
}
示例13: updateCount
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();
}
示例14: sandbox
public static function sandbox()
{
// Testaa koodiasi täällä
//$logged_user = self::get_user_logged_in();
$params = $_POST;
Kint::dump($params);
View::make('notimplemented.html');
}
示例15: update
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
}