Download the PHP package hguenot/html-builder without Composer

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

PHP HTML Builder

A simple library to generate HTML fragments with a jquery-like interface.

This library does not parse HTML, and it does not provide element lookup via selectors or otherwise. It is focused on building simple HTML fragments, for example embed codes, while taking care of proper escaping and other simple syntax rules. Its purpose is to replace manual concatenation of strings.

(Fork of https://github.com/timostamm/html-builder - PHP 7 support and releases)

Continuous integration

Build Status Code coverage GitHub version Packagist version

Examples

Factory methods

Html::element($tagName)

Creates an element.

Html::comment($text)

Creates a comment node.

Html::text($text)

Creates a text node.

Appending elements

$el->append($tagNameOrNode)

Add the new element as the last child.

$el->appendTo(Element $target)

Add the element as the targets last child.

$el->prepend($tagNameOrNode)

Add the new element as the first child.

$el->prependTo($Element $target)

Add the element as the targets first child.

Element Attributes

$el->attr($name, $value)

Sets the attribute with the given name and value.

$el->attr($name)

Returns the attribute with the given name.

$el->attr()

Returns all attributes as an associative array.

$el->removeAttr($name)

Removes the attribute with the given name.

Element html

$el->html($str)

Adds a raw html string as a child.

$el->html()

Returns the html representation of the content.

$el->__toString() / $el->toString()

Returns the node as html.

Element text

$el->html($str)

Adds a text node.

$el->text()

Returns the text contents of this node including its descendants.

Element classes

$el->addClass($class)

Add one or more classes. Multiple classes are separated by a space.

$el->hasClass($class)

Returns true if the element has the class.

$el->toggleClass($class, $state)

Remove or add the class.

get classes

Use $el->attr("class")

Element tag name

$el->getTagname()

Returns the tag name.

$el->switchTagname($value)

Changes the tag name.


All versions of html-builder with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
hguenot/data-tree Version v1.*
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 hguenot/html-builder contains the following files

Loading the files please wait ....