Download the PHP package dbeurive/tree without Composer

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

Description

This package implements various tree utilities.

Installation

From the command line:

composer require dbeurive/tree

From your composer.json file:

API documentation

The detailed documentation of the API can be extracted from the code by using PhpDocumentor. The file phpdoc.xml contains the required configuration for PhpDocumentor. To generate the API documentation, just move into the root directory of this package and run PhpDocumentor from this location.

Note:

Since all the PHP code is documented using PhpDoc annotations, you should be able to exploit the auto completion feature from your favourite IDE. If you are using Eclipse, NetBeans or PhPStorm, you probably won’t need to consult the generated API documentation.

Since the API is quite simple and intuitive, the present document presents examples of code. These examples are located under the directory examples.

Examples

All examples are based on the tree which structure is represented by the figure below.

Image of the tree

treeObject.php: this example shows how to create a tree using the tree builder. It creates an instance of class \dbeurive\Tree\Tree.

treeArray.php: this example illustrates the procedure to create a tree (an object of class \dbeurive\Tree\Tree) from an array of imbricated arrays.

treeObjectTraverse.php: this example shows how to traverse a tree that is an object of class \dbeurive\Tree\Tree.

treeArrayTravserse.php: this example shows how to traverse a tree represented by an array of imbricated arrays.

search.php: this example shows how to search for a node's data within the entire tree.

treeObjectToArray.php: this example shows how to convert a tree defined as an object of class \dbeurive\Tree\Tree into the "array representation" (an array of imbricated arrays).

treeToDot.php: this example shows how to produce a "GRAPHVIZ" representation of a tree.

treeObjectTraverseSerialize.php: this example shows how to use objects (instead of scalars) as nodes' data. We create a tree that contains objects. Then we traverse the tree and we serialise all nodes. Please note that the tree is represented by an object of class \dbeurive\Tree\Tree.

treeArrayTravserseSerialize.php: this example shows how to use objects (instead of scalars) as nodes' data. We create a tree that contains objects. Then we traverse the tree and we serialise all nodes. Please note that the tree is represented by an array of imbricated arrays.

treeIndex.php: this example shows how to create an index that references all nodes within the tree. Indexes are generated from the nodes' data. Please note that, in this example, we assume that all nodes have a unique data value.

treeIndexMulti.php: this example shows how to create an index that references all nodes within the tree. Indexes are generated from the nodes' data. Please note that, in this example, we assume that multiple nodes may have the same data value.

treeSelect.php: this example shows how to select nodes based on their data's values.

treeSearch.php: this example shows how search for nodes with given values.

nodes.php: this example illustrates various operations on nodes.


All versions of tree with dependencies

PHP Build Version
Package Version
No informations.
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 dbeurive/tree contains the following files

Loading the files please wait ....