2017 © Pedro Peláez
 

library tree

Tree utility for handling data stored in flat data structures like databases and more.

image

oliva/tree

Tree utility for handling data stored in flat data structures like databases and more.

  • Tuesday, February 27, 2018
  • by dakujem
  • Repository
  • 2 Watchers
  • 4 Stars
  • 1,730 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 27 Versions
  • 10 % Grown

The README.md

>, (*1)

📢, (*2)

It's been a long time since the dawn of this library. It still runs on modern PHP, but it's far from optimal., (*3)

See a modern reimplementation of this library here: 👉 dakujem/oliva, (*4)

Oliva Tree

PHP from Packagist Tests Coverage Status, (*5)

Utility for handling tree data structures., (*6)

>, (*7)

💿 composer require oliva/tree, (*8)

📖 documentation, (*9)

Oliva Tree is a powerful yet simple to use utility for handling tree data structures in PHP., (*10)

Useful for handling tree data stored in database or for performing search and filter operations on arbitrary tree structures., (*11)

Why use Oliva Tree?

  • data manipulation
  • write components like menus, tree views, grids, data lists, etc. with ease.
  • it's documented
  • battle and unit tested

What can you do with Oliva Tree?

  • build tree structures from arbitrary flat data with support for
    • materialized path data model
    • recursive trees (parent - id) (adjacency list data model, self-joined tables)
    • build trees from JSON strings
  • build trees using a fluent interface
  • seamlessly wrap objects with Node class and keep using them as before
  • enhance functionality of data already in tree structures
  • find nodes, breadth-first or depth-first
  • filter nodes by any condition
  • compare trees, nodes, sub-trees
  • provide means for easy tree structure manipulation
  • transform tree structures (back) to flat data, in breadth-first or depth-first manner

Documentation

For more in-depth information, use cases and other examples, see the documentation section., (*12)

Installation

composer require oliva/tree, (*13)

Older versions of Oliva Tree run on PHP 5.4 and up and also PHP 7.0 and up. Versions since 1.3 support PHP 7.4+ and PHP 8+ (including PHP 8.2 and PHP 8.3)., (*14)

Changelog

Notable changes only., (*15)

1.4 - PHP 8.1+ supported - some return type-hints added, (*16)

1.3 - PHP 8.0 support added - PHP >= 7.4 required - updated to a simple permissive license (Unlicense), (*17)

1.2.3 - updated licensing to enable multi-licensing, i.e. one can now use any of GPL, MIT or BSD license, see license.md for more information, (*18)

Missing features

I never added these..., (*19)

  • prunning (condition- and depth-based)
  • node moving mechanism / helpers
  • tree writers - alter the node's data to reflect current tree structure (prepare for storage) - a counterpart to tree builders
  • unite and document exception codes
  • support for nested sets data model

On the second thought, most of these things are outside the scope of this library anyway., (*20)

Notes

Great thank's to folks in Via Aurea for providing valuable support, motivation and real-world testing., (*21)

🎉, (*22)

I finally found a reason to reimplement the idea of this tool for building and managing trees., (*23)

See the modern reimplementation here: 👉 dakujem/oliva, (*24)

The Versions

27/02 2018

dev-feat/modifier

dev-feat/modifier

Tree utility for handling data stored in flat data structures like databases and more.

  Sources   Download

MIT BSD-2-Clause GPL-2.0-or-later GPL-3.0-or-later

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

by Andrej Rypák

utility tree utilities data structures

27/02 2018

dev-master

9999999-dev

Tree utility for handling data stored in flat data structures like databases and more.

  Sources   Download

MIT BSD-2-Clause GNU GPL V3 GPL-2.0-or-later GPL-3.0-or-later

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

by Andrej Rypák

utility tree utilities data structures

27/02 2018

1.2.3

1.2.3.0

Tree utility for handling data stored in flat data structures like databases and more.

  Sources   Download

MIT BSD-2-Clause GPL-2.0-or-later GPL-3.0-or-later

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

by Andrej Rypák

utility tree utilities data structures

26/07 2016

1.2.2

1.2.2.0

Tree utility for handling data stored in flat data structures like databases and more.

  Sources   Download

GNU GPL V3

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

by Andrej Rypák

utility tree utilities data structures

26/07 2016

dev-1.1-patches

dev-1.1-patches

Tree utility for handling data stored in flat data structures like databases and more.

  Sources   Download

GNU GPL V3

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

utility tree utilities data structures

26/07 2016

1.1.3

1.1.3.0

Tree utility for handling data stored in flat data structures like databases and more.

  Sources   Download

GNU GPL V3

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

utility tree utilities data structures

17/03 2016

1.2.1

1.2.1.0

Tree utility for handling data stored in flat data structures like databases and more.

  Sources   Download

GNU GPL V3

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

by Andrej Rypák

utility tree utilities data structures

29/02 2016

1.2

1.2.0.0

Tree utility for handling data stored in flat data structures like databases and more.

  Sources   Download

GNU GPL V3

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

utility tree utilities data structures

02/11 2015

1.2.0-rc2

1.2.0.0-RC2

Tree utility for handling data stored in flat data structures like databases and more.

  Sources   Download

GNU GPL V3

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

utility tree utilities data structures

02/11 2015

1.1.2

1.1.2.0

Tree utility for handling data stored in flat data structures like databases and more.

  Sources   Download

GNU GPL V3

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

utility tree utilities data structures

21/10 2015

1.1.1

1.1.1.0

Tree utility for handling data stored in flat data structures like databases and more.

  Sources   Download

GNU GPL V3

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

utility tree utilities data structures

20/10 2015

1.2.0-rc1

1.2.0.0-RC1

Tree utility for handling data stored in flat data structures like databases and more.

  Sources   Download

GNU GPL V3

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

utility tree utilities data structures

18/10 2015

1.1.0

1.1.0.0

Tree utility for handling data stored in flat data structures like databases and more.

  Sources   Download

GNU GPL V3

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

utility tree utilities data structures

01/10 2015

1.0.2

1.0.2.0

  Sources   Download

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

01/09 2015

1.0.1

1.0.1.0

  Sources   Download

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

20/08 2015

1.0.0

1.0.0.0

  Sources   Download

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

06/08 2015

0.6.0

0.6.0.0

  Sources   Download

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

06/08 2015

0.5.1

0.5.1.0

  Sources   Download

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

05/08 2015

0.5.0

0.5.0.0

  Sources   Download

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

05/08 2015

0.4.0

0.4.0.0

  Sources   Download

The Requires

  • php >=5.6.0

 

The Development Requires

by Andrej Rypák

08/07 2015

0.3.0

0.3.0.0

  Sources   Download

The Requires

  • php >=5.6.0

 

by Andrej Rypák

08/07 2015

0.2.0

0.2.0.0

  Sources   Download

The Requires

  • php >=5.6.0

 

by Andrej Rypák

07/07 2015

0.1.4

0.1.4.0

  Sources   Download

The Requires

 

by Andrej Rypák

30/06 2015

0.1.3

0.1.3.0

  Sources   Download

The Requires

 

by Andrej Rypák

30/06 2015

0.1.2

0.1.2.0

  Sources   Download

The Requires

 

by Andrej Rypák

30/06 2015

0.1.1

0.1.1.0

  Sources   Download

The Requires

 

by Andrej Rypák

30/06 2015

0.1.0

0.1.0.0

  Sources   Download

The Requires

 

by Andrej Rypák