CodeIgniter Forums
Khaos Library - a work in progress ... - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Khaos Library - a work in progress ... (/thread-29685.html)

Khaos Library - a work in progress ... - El Forum - 04-18-2010

It has been a while since i've posted code but i havent completely dissapeared :p This isnt for everyone but i've been slowly porting my code to PHP 5.3, decoupling as much as possible whilst at the same time trying to make it all easier to use.

If you use PHP 5.3 or are looking to switch to 5.3 and would like to be able to do some of the following things then read on :-

// Edit an image
$this->khaos->image('sample.jpg')->fit(150, 150)->grayscale()->save('thumbnail.jpg');

// ACL
if ($this->acl->subject('neophyte')->hasAccess('articles', 'publish'))
    echo 'I have access';

// Akismet spam checking
if ($this->khaos->akismet($comment)->isSpam() == false)
    echo 'Good to go...';

// Basic CRUD
$user = $this->khaos->table('members')->find(1);
$user->email = '[email protected]';

// W3C validation
if ($this->khaos->w3html($url)->isValid())
    echo 'Url is valid ...';

A few screenshots here:
Screen Shots

The library makes heavy use of lazy loading and dependency injection which is what makes the above syntax style possible whilst keeping each individual component decoupled. This means you can keep your config options and gneral preferences outside of your application logic and you dont need to worry about performance as only exactly what you need is included when you need it.

For example in the above call to manipulate an image only when the call is made are the required classes instantiated, typically this would be the Image class and the GdDrawingPackage class (an instance of the GdDrawingPackage is injected into the Image instance)

From the screenshots you can see im also slowly working on a website to hold the documentation and other such things, this is still massively under construction so not that much works :p knowing this you can take a look at:

currently the main areas of interest will be documentation

and development

this post is as much about getting my idea out there as it is about getting feedback and possible ideas of what people would like it see based on what ive covered above.

Khaos Library - a work in progress ... - El Forum - 04-19-2010

[eluser]Dan Horrigan[/eluser]
You need to post this in Ignited Code, not here.

Khaos Library - a work in progress ... - El Forum - 06-01-2010

It is even possible to download this from somewhere?