本文整理汇总了PHP中Events::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Events::get方法的具体用法?PHP Events::get怎么用?PHP Events::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Events
的用法示例。
在下文中一共展示了Events::get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testBuildLevels
/** @dataProvider provideKeys */
public function testBuildLevels(array $events)
{
foreach ($events as $key => $event) {
$this->events->set($key, $event);
}
parent::assertEquals('first', $this->events->get('key'));
parent::assertEquals('second', $this->events->get('key another'));
}
示例2: Users
if (isset($_SESSION['user'])) {
$usr = new Users();
$usr = $usr->get($_SESSION['user']);
if (!$usr) {
header('HTTP/1.0 302 Found');
header("Location: index.php?map=login&page=index");
exit;
}
}
if (!isset($_GET['id'])) {
header('HTTP/1.0 302 Found');
header("Location: index.php?map=events&page=index");
exit;
}
$id = $_GET['id'];
$events = new Events();
$event = $events->get($id);
if (!$event) {
header('HTTP/1.0 302 Found');
header("Location: index.php?map=events&page=index");
exit;
}
$events->delete($event['events_id']);
?>
<script>
$.notify("Evenement is succesvol verwijderd!", "success");
</script>
<?php
header('HTTP/1.0 302 Found');
header("Location: index.php?map=events&page=index");
exit;
示例3: array
$app->render('template.php', array('view' => "profile.html"));
});
$app->get('/dinner/', function () use($app) {
$app->render('template.php', array('view' => "dinner.html"));
});
$app->get('/hunt/', function () use($app) {
$app->render('template.php', array('view' => "hunt.html"));
});
$app->get('/contact/', function () use($app) {
$app->render('template.php', array('view' => "contact.html"));
});
$app->get('/media/', function () use($app) {
$app->render('template.php', array('view' => "media.php"));
});
$app->get('/events/', function () use($app) {
$events = Events::get();
$app->render('template.php', array('events' => $events, 'view' => "events.php"));
});
$app->get('/directors/', function () use($app) {
$app->render('template.php', array('view' => "directors.html"));
});
$app->get('/sponsor/', function () use($app) {
$app->render("template.php", array("view" => "donate.html"));
});
$app->get("/store/", function () use($app) {
$app->render("template.php", array("view" => "store.html"));
});
$app->get("/thankyou/", function () use($app) {
$app->render("template.php", array("view" => "thankyou.html"));
});
$app->get("/thankyou2/", function () use($app) {
示例4: Events
$landen = $landen->get_all();
$events = new Events();
//Check of er POST waarde is
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
//Valideer post attr
if ($_POST && isset($_POST['naam'], $_POST['omschrijving'], $_POST['datum'], $_POST['type'], $_POST['genre'], $_POST['plaatsnaam'], $_POST['land'])) {
$naam = test_input($_POST['naam']);
$omschrijving = test_input($_POST['omschrijving']);
$datum = test_input($_POST['datum']);
$type = test_input($_POST['type']);
$genre = test_input($_POST['genre']);
$plaatsnaam = test_input($_POST['plaatsnaam']);
$land = test_input($_POST['land']);
$event = $events->add($type, $genre, $land, $plaatsnaam, $naam, $omschrijving, $datum, $usr['id']);
if ($event) {
$event = $events->get($event);
if ($event) {
?>
<script>
$.notify("Evenement is succesvol aangemaakt!", "success");
</script>
<?php
header('HTTP/1.0 302 Found');
header("Location: index.php?map=events&page=edit&id=" . $event['events_id']);
} else {
?>
<script>
$.notify("Evenement kon niet worden aangemaakt", "error");
</script>
<?php
}