1. Go to this page and download the library: Download yetii/html-element library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yetii / html-element example snippets
$element = new HtmlInput([
'type' => 'date',
'id' => 'dob_field',
'name' => 'dob',
]);
$element->render(); // <input type="date" id="dob_field" name="dob">
// Or try a custom element name (if generating Vue, for example)
$element->setName('dob-picker');
$element->render(); // <dob-picker type="date" id="dob_field" name="dob">
$text = new \Html\HtmlElement\TextNode([
'node' => 'This is some text',
]);
$text->render(); // This is some text
$div = new HtmlDiv([
'node' => $text
]);
$div->render(); // <div>This is some text</div>
$div = new HtmlDiv([
'node' => 'So is this'
]);
$div->render(); // <div>So is this</div>
namespace YeTii\VueGenerator\Component;
use YeTii\HtmlElement\Element;
use YeTii\HtmlElement\Interfaces\IsSingleton;
class DobPicker extends Element implements IsSingleton
{
protected $name = 'dob-picker';
protected $attributes = [
'type' => 'date', // all <dob-pickers> should have this
];
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.