2017 © Pedro Peláez
 

library tree

Tree data structure for PHP

image

nayjest/tree

Tree data structure for PHP

  • Wednesday, June 15, 2016
  • by nayjest
  • Repository
  • 2 Watchers
  • 7 Stars
  • 8,754 Installations
  • PHP
  • 6 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 27 Versions
  • 9 % Grown

The README.md

Tree

Tree data structure for PHP, (*1)

Build Status Scrutinizer Code Quality Latest Stable Version, (*2)

Requirements

  • php 5.4+

Installation

The recommended way of installing the component is through Composer., (*3)

Run following command:, (*4)

composer require nayjest/tree

Overview

Tree Nodes

Nodes are basic tree elements. This package represents tree nodes as instances of Nayjest\Tree\Node. Since nodes here don't holds any functionality beyond the scope of organizing into a trees, the package is designed for extending its components functionality in different ways: - Extend base classes (Node, ReadonlyNode) - Provide your own implementations of ParentNodeInterface and ChildNodeInterface - Use traits (NodeTrait, ChildNodeTrait, ParentNodeTrait, ReadonlyNodeTrait) and interfaces if you can't use node classes as base classes, (*5)

Node Collections

Each node stores its children inside instance of Nayjest\Tree\NodeCollection., (*6)

This package uses nayjest/collections for working with collections., (*7)

Class Nayjest\Tree\NodeCollection provides consistency of parent-child node relations., (*8)

It means that if you will add node to collection, this node will be automatically attached to parent node associated with collection, if you will remove node from collection, node will be detached from parent node., (*9)

Trees

Class Nayjest\Tree\Tree allows to: - organize trees with named nodes (nodes itself don't store information about its name, class Tree works with any objects that implements NodeInterface) - build tree based on hierarchy configuration (multidimantional array containing only node names) and registry of nodes(associative array where keys are names and values are nodes) - manipulate named nodes in convenient way (Tree API) - protect tree structure from modifying via Node API methods to avoid inconsistency of node relations., (*10)

Nayjest\Tree\Utils

This class is a facade for helper functions., (*11)

Testing

Run following command:, (*12)

phpunit

License

© 2014—2016 Vitalii Stepanenko, (*13)

Licensed under the MIT License., (*14)

Please see License File for more information., (*15)

The Versions

15/06 2016

dev-master

9999999-dev

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

27/01 2016

v3.2.1

3.2.1.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

20/01 2016

v3.0.0

3.0.0.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

09/12 2015

v2.0.0

2.0.0.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

09/12 2015

dev-dev

dev-dev

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

16/11 2015

v2.0.0-beta2

2.0.0.0-beta2

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

13/11 2015

v2.0.0-beta1

2.0.0.0-beta1

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

11/11 2015

v2.0.0-beta1.1

2.0.0.0-beta1.1

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

11/11 2015

v2.0.0-beta3

2.0.0.0-beta3

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

09/11 2015

v1.5.2

1.5.2.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

03/11 2015

v1.5.1

1.5.1.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

03/11 2015

v1.5.0

1.5.0.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

29/10 2015

v1.4.1

1.4.1.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

28/10 2015

v1.4.0

1.4.0.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

27/10 2015

v1.3.2

1.3.2.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

23/10 2015

v1.3.1

1.3.1.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

23/10 2015

v1.3.0

1.3.0.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

30/09 2015

v1.2.1

1.2.1.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

30/09 2015

v1.2.0

1.2.0.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

09/09 2015

v1.1.1

1.1.1.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

09/09 2015

v1.1.0

1.1.0.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

09/09 2015

v1.0.0

1.0.0.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

03/09 2015

v0.3.1

0.3.1.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

31/07 2015

v0.3.0

0.3.0.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

29/07 2015

v0.2.1

0.2.1.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

29/07 2015

v0.1.1

0.1.1.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees

21/07 2015

v0.1.0

0.1.0.0

Tree data structure for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Vitalii [Nayjest] Stepanenko

tree data structure hierarchy trees