Welcome Guest, Not a member yet? Register   Sign In
Khaos Library - a work in progress ...
#1

[eluser]Neophyte[/eluser]
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 :-

Code:
// 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]';
$user->save();

// 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:

http://khaos.neophyte.me.uk/

currently the main areas of interest will be documentation
http://khaos.neophyte.me.uk/documentation/node/193

and development
http://khaos.neophyte.me.uk/development/component/193

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.
#2

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

[eluser]Unknown[/eluser]
It is even possible to download this from somewhere?




Theme © iAndrew 2016 - Forum software by © MyBB