Download the PHP
package gercoli/htmltags without Composer
On this page you can find all versions of the php package
gercoli/htmltags. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor gercoli Package htmltags Short Description Easy to use class for creating HTML tags in an OOP way. License
MIT
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.
Easy to use class for creating HTML tags in an OOP way.
Instalation
Include this into your composer.json file:
Using the class
The HTMLTags class uses fully qualified name spaces, so for easier use, add into your php file. Secondly, the class was designed to be easy to use by allowing the chaining of setter methods.
Example of a simple tag
Nesting HTML tags
Notes on end tags
By default, when you add content to a tag via or
a closing tag will automatically be enabled, however, using
will disable a closing tag, and according to the
HTML5 spec, this
is perfectly valid (which is why I have not added a check for this), so be aware of this fact.
HTML tags with XHTML children
When you echo out a parent tag that has children, the format of the parent tag does not
currently cascade down to it's children, and this is by design. There are tags out there,
specifically social networks that don't always properly validate non-XHTML tags, and as such
when you set a tag to being XHTML, it will remain that way until YOU change it. THIS WILL
change in the future, but to keep validators happy, I will leave self-closing tags alone.
TO DO
Better documentation (working on it)
Implement the ability to parse a style attribute, we don't want duplicate styles.
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 gercoli/htmltags contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.