Download the PHP package nethead/markup without Composer

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

Nethead \ Markup

Markup is a package which let's you generate HTML code using objective PHP. It can be used as a helper in Blade templates (Laravel), but it basically is created as a support package for my other projects.

The package is framework-independent. This means you can install it in every project which is using PSR-4 autoloading.

Usage

Use Nethead\Markup\MarkupFactory to build object representation of the needed HTML. Use can generate menus, links, blocks, paragraphs, anything. MarkupFactory includes useful static helpers to quickly generate what you want. The package also includes a tag helper function if you like the functional approach more.

Generating HTML code

Markup objects are designed to support methods chaining, with self-explanatory syntax, and ability to pass them through the chain of execution. It makes it easy to make changes to the markup with comfortable objective API, instead of operating on strings or arrays. This is useful for example when you have multiple modules, each altering or adding something to the HTML.

Using HtmlAttributes

Each Markup object has a public attrs() method which returns the HtmlAttributes object, which in turn allows you to set, remove or modify the attributes of an HTML element.

Using ClassList object

Each Markup object is also allowing you to set and remove CSS classes without calling the attr() object. You can access the ClassList object directly with classList() public method:

Configuring the package

Using the HtmlConfig you can easily change how the HTML is generated. For example, if you like to have void tags (like input) closed everytime, just call this before you start creating:

Refer to the documentation to have a better insight of what can be configured and how.

Icons Factory

The IconsFactory makes it easy to switch between the icon fonts providers. By default, it is configured to generate Font Awesome HTML tags. For example, if you're using the Bootstrap's Glyphicons, you could do:

Forms

You can build HTML forms using OOP PHP and easily add business logic. Look at the example below to see how easy it is to build a language select dropdown menu:


All versions of markup with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3
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 nethead/markup contains the following files

Loading the files please wait ....