-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdemo.php
31 lines (21 loc) · 933 Bytes
/
demo.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
<?php
require_once 'vendor/autoload.php';
use Bpstr\Elements\Base\ElementAttributeCollection;
use Bpstr\Elements\Base\ElementContentCollection;
use Bpstr\Elements\Base\Markup;
use Bpstr\Elements\Extension\EventAttribute;
use Bpstr\Elements\Html\Element;
echo EventAttribute::script('demo-endpoint.php?a=');
$markup = Markup::create('report', 'Lorem ipsum dolor sit amet.', ['created' => date('Y-m-d')]);
//echo $markup;
$markup->content('footer_key', Markup::create('footer', 'Footer of the report.'))->attr('expires', 'never');
echo $markup;
$contents = new ElementContentCollection(['Paragraph', 'Wrapped'], Element::create('p'));
echo $contents;
$attr = new ElementAttributeCollection();
$attr->set('href', 'asd');
echo $attr;
$p = Element::create('p', 'Lorem ipsum dolor sit amet.')->attr('data-shit', 'true');
$p->setAttribute('id', 'test');
$p->attachExtension((new EventAttribute)->onClick('Call Ipsum.'));
echo $p;