food forest design phasis.


<?php


function donnee(string $size){
if($size === "small") {
 
 return [
  'description0' => "goals articulation summary exercise only; simple goals; 2 hours",
  'start0' =>  date('2019-1-1 08:00:00'),
  'end0' => date('2019-1-1 12:00:00'),
  'description1' => "16 hours",
  'start1' => date('2019-1-2 08:00:00'),
  'end1' => date('2019-1-3 18:00:00'),
  'description2' => "simple, quick, and sketchy. 3 bubble diagrams and a simple summary. Existing and desired species niche analyses; 8 hours",
  'start2' => date('2019-1-4 08:00:00'),
  'end2' => date('2019-1-4 18:00:00'),
  'description3' => "a few options; 2 hours",
  'start3' => date('2019-1-5 08:00:00'),
  'end3' => date('2019-1-5 12:00:00'),
  'description4' => "few options and iterations; single instant succession to an horizon; 8 hours",
  'start4' => date('2019-1-5 14:00:00'),
  'end4' => date('2019-1-6 12:00:00'),
  'description5' => "small numbers of species and guilds; 6 hours",
  'start5' => date('2019-1-6 14:00:00'),
  'end5' => date('2019-1-7 12:00:00'),
  'description6' => "5 patches of low to moderate complexity; with some repetition; 10 hours",
  'start6' => date('2019-1-7 14:00:00'),
  'end6' => date('2019-1-8 18:00:00')  
 ];
}
if($size === "moderate") {
 return [
  'description0' => "All goals exercises plus summary; many goals; 6 hours",
  'start0' => date('2019-1-7 14:00:00'),
  'end0' =>  date('2019-1-7 20:00:00'),
  'description1' => "24 hours",
  'start1' => date('2019-1-8 08:00:00'),
  'end1' => date('2019-1-10 20:00:00'),
  'description2' => "assess all topic with their own quick diagram; complex summary; existing and desired species niche analyses; varmints, pests and deseases; ecological neighborhood; 18 hours",
  'start2' => date('2019-1-11 08:00:00'),
  'end2' => date('2019-1-12 20:00:00'),
  'description3' => "several options; 3 hours" ,
  'start3' => date('2019-1-13 14:00:00'),
  'end3' => date('2019-1-13 18:00:00'),
  'description4' => "several options and iterations; several instant succession nuclei that merge; 12 hours" ,
  'start4' => date('2019-1-14 08:00:00'),
  'end4' => date('2019-1-14 20:00:00'),
  'description5' => "many species and guilds; 8 hours" ,
  'start5' => date('2019-1-15 08:00:00'),
  'end5' => date('2019-1-15 20:00:00'),
  'description6' =>"many patches of low to moderate complexity; with little repetition; 20 hours" ,
  'start6' => date('2019-1-16 08:00:00'),
  'end6' => date('2019-1-19 20:00:00')
  
 ];
}
if($size === "large") {
 return [
  'description0' => "Outline process, with revisions; many goals and criteria; 2 days" ,
  'start0' => date('2019-1-20 08:00:00'),
  'end0' => date('2019-1-21 20:00:00'),
  'description1' => "6 days" ,
  'start1' => date('2019-1-22 08:00:00'),
  'end1' => date('2019-1-27 20:00:00'),
  'description2' => "in depth diagram for all topics; complex summary; existing and desired species niche analyses; varmints, pests and deseases; ecological neighborhood; native ecosystem analyses; 5 days" ,
  'start2' => date('2019-1-28 08:00:00'),
  'end2' => date('2019-2-2 20:00:00'),
  'description3' => "many options; 5 hours",
  'start3' => date('2019-2-3 08:00:00'),
  'end3' => date('2019-2-3 20:00:00'),
  'description4' => "many options and iterations; group decision making; succional rotational schemes; 4 days",
  'start4' => date('2019-2-4 08:00:00'),
  'end4' => date('2019-2-7 20:00:00'),
  'description5' => "many species and guilds; crop timing and maintenance considerations; 3 days",
  'start5' => date('2019-2-10 08:00:00'),
  'end5' => date('2019-2-13 20:00:00'),
  'description6' => "simple broadscale patches, plus complex intensive patches with rotation schemes; 4 days",
  'start6' => date('2019-2-14 08:00:00'),
  'end6' => date('2019-2-18 20:00:00')
  
 ];
}


}
function project(string $size, string $forestname){

$data = [];
//appeler une méthode qui retourne un $data rempli selon $size
$data = donnee($size);
//var_dump($data);

//appeler la classe events
//pour enregistrer sur la base avec create
require '../source/date/Events.php';
require_once '../source/bootstrap.php';
$pdo = get_pdo();


$statement = $pdo->prepare("INSERT INTO `gardens` (`name`, `description`, `place`) VALUES (?, ?, ?)");
$garden = $statement->execute([$forestname, "7 évenements design process", "lieudit les augniais 36240 Preaux"]);
$garden_id = $pdo->lastInsertId();

$events = new App\Calendar\Events($pdo);
//appeler la classe event
require '../source/date/Event.php';
//creer 7 event avec leur titre
$event0 = new App\Calendar\Event();
 $event0->setName($forestname." articulate goals");
 $event0->setDescription($data['description0']);
 $event0->setStart($data['start0']);
 $event0->setEnd($data['end0']);
 $event0->setGardenID($garden_id);
 $events->create($event0);
$event1 = new App\Calendar\Event();
 $event1->setName($forestname." base mapping");
 $event1->setDescription($data['description1']);
 $event1->setStart($data['start1']);
 $event1->setEnd($data['end1']);
 $event1->setGardenID($garden_id);
 $events->create($event1);
$event2 = new App\Calendar\Event();
 $event2->setName($forestname." analyse and assess site");
 $event2->setDescription($data['description2']);
 $event2->setStart($data['start2']);
 $event2->setEnd($data['end2']);
 $event2->setGardenID($garden_id);
 $events->create($event2);
$event3 = new App\Calendar\Event();
 $event3->setName($forestname." design concept");
 $event3->setDescription($data['description3']);
 $event3->setStart($data['start3']);
 $event3->setEnd($data['end3']);
 $event3->setGardenID($garden_id);
 $events->create($event3);
$event4 = new App\Calendar\Event();
 $event4->setName($forestname." schematic design");
 $event4->setDescription($data['description4']);
 $event4->setStart($data['start4']);
 $event4->setEnd($data['end4']);
 $event4->setGardenID($garden_id);
 $events->create($event4);
$event5 = new App\Calendar\Event();
 $event5->setName($forestname." detailed design");
 $event5->setDescription($data['description5']);
 $event5->setStart($data['start5']);
 $event5->setEnd($data['end5']);
 $event5->setGardenID($garden_id);
 $events->create($event5);
$event6 = new App\Calendar\Event();
 $event6->setName($forestname." patch design");
 $event6->setDescription($data['description6']);
 $event6->setStart($data['start6']);
 $event6->setEnd($data['end6']);
 $event6->setGardenID($garden_id);
 $events->create($event6);
 
 
 
 return $pdo->lastInsertId();
}

 

 

This field is empty for now

Relational Mapping