Perform the actual mixin of all registered mixins with an object

@param	mixed	An object that implements AnObjectServiceable, AnServiceIdentifier object
or valid identifier string
@param   object  A AnObject instance to used as the mixer
@return void
542305
protected static function _mixin($identifier, $instance)
    {
        if (isset(self::$_mixins[$identifier]) && $instance instanceof AnObject) {
            $mixins = self::$_mixins[$identifier];

            foreach ($mixins as $mixin) {
                $instance->mixin($mixin, self::getConfig($mixin));
            }
        }
    }
639775
public void ojbAdd(Object anObject)
    {
        DSetEntry entry = prepareEntry(anObject);
        entry.setPosition(elements.size());
        elements.add(entry);
    }
1334089
function mixin(rework, declarations, mixins) {
  for (var i = 0; i < declarations.length; ++i) {
    var decl = declarations[i];
    if ('comment' == decl.type) continue;

    var key = decl.property;
    var val = decl.value;
    var fn = mixins[key];
    if (!fn) continue;

    // invoke mixin
    var ret = fn.call(rework, val);

    // apply properties
    for (var key in ret) {
      var val = ret[key];
      if (Array.isArray(val)) {
        val.forEach(function(val){
          declarations.splice(i++, 0, {
            type: 'declaration',
            property: key,
            value: val
          });
        });
      } else {
        declarations.splice(i++, 0, {
          type: 'declaration',
          property: key,
          value: val
        });
      }
    }

    // remove original
    declarations.splice(i--, 1);
  }
}
985376
public function addMethods($object, array $method_aliases = [])
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException('$object must be an object');
        }
        foreach ($method_aliases as $alias => $method) {
            $callable = [$object, $method];
            if (!is_callable($callable)) {
                $class = get_class($object);
                throw new \InvalidArgumentException("Method {$method} not found in class {$class}");
            }
            if (is_int($alias)) {
                $alias = $method;
            }
            $this->plugins[$alias] = $callable;
        }
    }
48672
function mixin$1(name, mix, g) {
  // Unnamed global
  if (isObject(name)) {
    mixin$1(("__" + (mixins_id++) + "__"), name, true);
    return
  }

  var store = g ? globals : mixins;

  // Getter
  if (!mix) {
    if (isUndefined(store[name]))
      { throw new Error(("Unregistered mixin: " + name)) }

    return store[name]
  }

  // Setter
  store[name] = isFunction(mix) ?
    extend(mix.prototype, store[name] || {}) && mix :
    extend(store[name] || {}, mix);
}
275338
public function performMappingOnObject(DataObject $object)
    {
        //By default, we already have our data mapped in the object (hopefully properly)
        //But we do need to convert things that may need converting
        foreach ($this->mapping as $field => $variable) {
            $modifier = false;
            $newField = $variable;

            if (strpos($variable, ':') !== false) {
                list($newField, $modifier) = explode(':', $variable);
                $object->$newField = $this->getMappedValue($object, $newField, $variable);
            }
        }
    }
325750
function mixin (target, source, options) {
        options = options || {};
        options.skip = options.skip || [];
        for (let key in source) {
            if (typeof source[key] === 'function' && key.indexOf('_') !== 0 && options.skip.indexOf(key) === -1) {
                target[key] = source[key].bind(source);
            }
        }
    }
967741
public function mixin(AnMixinInterface $object, $config = array())
    {
        if ($object instanceof AnControllerBehaviorAbstract) {
            foreach ($object->getMethods() as $method) {
                if (substr($method, 0, 7) == '_action') {
                    $this->_actions[] = strtolower(substr($method, 7));
                }
            }

            $this->_actions = array_unique(array_merge($this->_actions, array_keys($this->_action_map)));
        }

        return parent::mixin($object, $config);
    }
991235
public static function reset($object)
	{
		if (!($object instanceof ServiceOptions)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\ServiceOptions.');
		}
		$object->deprecated = NULL;
		$object->uninterpretedOption = NULL;
	}
206586
function mix (target, object) {
    for (var key in object) {
        target[key] = object[key];
    }
    return target;
}
910860
function mixin(obj) {
  for (var key in Emitter.prototype) {
    obj[key] = Emitter.prototype[key];
  }
  return obj;
}
1118255
function composeClass(base, mixin) {
  if (typeof mixin === 'function') {
    // Mixin function
    return mixin(base);
  } else {
    // Mixin object
    class Subclass extends base {}
    copyOwnProperties(mixin, Subclass.prototype, NON_MIXABLE_OBJECT_PROPERTIES);
    return Subclass;
  }
}
1093955
function mixin(obj, props) {
    var argi = 1,
        argc = arguments.length,
        source, property, value;

    if (!obj) {
        obj = {};
    }

    while (argi < argc) {
        source = arguments[argi];
        for (property in source) {
            if (source.hasOwnProperty(property)) {
                value = source[property];
                if (obj[property] !== value) {
                    obj[property] = value;
                }
            }
        }
        argi += 1;
    }
    return obj; // Object
}
52880
public static function reset($object)
	{
		if (!($object instanceof EnumOptions)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\EnumOptions.');
		}
		$object->allowAlias = NULL;
		$object->deprecated = NULL;
		$object->uninterpretedOption = NULL;
	}
1020754
function Mixin_setInstanceKey(hostClass, method, instanceKey) {
    check(hostClass, Function);
    check(instanceKey, Match.IdentifierString);

    var prop = INSTANCE_PROPERTIES_MAP,
        instanceKeys = hostClass[prop] = hostClass[prop] || {};

    if (instanceKeys[method.name])
        throw new Error('Mixin: instance property for method with name '
            + method.name + ' is already set');

    instanceKeys[method.name] = instanceKey;
}
1366407
public function onMixin(ObjectMixable $mixer)
    {
        parent::onMixin($mixer);

        //Create and mixin the permission if it's doesn't exist yet
        if (!$this->_permission instanceof ControllerPermissionInterface)
        {
            $permission = $this->_permission;

            if (!$permission || (is_string($permission) && strpos($permission, '.') === false))
            {
                $identifier = $mixer->getIdentifier()->toArray();
                $identifier['path'] = array('controller', 'permission');

                if ($permission) {
                    $identifier['name'] = $permission;
                }

                $permission = $this->getIdentifier($identifier);
            }

            if (!$permission instanceof ObjectIdentifierInterface) {
                $permission = $this->getIdentifier($permission);
            }

            $this->_permission = $mixer->mixin($permission);
        }
    }
829638
public function onMixin(KObjectMixable $mixer)
    {
        parent::onMixin($mixer);

        $mixer->getState()
            ->insert('sort', 'cmd')
            ->insert('direction', 'word', 'asc');
    }