Download the PHP package ghopper/nested_set without Composer
On this page you can find all versions of the php package ghopper/nested_set. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download ghopper/nested_set
More information about ghopper/nested_set
Files in ghopper/nested_set
Download ghopper/nested_set
More information about ghopper/nested_set
Files in ghopper/nested_set
Vendor ghopper
Package nested_set
Short Description Tiny class which provides basic functions for manipulation with 'Nested Set' database tree.
License MIT
Package nested_set
Short Description Tiny class which provides basic functions for manipulation with 'Nested Set' database tree.
License MIT
Keywords nested set
Please rate this library. Is it a good library?
Informations about the package nested_set
nested_set
Tiny class which provides basic functions for manipulating with "Nested Set" database tree.
Preparing
Create the database table
Setup PDO-connection. The class sets PDO attribute PDO::ATTR_ERRMODE equal to PDO::ERRMODE_EXCEPTION if it isn't set yet
Configuring
Usage
create the object
add new node
Pass array with extra fields' values
print the tree
Returns array with 'depth' values.
Look at the examples folder for more information.
Available methods
- getTree($parent_id) - return all descendants of $parent_id node
- addChild($parent_id, $values) - add a new node to $parent_id which contains $values
- addRootChild($values) - add new node to the root element
- moveTree($cur_parent_id, $new_parent_id) - move the whole tree to a new parent
- deleteTree($node_id) - delete $node_id with all descendants
- deleteNode($node_id) - delete $node_id only and shift the descendants to level up
Requirements
- database has to transactions support
- database has to locks support
All versions of nested_set with dependencies
PHP Build Version
Package Version
No informations.
The package ghopper/nested_set contains the following files
Loading the files please wait ....