Atilla Ördög

Personal site of Atilla Ördög AKA Gadratil

Category: PHP libraries

PHP Infinity tree

inline

I created a new library to handle infinite depth trees. I came up with the idea and the necessity because I always struggled to find a good library that can be simply loaded and used for infinite depth category trees, whole sub-node movements, easy node movements and such.

Also my main concern was how the tree gets stored in the database. I came up with a new idea based on MPTT, that stores the data in linear style, not using up much extra space and does not require recursive functionality in the storage. The tree itself is built up by a recursive function that builds the tree using N iterations, no overhead.

screenshot

So, the whole thing is quick, runs smoothly and deals with only the tree, nothing else.

You would ask: how can it be implemented?

This library simply adds a PHP interface to infinite depth trees. That’s it. But since it uses namespaces and replaceable adapters, it can be easily implemented anywhere.

So, let’s see the library:

A fully working example and the full documentation can be found at:

PHP Infinity Tree example and documentation

You can purchase the library here:

PHP Infinity Tree on Gadratil Programming

If you have any questions, just ask. Also, if you need implementation, I would gladly help you.

Advertisement

MySQLi DBHandler

I wrote a nice little library to handle simple database queries easily.

It uses mysqli, so you need to have it enabled on your server.

You can find everything inside a simple adapter needs. Perfect for small projects, especially if you do not want to use huge frameworks just to get some rows from a table.

To use it, just include it and initialize it with required DB connection data.

$db = new DBHandler(array(
'server' => 'localhost',
'user' => 'root',
'pass' => '',
'database' => 'myDB'
));

If you have any questions regarding this library, just comment or write me an email.

https://github.com/atillaordog/MySQLi-DBHandler

PHP Image Handler

I wrote about the image handling library I made. The small code snippet I wrote was poor and hard to understand.

I optimized the code and created example and documentation for my Image Handler PHP library.

Now it can be found on Gadratil Programming in the shop section.

Make your life easier using this library by adding it to any custom framework or CMS.

PHP Image Handler