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', |
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\Form\InputForm; | |
$name = new InputForm('text', 'name', 'john'); | |
$email = new InputForm('email', 'email', '[email protected]'); | |
$password = new InputForm('password', 'password', '123456'); | |
$age = new InputForm('number', 'age', '25'); | |
$phone = new InputForm('tel', 'phone', '5551999999'); |
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\Form\TextareaForm; | |
use Rubricate\Form\LabelForm; | |
use Rubricate\Element\CreateElement; | |
$div = new CreateElement('div'); | |
$lab = new LabelForm('Message:'); | |
$msg = new TextareaForm('message'); |
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\Form\TextForm; | |
use Rubricate\Form\LabelForm; | |
use Rubricate\Element\CreateElement; | |
$div = new CreateElement('div'); | |
$lab = new LabelForm('First Name:'); | |
$txt = new TextForm('firstName', 'john'); |