README.textile

Aesthete.php

“One whose pursuit and admiration of beauty is regarded as excessive or affected.”
— thefreedictionary.com

Aesthete.php is an experimental library that lets you create arrays in a more “aesthetic” manner.
Returned arrays descend from the ArrayObject SPL class. Which is nice because it lets you add some methods, such as each().

Usage

First, require it:

require_once('aesthete.php');

Now, lets say i want to create an array of string. Simple. In Ruby i would do it like this:

%w( my array of words )

But PHP’s array() syntax is kinda verbose for such a simple array:

array('my', 'array', 'of', 'words')

With Aesthete.php, you can create an array of words like this instead:

w(' my array of words ')

Then you can loop into it like this. For FREE! :

w(' this is an array of words ')->each(function($w){
echo "{$w}<br/>";
});