library formy-parser
Parses a string for formy elements and converts the string to an HTML form
waynestate/formy-parser
Parses a string for formy elements and converts the string to an HTML form
- Friday, July 28, 2017
- by robertvrabel
- Repository
- 3 Watchers
- 0 Stars
- 4,921 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 4 Versions
- 15 % Grown
Parses a string for formy elements and converts the string to an HTML form Edit Add topics, (*1)
Installation
composer require waynestate/formy-parser
Usage
<?php
use Waynestate\FormyParser\Parser;
use Waynestate\ParserMiddleware\ParserMiddleware;
// Composer autoload
require __DIR__ . '/../vendor/autoload.php';
// Create the instance of the Parser Middleware
$parser = new ParserMiddleware;
// Set the stack of parsers to run
$parser->setStack([
'Waynestate\FormyParser\Parser'
]);
// Original String we want to parse
$string = '<p>Content before embed.</p><p>[form id="undergrad"]</p><p>Content after embed.</p>';
// Generate the html form
$html_form = $parser->parse($string);
// Display the form with content surrounding it
echo $html_form;
Tests
phpunit
Code Coverage
phpunit --coverage-html ./coverage
dev-master
9999999-dev
Parses a string for formy elements and converts the string to an HTML form
Sources
Download
MIT
The Requires
The Development Requires
by
Web Communications
dev-develop
dev-develop
Parses a string for formy elements and converts the string to an HTML form
Sources
Download
MIT
The Requires
The Development Requires
by
Web Communications
1.0.1
1.0.1.0
Parses a string for formy elements and converts the string to an HTML form
Sources
Download
MIT
The Requires
The Development Requires
by
Web Communications
1.0.0
1.0.0.0
Parses a string for formy elements and converts the string to an HTML form
Sources
Download
MIT
The Requires
The Development Requires
by
Web Communications