Skip to content

Instantly share code, notes, and snippets.

@scottdavis
Created January 25, 2010 14:12
Show Gist options
  • Save scottdavis/285886 to your computer and use it in GitHub Desktop.
Save scottdavis/285886 to your computer and use it in GitHub Desktop.
<?php
$this->packages->to_xml(array('lamda' => function($key, $value){
switch($key) {
case 'user_id':
return array("username", User::find($value)->username);
break;
default:
return array($key, $value);
break;
}
}, 'append' => array('channel' => function($obj) {
return $obj->user->pear_farm_url();
})));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment