Ejemplo n.º 1
0
 public function run()
 {
     //DB::table('airplanes')->delete();
     // lot_b738_1
     Airplane::create(array('airplane_model_id' => 1, 'airline_id' => 1, 'base_airport_id' => 1, 'built' => 1993, 'registration' => 'SP-MMA'));
     // lot_b738_2
     Airplane::create(array('airplane_model_id' => 1, 'airline_id' => 1, 'base_airport_id' => 1, 'built' => 1995, 'registration' => 'SP-LST'));
     // lh_b738_1
     Airplane::create(array('airplane_model_id' => 1, 'airline_id' => 2, 'base_airport_id' => 4, 'built' => 2001, 'registration' => 'D-GDTR'));
     // lh_b738_2
     Airplane::create(array('airplane_model_id' => 1, 'airline_id' => 2, 'base_airport_id' => 4, 'built' => 2006, 'registration' => 'D-THDS'));
     // lh_atr_1
     Airplane::create(array('airplane_model_id' => 2, 'airline_id' => 2, 'base_airport_id' => 4, 'built' => 1999, 'registration' => 'D-ANBA'));
     // eurolot_atr_1
     Airplane::create(array('airplane_model_id' => 2, 'airline_id' => 4, 'base_airport_id' => 1, 'built' => 1994, 'registration' => 'SP-ATB'));
     // eurolot_atr_2
     Airplane::create(array('airplane_model_id' => 2, 'airline_id' => 4, 'base_airport_id' => 1, 'built' => 1994, 'registration' => 'SP-ATC'));
     // eurolot_atr_3
     Airplane::create(array('airplane_model_id' => 2, 'airline_id' => 4, 'base_airport_id' => 1, 'built' => 1997, 'registration' => 'SP-ATD'));
     // ba_738_1
     Airplane::create(array('airplane_model_id' => 1, 'airline_id' => 3, 'base_airport_id' => 5, 'built' => 2011, 'registration' => 'G-MKOP'));
 }
Ejemplo n.º 2
0
<?php

require_once 'config/config.conf.php';
#### VEHICULE ####
$voiture1 = new Vehicule();
$voiture1->marque = 'bmw';
$voiture1->modele = '320i';
$voiture1->annee = '2002';
$voiture1->couleur = 'noir';
$voiture1->displayDescription();
echo '<hr>';
$voiture2 = new Vehicule('peugeot', '106', '2011', 'rouge');
$voiture2->displayDescription();
echo '<hr>';
#### AIRPLANE ####
$airplane1 = new Airplane('boeing', '747', '1985', 'blanc');
$airplane1->count_helix = 2;
$airplane1->count_wing = 2;
$airplane1->displayDescription();
$airplane1->decoller();
echo '<hr>';
#### JDC ####
// On simule un resultat de requete BDD
$result = array('id' => '123', 'name' => 'bob', 'content' => 'Lorem ipsum...', 'picture' => 'toto.png', 'creation_date' => '2015-11-10 13:10:00');
$jdc = new Jdc($result);
echo $jdc->displayJdc();