Skip to content

Instantly share code, notes, and snippets.

<?php
use Rubricate\Logger\AbstractLogger;
class TestLog extends AbstractLogger
{
protected static $ex = '.log';
protected static function getDirFullPath()
{
@estefanionsantos
estefanionsantos / dev_2022-09-20.txt
Last active September 7, 2022 01:06
result log file
2022-09-20 14:05:00 DEBUG: Array
(
[0] => lorem
[1] => ipsum
[2] => dolor
)
2022-09-20 14:05:00 DEBUG: int(1)
2022-09-20 14:05:00 DEBUG: bool(true)
2022-09-20 14:05:00 DEBUG: some text here
2022-09-20 14:05:00 DEBUG: float(5.2)
@estefanionsantos
estefanionsantos / main.php
Last active September 6, 2022 14:11
exemple wasp log
<?php
$arr = [
'lorem',
'ipsum',
'dolor'
];
$int = 1;
$bool = true;
@estefanionsantos
estefanionsantos / TestLog.php
Last active October 4, 2022 20:04
Extending to class AbstractLogger
<?php
use Rubricate\Logger\AbstractLogger;
class TestLog extends AbstractLogger
{
protected static function getDirFullPath()
{
return '/path/to/directory/logs/';
}
@estefanionsantos
estefanionsantos / select.php
Created April 10, 2022 17:08
select element
<?php
use Rubricate\Element\CreateElement;
use Rubricate\Element\StrElement;
$select = new CreateElement('select');
$select->setAttribute('name', 'latim');
$opt[] = 'lorem';
$opt[] = 'ipsum';
@estefanionsantos
estefanionsantos / input.php
Last active October 20, 2022 16:13
input element
<?php
use Rubricate\Element\CreateElement;
$firstName = new CreateElement('input');
$firstName->setAttribute('type', 'text');
$firstName->setAttribute('name', 'firstName');
$firstName->setAttribute('class', 'form');
$firstName->setAttribute('required');
@estefanionsantos
estefanionsantos / image.php
Created April 10, 2022 17:03
image element
<?php
use Rubricate\Element\CreateElement;
$i1 = new CreateElement('img');
$i1->setAttribute('src', 'image.png');
$i2 = new CreateElement('img');
$i2->setAttribute('src', 'image.png');
$i2->setAttribute('class', 'img-circle');
@estefanionsantos
estefanionsantos / heading.php
Created April 10, 2022 17:00
heading - element
<?php
use Rubricate\Element\CreateElement;
use Rubricate\Element\StrElement;
$h1 = new CreateElement('h1');
$h1->setAttribute('class', 'tx_prm');
$h1->addChild(new StrElement('Lorem ipsum'));
@estefanionsantos
estefanionsantos / form.php
Created April 10, 2022 16:51
form element
<?php
use Rubricate\Element\CreateElement;
$name = new CreateElement('input');
$name->setAttribute('type', 'text');
$name->setAttribute('name', 'name');
$name->setAttribute('required');
$email = new CreateElement('input');
<?php
use App\Helper\ViewHelper;
$view = new ViewHelper();
$data['title'] = 'Home';
$data['header'] = 'Lorem ipsum';
$data['body'] = 'Some text here';