Skip to content
EasePHP FrameWork support for HTML5
PHP Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
Examples
debian
nbproject
src/Ease
tests
.gitignore
.scrutinizer.yml
Makefile
README.md
composer.json
phpunit.xml
project-icon-400.png
project-logo.png
project-logo.svg

README.md

EasePHP Framework HTML Logo

Ease Framework Html

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads

GitHub issues GitHub stars

"my way how to assemble web page using PHP Objects."

Basic Example for HTML5 WebPage:

$head = new \Ease\Html\HeadTag( new \Ease\Html\TitleTag('Ease WebPage'));

$body = new \Ease\Html\BodyTag(new \Ease\Html\HeaderTag( new \Ease\Html\H1Tag('Web Page')));

$body->addItem( new \Ease\Html\ArticleTag('Example'));

$body->addItem(new \Ease\Html\FooterTag( new \Ease\Html\SmallTag( new \Ease\Html\ATag('v.s.cz','Vitex Software') ) ));

$oPage = new \Ease\Html\HtmlTag([$head,$body]);

echo $oPage;

or use the WebPage class:

$oPage = new \Ease\WebPage('Ease WebPage');

$oPage->addItem(new \Ease\Html\HeaderTag(new \Ease\Html\H1Tag('Web Page')));

$oPage->addItem(new \Ease\Html\ArticleTag('Example'));

$oPage->addItem(new \Ease\Html\FooterTag(new \Ease\Html\SmallTag(new \Ease\Html\ATag('v.s.cz',
                'Vitex Software'))));

echo $oPage;

Special Classess

Main Glue of Ease\Html is

Ease\Container

Container can contain simple text, another object or mix od them.

$group = [ new StrongTag('strong text'), 'simple text ', new DivTag( new HrTag() ) ];

$heap = new Container();
$heap->addItem('text to include');
$heap->addItem( new H1Tag('heading) );
$heap->addItem( $group );

Ease\Document

Is smarter container able to hold Scripts and cascade styles

$oPage = new Page();

and finally:

Ease\WebPage

Is Page that include Head and Body elements

$oPage = new \Ease\WebPage('Page title');
$oPage->addItem( new \Ease\Html\ImgTag( 'images/sun.png' );
$oPagr->addJavaScript('alert("Let the sun shine in!")');
echo $oPage;

Implemented HTML5 tags:

Installation

composer require vitexsoftware/ease-html
You can’t perform that action at this time.