Created
October 16, 2018 03:29
-
-
Save jorgecc/e72d6bde3ac3f5bfb2b79692d24dde35 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include "vendor/autoload.php"; // it is crap, I will explain it later. | |
include "dao/ProductDao.php"; | |
// view | |
$blade=new \eftec\bladeone\BladeOne(__DIR__."/view",__DIR__."/compile"); | |
$blade->setMode(\eftec\bladeone\BladeOne::MODE_DEBUG); | |
// persistence | |
$db=new \eftec\DaoOne("localhost","root","abc.123","bladeonetut1"); | |
$db->connect(); | |
// this page is a single stage: | |
// it loads the list of products | |
// and it shows on the webpage | |
$list=\BladeOneTut1\ProductDao::list(); | |
echo $blade->run("product.list1",['products'=>$list]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment