Download the PHP package webx-ui/compositions without Composer

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

webx-ui/compositions

Compound Blade views as trees of nodes with ids, patched by themes without copies.

A composition — the document every page is printed in, a page of a module — is a tree in JSON. The package that introduces it gives the base tree, modules add their pieces, a theme and the site patch the tree by id: set an attribute, add, remove, move or replace a node, for every page or for one page type. The result is compiled into ordinary Blade views, one for each composition and handle, with static component tags; a request merges nothing.

Part of WebX UI. webx-ui/theme-default gives the composition layout (and layout.minimal, layout.blank); webx-ui/themes hands over the theme chain, so each theme's compositions/ is a layer.

Requirements

Install

The service provider is discovered. A package that loads compositions registers it itself, so the registry is one singleton before any provider boots:

A base and a patch

<package>/compositions/layout/default.json — the base, in the bottom layer:

theme/compositions/layout/default.json — a patch of the site's theme:

theme/compositions/layout/blog.article.json — the same for one page type, over default.

A base may also say vars — the variables its leaves get, ["article", "related"] — and dispatcher — the view that includes it, "webx-blog::article". They change nothing compiled: webx:composition:show prints them, and webx:theme:check looks for a copy of the dispatcher and notes a theme's view that reads a variable the leaves do not get.

Operations apply in a fixed order within a file — add, move, replace, attrs, props, remove — and layer by layer: the base, the modules by id, the themes bottom up, the site's config. A patch that names a node that is not there is skipped and logged as a finding; the page renders.

Rendering

A dispatcher view includes the compiled variant of its handle:

and a module's page names its handle: <x-layout handle="blog.article">.

The set is compiled again on a request whose sources (the JSON files, their directories, the config, vendor/composer/installed.php) are newer than it, while Blade checks its own views (view.check_cache_timestamps).

Config

php artisan vendor:publish --tag=webx-compositions-config:

Testing

WebxUi\Compositions\Testing\IsolatedCompositions gives a test a compiled set of its own, so a test that loads other modules does not read the set of the one before it.

WebxUi\Compositions\Testing\ComparesHtml — assertSameHtml($before, $after): the same HTML up to the whitespace between tags (the indent between a tag and its text counts as one space), the measure a view turned into a composition is held to.

License

MIT


All versions of compositions with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/console Version ^13.0
illuminate/filesystem Version ^13.0
illuminate/support Version ^13.0
illuminate/view Version ^13.0
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 webx-ui/compositions contains the following files

Loading the files please wait ...