Download the PHP package manychois/pompom without Composer

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

Pompom

Pompom is a PHP library for building HTML with a component-based, DOM-first workflow: you compose templates from PHP classes that yield Dom\* nodes, not from string assembly or a separate template language.


Get started

You will install the package and render one named component to a Dom\HTMLDocument, then print HTML. You need PHP 8.5+ with ext-dom.

1. Install

2. Render a root component

Register a component resolver (here Psr4ComponentResolver) so a string name maps to a component class. Build an engine, call render, then serialize:

You should see HTML produced by your hello-page component (that class must exist at the path implied by your PSR-4 mapping).


How to …

Run tests and quality checks in this repository

If documentation/internal/ is missing, initialize the submodule:

Then:


About Pompom

Pompom is built around PHP 8.5+ and the modern Dom\* API (Dom\HTMLDocument, Dom\Element, …), not the legacy DOMDocument stack. The goal is reusable, testable pieces that return real DOM trees.

Resolution and rendering. You map arbitrary component names (e.g. hello-page) to classes via a component resolver. The engine creates an empty Dom\HTMLDocument, instantiates the root component, and iterates render($props). Constructor injection gives only shared dependencies such as the document and engine; render-time data is always $props, not the DI container.

What components output. Components yield mixed values (text, nodes, nested component references). A content resolver turns each chunk into Dom\Node instances and the engine appends them. The root component is responsible for the full document shape (<html>, <head>, <body> if you need a full page); the engine does not insert those for you.

Composition. Typical pieces include AbstractComponent, NodeUtility for element helpers, component() / ComponentBuilder for child components, and children / named regions for slot-like content.

Why DOM-first. Output stays structured and easy to assert in tests (saveHtml(), walking nodes) and avoids ad-hoc concatenation; optional Prettier can indent HTML for readability before serialization.


Reference

Package manychois/pompom
PHP >= 8.5
Extensions ext-dom
Symbol Role
Engine Builds an empty Dom\HTMLDocument, resolves the root component, consumes render() output.
ComponentResolverInterface Maps a component name to a component class (e.g. Psr4ComponentResolver).
AbstractComponent Base for components; render() / getContent() pipeline, component(), children and regions.
ContentResolverInterface Turns mixed yielded content into Dom\Node for a given document.
Prettier Optional in-place formatting before saveHtml().

Serialization uses Dom\HTMLDocument methods such as saveHtml() and saveHtmlFile().


All versions of pompom with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-dom Version *
php-di/php-di Version ^7.1.1
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 manychois/pompom contains the following files

Loading the files please wait ...