Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 2.1
#1

[eluser]Adam Griffiths[/eluser]
Hey guys,

I was just wondering when you think CodeIgniter 2.1 will be released and what types of extras do you expect to see in this overlooked, never announced release?

I hope inject_beef() get's incorporated into the Benchmarking class because that function wins so much.

Yeah, so anyway.

Discuss.


Wink
#2

[eluser]BrianDHall[/eluser]
That's a great idea! You think if enough people ask for it, maybe it'd make it into 2.0?

http://ellislab.com/forums/viewthread/133546/
#3

[eluser]n0xie[/eluser]
[quote author="Adam Griffiths" date="1256761965"]
I hope inject_beef() get's incorporated into the Benchmarking class because that function wins so much.
[/quote]
inject_beef() is the most badass benchmarking tool ever known to man. Period.

Which reminds me, I should probably add it to our repositories.
#4

[eluser]Tom Schlick[/eluser]
it needs an add_cheese() function as well because everyone knows there is nothing better with beef than a good piece of american cheese
#5

[eluser]Adam Griffiths[/eluser]
[quote author="trs21219" date="1256762722"]it needs an add_cheese() function as well because everyone knows there is nothing better with beef than a good piece of american cheese[/quote]

American cheese is not real cheese!!

I need to find the code for inject_beef() and play with it.
#6

[eluser]Adam Griffiths[/eluser]
That didn't take long at all. Courtesy of Phil Sturgeon.

Code:
/**
* Inject some beef into your day
*
* @return void
* @access public
* @see pre_echo()
*/
function inject_beef()
{
        $check = '';
        list($msec, $sec) = explode(' ',microtime());
        $BAM = ((double) $sec) + ((double) $msec);
        // Record time (note we ignore time spent IN this function)
        global $SPEED_CHECK_LAST_HIT, $SPEED_CHECK_TOTAL;
        if ($SPEED_CHECK_LAST_HIT) {
                $elapsed = $BAM - $SPEED_CHECK_LAST_HIT;
                $SPEED_CHECK_TOTAL += $elapsed;
                $check = sprintf('%.5f / %.5f',$elapsed,$SPEED_CHECK_TOTAL);
        }

        list($msec, $sec) = explode(' ',microtime());
        // initialize
        $SPEED_CHECK_LAST_HIT = ((double) $sec) + ((double) $msec);

        $len = strlen($check);
        if (!$len) return;

        static $i;
        $i++;
        $string = '
                .--,       '.str_repeat(' ',$len).'       ,--.
                l_/ \     _'.str_repeat('_',$len).'_     / \_J
                 \   `-./__'.str_repeat('_',$len).'__\.-\'   /
                  `..---'.str_repeat('-',$len).'----..\'
                        `-/    '.str_repeat(' ',$len).'     \'
                          |    '.$check.'     |
                           `.__'.str_repeat('_',$len).'___.\'
        ';
        pre_echo($string);

}//end inject_beef()

Bow down to the holyness of the beef!



xD
#7

[eluser]Tom Schlick[/eluser]
[quote author="Adam Griffiths" date="1256763194"][quote author="trs21219" date="1256762722"]it needs an add_cheese() function as well because everyone knows there is nothing better with beef than a good piece of american cheese[/quote]

American cheese is not real cheese!!

I need to find the code for inject_beef() and play with it.[/quote]

it tastes good = real cheese

Smile
#8

[eluser]BrianDHall[/eluser]
[quote author="Adam Griffiths" date="1256763194"][quote author="trs21219" date="1256762722"]it needs an add_cheese() function as well because everyone knows there is nothing better with beef than a good piece of american cheese[/quote]

American cheese is not real cheese!!

I need to find the code for inject_beef() and play with it.[/quote]

You just haven't looked into the American_Cheese class source code. It is just an extention of the Milk class with __pastureize() functions and a bit of magic that encapsulates a pseudo-reference to an abstract Cheddar class.

It's either elegant or a horrible hack, depending on who you ask.
#9

[eluser]jdfwarrior[/eluser]
Phil is gritting his teeth preparing a strike. I'm staying out of this one Smile
#10

[eluser]n0xie[/eluser]
Can I haz Youtubez?




Theme © iAndrew 2016 - Forum software by © MyBB