Download the PHP package nabeghe/nohtml without Composer

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

NoHtml for PHP

Say no to HTML — write views in PHP with a clean, simple DSL.

There are many PHP-based DSLs for HTML out there but NoHTML takes a different route in both behavior and structure. At its core, there's a class where each method corresponds to an HTML element. These methods can be used in both static and instance contexts. Each method accepts a variadic list of arguments representing the element’s children. The return value of every method is an instance of the Nabeghe\NoHtml\Nodes\Element class, whose methods map to the element's attributes, following a Fluent Builder pattern.

🫡 Usage

🚀 Installation

You can install the package via composer:

Example

In the example below, the NoHtml class is made available via an alias named N. You can also access the shared instance using the nohtml() function; however, the below code proceeds in a static manner.

In this code, an HTML element is created right from the start, and then the rest of the page is built around it.

You can define a child element or an attribute value as a callable, so the actual value can be retrieved at the appropriate time.

Children can be plain strings or anything else — they will be converted to strings. If they are plain strings, they will be escaped, unless the Nabeghe\NoHtml\Nodes\Unescapable class is used. Also, a callback defined for children can return a string, an element, or a list of elements. If it returns a string, that string will not be escaped.

As for attributes, a callback can return the value of the attribute. If the value is null, that attribute won’t be set at all. So, if you want an empty value, use an empty string — null means the attribute doesn't exist. Also, if an attribute is set to true or false, no value will be assigned — true simply means the attribute will be present, and false means it won't be there.

Notice: Setting children for elements like <img> or <br> has no effect.

Callbacks

The class related to the callbacks used in the example above:

📖 License

Copyright (c) 2025 https://elatel.ir

Licensed under the MIT license, see LICENSE.md for details.


All versions of nohtml with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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 nabeghe/nohtml contains the following files

Loading the files please wait ....