Adds a mixin (and applies its properties) to this object.

@param   MixinMetadata   $mixin
@return  self
326764
public function addMixin(MixinMetadata $mixin)
    {
        if (isset($this->mixins[$mixin->name])) {
            return $this;
        }

        $this->applyMixinProperties($mixin);
        $this->mixins[$mixin->name] = $mixin;
        return $this;
    }
693710
public function addMetadataDirs(array $namespacePrefixToDirMap): self
    {
        foreach ($namespacePrefixToDirMap as $prefix => $dir) {
            $this->addMetadataDir($dir, $prefix);
        }

        return $this;
    }
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);
    }
1124730
public function addMissingProperty(MetaEntityInterface $metaEntity, RelationMetaPropertyInterface $property)
    {
        $inversedBy = $property->getInversedBy();
        $mappedBy = $property->getMappedBy();
        if ($newPropertyName = $mappedBy ?: $inversedBy) {
            $inversedType = MetaPropertyFactory::getInversedType($property->getOrmType());
            /** @var RelationMetaPropertyInterface $newProperty */
            $newProperty = $this->metaPropertyFactory->createMetaProperty(
                $metaEntity,
                $inversedType,
                $newPropertyName
            );
            $newProperty->setTargetEntity($property->getMetaEntity());
            if ($inversedBy) {
                $newProperty->setMappedBy($property->getName());
            } else {
                $newProperty->setInversedBy($property->getName());
            }
        }
    }
126564
function() {
		if(this.init) { this.init.apply(this, arguments) }
		for (var i=0, mixin; mixin = mixins[i]; i++) {
			if (mixin.init) { mixin.init.apply(this) }
		}
	}
626551
function withMeta($data)
    {
        $meta = $this->_assertMetaData($data);

        $new = clone $this;
        $new->meta = array_merge($this->meta, $meta);
        return $new;
    }
458578
public function setMixins($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Mixin::class);
        $this->mixins = $arr;

        return $this;
    }
633292
public function addMetaSet($metaSetId)
    {
        if ($metaSetId && !in_array($metaSetId, $this->metasets)) {
            $this->metasets[] = $metaSetId;
        }

        return $this;
    }
550781
protected function _mixin(ObjectIdentifier $identifier, $mixer)
    {
        if ($mixer instanceof ObjectMixable)
        {
            $mixins = $identifier->getMixins();

            foreach ($mixins as $key => $value)
            {
                if (is_numeric($key)) {
                    $mixer->mixin($value);
                } else {
                    $mixer->mixin($key, $value);
                }
            }
        }

        return $mixer;
    }
753077
private function mergeMixins(array $toAdd)
    {
        foreach ($toAdd as $mixin) {
            if (!isset($this->mixins[$mixin->name])) {
                $this->mixins[$mixin->name] = $mixin;
            }
        }
        return $this;
    }
722886
function(target, mixins) {
    mixins.forEach(function(mixin) {
      if (mixin) {
        for (var prop in mixin) {
          target[prop] = mixin[prop];
        }
      }
    });
  }
1342746
public function mixin($ruleName, $validator, $message = '')
	{
        if ( ! empty($message))
        {
            $this->messages[$ruleName] = $message;
        }
        Validator::extend($ruleName, $validator);

		return $this;
	}
246150
def mixin_class(target, cls):
        """"""

        for name, field in getmembers(cls):
            Mixin.mixin(target, field, name)
1301194
protected function setPropertyMetadata($key, PropertyMetadataInterface $metadata)
    {
        $metadata->merge($this);
        $this->properties[$key] = $metadata;

        return $this;
    }
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;
  }
}
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));
            }
        }
    }
300489
public function addPlugin(Plugin $plugin): Builder
    {
        $this->plugins[]          = $plugin;
        $this->httpClientModified = true;

        return $this;
    }