Skip to content

Instantly share code, notes, and snippets.

@mrkurt
Created March 27, 2009 03:28
Show Gist options
  • Save mrkurt/86517 to your computer and use it in GitHub Desktop.
Save mrkurt/86517 to your computer and use it in GitHub Desktop.
class ResourceList extends ArrayObject{
private static $resolver = '';
private $resolved = false;
public static function set_resolver($method){
self::$resolver = explode('::', $method);
}
public function load(){
if($this->resolved !== false) return $this->resolved;
$this->resolved = array();
$method = self::$resolver;
foreach($this as $url){
$this->resolved[] = call_user_func($method, $url);
}
return $this->resolved;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment