-
Notifications
You must be signed in to change notification settings - Fork 0
/
intro2.php
47 lines (35 loc) · 1.58 KB
/
intro2.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* Created by PhpStorm.
* User: Human Booster
* Date: 30/05/2017
* Time: 16:27
*/
function __autoload($className) {
$folders = ['Classes', 'Lib'];
foreach ($folders as $folder) {
if (is_readable($folder . '/' . $className . '.php')) {
require_once __DIR__ . '/' . $folder . '/' . $className . '.php';
return true;
}
return false;
}
}
try {
/////////////////////////////////////////////
$stagiaire = new Stagiaire("Symfony2", "Fabrice");
$stagiaire->addEvaluation(['php', '14']);
$stagiaire->addEvaluation(['js', '8']);
//$stagiaire->addEvaluation(18);
var_dump($stagiaire);
////////////////////////////////////////
$formateur = new Formateur("Ernest", "James");
$formateur->addEvaluationStagiaire(['python', 19], $stagiaire);
var_dump($stagiaire->getEvaluations());
var_dump($formateur);
$lorem = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilis';
//$extrait = new Extrait($lorem);
var_dump($stagiaire->getTxtExtrait($lorem));
} catch (Exception $e) {
echo $e->getMessage();
}