Download the PHP package shopware/dbal-nested-set without Composer

On this page you can find all versions of the php package shopware/dbal-nested-set. 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 dbal-nested-set

Doctrine DBAL Nested Set

Used in B2B Suite for Shopware 5

A multi root nested set implementation for DBAL users.

Description

This library provides you write, read and inspection classes for nested sets with multiple root nodes per table. Solely relying on the Doctrine DBAL.

Contrary to other solutions this library has clear boundaries and leaves the software design up to you.

Installation

Use composer to install the library

Usage

You always need a configuration that sets up the basic column names of your implementation:

Then you can use the NestedSetFactory to create the different classes of the library.

Create a tree

You may want to create a normalized schema for nested set tables, this can be accomplished through the NestedSetTableFactory. It will create the base DDL for a tree with indexes. So if you want to add a simple tree with a name column and an autoincrement id it will look like this:

Of course this is optional and may be accomplished through any schema configuration tool.

Modify the tree

The library provides a NestedSetWriter class that contains all insert, move and update operations. All operations should be reminiscent of Doctrine\DBAL\Connection::insert() and Doctrine\DBAL\Connection::update() and just require plain data.

As an example you can use this to create a tree

And then use the writer to move nodes around

Inspect nodes

You may want to retrieve information about different nodes. This can be done through the NestedSetTableNodeInspector.

Inspect the tree

The NestedSetQueryFactory helps retrieve a set of nodes from the tree. Since the library has no concept of entities it will only prepare query builders for you ready to add selects, joins and other conditions.

Local development

If you want to develop locally you may have to configure the database access through a little shell script:


All versions of dbal-nested-set with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.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 shopware/dbal-nested-set contains the following files

Loading the files please wait ....