Download the PHP package royallthefourth/html-document without Composer

On this page you can find all versions of the php package royallthefourth/html-document. 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 html-document

html-document

SensioLabsInsight Scrutinizer Code Quality

html-document is an object oriented tool for building HTML documents. It's intended to be more practical than the standard DOM implementation, but it's not exactly a by-the-book DOM implementation.

What does it do?

What does it not do?

Installation

Install with Composer. Add the library to your composer.json:

Then install:

This library has no dependencies.

Example

Building all or part of an HTML document with this library is easy. Take a look:

This returns a complete HTML page as a string:

Of course, you're unlikely to want to build whole documents in place like this. The real idea behind this library is to allow objects to represent themselves as elements to put on a page. For example, you might have an object that can take a Layout object to provide presentation behavior. Injecting a TableRowLayout object will provide the behaviors of the layout object without breaking encapsulation. Now your object can represent itself as a <tr> without the need for a templating engine, public properties, or getter methods. With this approach, a thoughtfully composed system of objects leads directly to a finished HTML document. See my blog for a more detailed example.

One important difference from the usual conception of HTML documents is that these elements do not have values. Instead, the library provides a special element type called Text that can be used to place arbitrary text within any node that has open and close tags.

There are also Arbitrary and ArbitraryEmpty elements in case you need a nonstandard element. The only difference between these two is that Arbitrary has a closing tag while ArbitraryEmpty does not. For example, <br> could be implemented as an ArbitraryEmpty.

For more examples, see the tests directory. My intention is for this library to be very straightforward and self-documenting.

Safety

This library does not sanitize its inputs at all. Treat everything you pass into this library as if it's getting echoed directly onto the page. htmlspecialchars() should be enough to prevent any unwanted markup from appearing.

If I am mistaken about any of this, please notify me right away.

Contributing

Bug reports, bug fixes, tests, and documentation are heartily welcomed. If something in the library is missing or out of date, I'd love for it to be brought up to standard. If it's a simple bugfix, go ahead and open a pull request. Please include a test that exposes the bug along with your bugfix.

For anything more complex, open an issue first so we can discuss how to handle it.


All versions of html-document with dependencies

PHP Build Version
Package Version
Requires php Version ^7
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 royallthefourth/html-document contains the following files

Loading the files please wait ....