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 | |
| use Rubricate\Element\CreateElement; | |
| use Rubricate\Element\StrElement; | |
| $h1 = new CreateElement('h1'); | |
| $h1->setAttribute('class', 'tx_prm'); | |
| $h1->addChild(new StrElement('Lorem ipsum')); | |
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 | |
| use Rubricate\Element\CreateElement; | |
| $name = new CreateElement('input'); | |
| $name->setAttribute('type', 'text'); | |
| $name->setAttribute('name', 'name'); | |
| $name->setAttribute('required'); | |
| $email = new CreateElement('input'); |
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 | |
| use App\Helper\ViewHelper; | |
| $view = new ViewHelper(); | |
| $data['title'] = 'Home'; | |
| $data['header'] = 'Lorem ipsum'; | |
| $data['body'] = 'Some text here'; |
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 | |
| use App\Helper\ViewHelper; | |
| $view = new ViewHelper(); | |
| $view->render('home'); | |
| # source: src/view/home.php | |
| /* | |
| <html> |
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
| <h1>Home</h1> | |
| some text here |
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 | |
| namespace App\Helper; | |
| use Rubricate\Resource\DirectoryPathResource; | |
| use Rubricate\Resource\FileResource; | |
| use Rubricate\Resource\BufferResource; | |
| class ViewHelper |
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 | |
| $data = include 'dataArr.php'; | |
| $table = new Rubricate\Table\ContainerTable(); | |
| $header = new Rubricate\Table\HeadRowTable(); | |
| $body = new Rubricate\Table\BodyTable(); | |
| $foot = new Rubricate\Table\FootRowTable(); |
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 | |
| $data = include 'dataArr.php'; | |
| $alignLeft = array('align'=>'left'); | |
| $table = new Rubricate\Table\ContainerTable(); | |
| $body = new Rubricate\Table\BodyTable(); |
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 | |
| $data = include 'dataArr.php'; | |
| $table = new Rubricate\Table\ContainerTable(); | |
| $header = new Rubricate\Table\HeadRowTable(); | |
| $body = new Rubricate\Table\BodyTable(); | |
| $table->setAttribute('border', '1'); |
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 | |
| /* fileName: dataArr.php */ | |
| $data[] = array( | |
| 'id' => 1, | |
| 'name' => 'John', | |
| 'user' => '@john', | |
| 'occupation' => 'Engineer', | |
| 'salary' => '18000', |