-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
36 lines (24 loc) · 789 Bytes
/
index.php
File metadata and controls
36 lines (24 loc) · 789 Bytes
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
<?php
require 'vendor/autoload.php';
use App\Collection\Collection;
use App\User;
use App\Unidade;
use App\UnidadeIntegradora;
$fr = new User('Francisca');
$fa = new User('Fábia');
$array = [$fr, $fa];
$col = new Collection($array);
var_dump($col->sortName()->toArray());
$unidade1 = new Unidade('Coração Norte');
$unidade2 = new Unidade('Instituto Norte Fluminense');
$unidade3 = new Unidade('Hospital do Coração');
$unidade4 = new Unidade('Maternidade das Irmas');
$ui1 = new UnidadeIntegradora();
$ui1->setUnidadeAula($unidade3);
$ui1->setUnidadeBeneficiada($unidade2);
$ui2 = new UnidadeIntegradora();
$ui2->setUnidadeAula($unidade4);
$ui2->setUnidadeBeneficiada($unidade1);
$array = [$ui1, $ui2];
$col = new Collection($array);
var_dump($col->sortName()->toArray());