Download the PHP package patrickschur/html5gen without Composer

On this page you can find all versions of the php package patrickschur/html5gen. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package html5gen

html5gen

Build Status codecov Version Minimum PHP Version License

An easy to use HTML5 generator written in PHP. Creates valid and secure HTML5 code.

Installation

To install the library I would recommend to use Composer. Execute the following command

or add this to your composer.json

Because the script is not really big you could also copy the Html5Gen.php out of the src folder to use the script without Composer.

Usage

outputs:

Attributes

All elements have one thing in common, all of them expect attributes. That is also the reason why it is the first parameter of all methods. You can specify attributes by an array. Where the key is the name of the attribute and the value the attribute value. If you do not want to specify attributes, leave the array empty. You can also omit the array if you do not use a callback.

outputs:

Callbacks

The second and last parameter is the a callback function defined by the user. This lets you write a more generic code and allows the nesting of elements. With the yield keyword it is possible to write text into the current element without terminating the function.

Notice: Elements like base, br, meta, area, input, wbr, hr, link, param, source, col and img can not have a callback, only attributes.

outputs:

Automatically Escaped Values

The script will automatically detect if it is useful to escape a value or not. For example if you want to define a script tag, it would not be useful to escape, because that destroys the logic of a script. But if you use a pre tag it makes much more sense to escape the value. Also works for attributes.

outputs:

[TODO] Checklist:

Contributing

Feel free to contribute. Any help is welcome.

License

This projects is licensed under the terms of the MIT license.


All versions of html5gen with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package patrickschur/html5gen contains the following files

Loading the files please wait ....