function(name, obj, after) {
  if (typeof after === 'string' && !inject(after)()) {
    caramel.once('register:' + after, function() {
      register(name, obj);
    });
    return;
  }

  var path = name.split('.');
  var ref = container;

  for (var i = 0; i < path.length - 1; i++) {
    if (!ref[path[i]]) {
      ref = ref[path[i]] = {};
    } else {
      ref = ref[path[i]];
    }
  }

  if (!ref[path[path.length - 1]]) {
    ref[path[path.length - 1]] = { cream : obj };
  } else {
    ref[path[path.length - 1]].cream = obj;
  }

  createCream(name, obj);
  caramel.emit('register:' + name);
}
function(name, obj, after) {
  if (typeof after === 'string' && !inject(after)()) {
    caramel.once('register:' + after, function() {
      register(name, obj);
    });
    return;
  }

  var path = name.split('.');
  var ref = container;

  for (var i = 0; i < path.length - 1; i++) {
    if (!ref[path[i]]) {
      ref = ref[path[i]] = {};
    } else {
      ref = ref[path[i]];
    }
  }

  if (!ref[path[path.length - 1]]) {
    ref[path[path.length - 1]] = { cream : obj };
  } else {
    ref[path[path.length - 1]].cream = obj;
  }

  createCream(name, obj);
  caramel.emit('register:' + name);
}
function ( name , obj , after ) { if ( typeof after === 'string' && ! inject ( after ) ( ) ) { caramel . once ( 'register:' + after , function ( ) { register ( name , obj ) ; } ) ; return ; } var path = name . split ( '.' ) ; var ref = container ; for ( var i = 0 ; i < path . length - 1 ; i ++ ) { if ( ! ref [ path [ i ] ] ) { ref = ref [ path [ i ] ] = { } ; } else { ref = ref [ path [ i ] ] ; } } if ( ! ref [ path [ path . length - 1 ] ] ) { ref [ path [ path . length - 1 ] ] = { cream : obj } ; } else { ref [ path [ path . length - 1 ] ] . cream = obj ; } createCream ( name , obj ) ; caramel . emit ( 'register:' + name ) ; }
DI register method

@name register
@function
@access public
@param {String} name namespace register object into
@param {Cream} obj
@param {String} after namespace register object after
DI register method