-
Notifications
You must be signed in to change notification settings - Fork 121
/
Copy pathtestbootstrap4.php
70 lines (59 loc) · 1.53 KB
/
testbootstrap4.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/**
* Copyright (c) 2016 Jorge Patricio Castro Castillo MIT License..s
*/
/** @deprecated */
use eftec\bladeone\BladeOne;
use eftec\bladeone\BladeOneHtmlBootstrap;
use eftec\bladeone\BladeOneHtmlBootstrap4;
include "../lib/BladeOne.php";
include "../lib/BladeOneHtml.php";
include "../lib/BladeOneHtmlBootstrap4.php";
$views = __DIR__ . '/views';
$compiledFolder = __DIR__ . '/compiled';
$blade=new BladeOneHtmlBootstrap4($views,$compiledFolder);
//<editor-fold desc="Example data">
$countries=array();
$country=new stdClass();
$country->id=1;
$country->cod='ar';
$country->name="Argentina";
$country->continent="America";
$countries[]=$country;
$country=new stdClass();
$country->id=2;
$country->cod='ca';
$country->name="Canada";
$country->continent="America";
$countries[]=$country;
$country=new stdClass();
$country->id=3;
$country->cod='us';
$country->name="United States";
$country->continent="America";
$countries[]=$country;
$country=new stdClass();
$country->id=4;
$country->cod='jp';
$country->name="Japan";
$country->continent="Asia";
$countries[]=$country;
$countrySelected=3;
$multipleSelect=[1,2];
//</editor-fold>
class FormOne {
public function Exampple() {
return $this;
}
}
function Form() {
return new FormOne();
}
try {
echo $blade->run("TestBS.hellobootstrap"
, ["countries" => $countries
, 'countrySelected' => $countrySelected
, 'multipleSelect' => $multipleSelect]);
} catch (Exception $e) {
echo "error found ".$e->getMessage()."<br>".$e->getTraceAsString();
}