JQuery Style PHP Closure in version 5.3
Submitted by jimthunderbird on Wed, 03/03/2010 - 05:36.#!/usr/bin/php
<?php
class Document {
private $body_closure = NULL;
protected $reflection = NULL;
public function __construct($function)
{
if ( ! $function instanceOf Closure)
throw new InvalidArgumentException();
$this->body_closure = $function;
$this->reflection = new ReflectionFunction($function);
}
public function __invoke()
{
$args = func_get_args();
return $this->reflection->invokeArgs($args);
}
public function getClosure()
{
return $this->body_closure;
The object oriented javascript style php class definition for PHP 5.3
Submitted by jimthunderbird on Tue, 03/02/2010 - 10:21.#!/usr/bin/php
<?php
/**
* Mootools-style php scripting at version 5.3
* Hash-based class definition, avoiding namespaces
*/
#################################################################################
# Start Core
#################################################################################
class P{
private static $map;
private static $current_class;
public function mclass($class_name, $class_hash){
$class_name = self::clean_class_name($class_name);
self::$map["$class_name"] = $class_hash;
#a hook after the class has been made
Breadth-first graph search using an iterative map-reduce algorithm
Submitted by jimthunderbird on Sun, 01/31/2010 - 17:59.- Login to post comments
HTML5 drag and drop in Firefox 3.5
Submitted by jimthunderbird on Mon, 01/25/2010 - 21:28.- Login to post comments
Why rsync is a lousy deployment tool
Submitted by jimthunderbird on Sat, 01/23/2010 - 23:13.- Login to post comments
Unison -- a file-synchronization tool for Unix and Windows
Submitted by jimthunderbird on Sat, 01/23/2010 - 11:09.- Login to post comments
Google AJAX Language API
Submitted by jimthunderbird on Wed, 01/20/2010 - 15:10.- Login to post comments
Eclim --- Bring Eclipse functionalities to vim
Submitted by jimthunderbird on Fri, 01/15/2010 - 22:43.- Login to post comments