Extend blueprint with another blueprint.

@param BlueprintForm|array $extends
@param bool $append
@return $this
552243
public function extend($extends, $append = false)
    {
        if ($extends instanceof self) {
            $extends = $extends->toArray();
        }

        if ($append) {
            $a = $this->items;
            $b = $extends;
        } else {
            $a = $extends;
            $b = $this->items;
        }

        $this->items = $this->deepMerge($a, $b);

        return $this;
    }
560235
public function extend() 
    {
        // supply type validation
        $type = $this->getAttribute("supplyType");
        $validTypes = [self::TYPE_INCREASE, self::TYPE_DECREASE];
        if (! $type || ! in_array($type, $validTypes)) {
            $type = self::TYPE_INCREASE;
            $this->setAttribute("supplyType", $type);
        }

        // always positive delta
        $delta = abs($this->delta ?: 0);

        return [
            "mosaicId" => $this->mosaicId()->toDTO(),
            "supplyType" => $type,
            "delta" => $delta,
            // transaction type specialization
            "type" => TransactionType::MOSAIC_SUPPLY_CHANGE,
        ];
    }
1153090
public function addRecipient($recipients, $prepend = false)
    {
        if (!$prepend) {
            $this->appendRecipient($recipients);
        } else {
            $this->prependRecipient($recipients);
        }

        return $this;
    }
423334
def add(self, name, extends, **kwargs):
        
        f = extends
        self._push(name=name,
                   module_=f.__module__,
                   class_=f.__name__,
                   method_=f.__name__,
                   is_class_=False,
                   **kwargs)
498335
function extend(schema) {
	var schemas, extendedSchema;

	if (schema.extends) {
		schemas = [{}, schema].concat(schema.extends);
		extendedSchema = _.defaultsDeep.apply(null, schemas);
		extendedSchema = _.omit(extendedSchema, ['extends']);
		return extendedSchema;
	}
	return schema;
}
512994
public function paging($paging = true, $append = true)
    {
        if ($paging === false && $append === false) {
            //TODO: exception
        }

        $this->paging = $paging;
        $this->append = $append;

        return $this;
    }
223706
protected function expandParams(Blueprint $blueprint): Blueprint
    {
        $class = $blueprint->getClassName();
        $params = $blueprint->getParams();

        $variadicParams = [];
        foreach ($this->reflector->getParams($class) as $reflectParam) {
            $paramName = $reflectParam->getName();
            if ($reflectParam->isVariadic() && is_array($params[$paramName])) {
                $variadicParams = array_merge($variadicParams, $params[$paramName]);
                unset($params[$paramName]);
                break; // There can only be one
            }

            if ($params[$paramName] instanceof DefaultValueParam) {
                $params[$paramName] = $params[$paramName]->getValue();
            }
        }

        return $blueprint->replaceParams(array_merge($params, array_values($variadicParams)));
    }
1209235
public function withExtensions(Extensions $extensions): self
    {
        $obj = clone $this;
        $obj->_extensions = $extensions;
        return $obj;
    }
852327
public function setExtensions(array $extensions, $merge = true)
    {
        if ($merge) {
            $extensions = array_unique(array_merge(
                $this->_extensions,
                $extensions
            ));
        }
        $this->_extensions = $extensions;

        return $this;
    }
1331403
public function withExtensions(Ext\Extension ...$exts): Extensions
    {
        $obj = clone $this;
        foreach ($exts as $ext) {
            $obj->_extensions[$ext->oid()] = $ext;
        }
        return $obj;
    }
321852
public static function extendDistinct()
    {
        $merged = [];

        foreach (func_get_args() as $array) {
            foreach ($array as $key => $value) {
                if (is_array($value) && static::has($merged, $key) && is_array($merged[$key])) {
                    if (static::isAssoc($value) && static::isAssoc($merged[$key])) {
                        $merged[$key] = static::extendDistinct($merged[$key], $value);

                        continue;
                    }
                }

                $merged[$key] = $value;
            }
        }

        return $merged;
    }
881093
public function add(array $updates, $class, $append = true)
    {
        $commandClass = $this->getCommandClass('update.add');
        $this->command = new $commandClass($updates, $class, $append);

        return $this->command;
    }
1137083
private function appendInheritanceNode(Inheritance $inheritance, \DOMNode $parentNode)
    {
        $inheritanceNode = $parentNode->appendChild($this->document->createElement('inheritance'));
        $inheritanceNode->setAttribute('key', $inheritance->getKey());
        $inheritanceNode->setAttribute('class', $inheritance->getClassName());

        if ($ancestor = $inheritance->getAncestor()) {
            $inheritanceNode->setAttribute('extends', $ancestor);
        }
    }
1330128
public FileFilterBuilder addExtensions(Iterable<String> extensions) {
        for (String extension : extensions) {
            // Ultimately, SuffixFileFilter will be used, and the "." needs to be explicit.
            this.extensions.add(extension.startsWith(".") ? extension : "." + extension);
        }
        return this;
    }
49706
public function removeAppends($appends)
	{
		if (is_string($appends)) {
			$appends = func_get_args();
		}

		$this->appends = array_diff($this->appends, $appends);

		return $this;
	}
1052005
public X509Extension add(X509Extension extension) {
	if (extension == null) {
	    throw new IllegalArgumentException(i18n
                                               .getMessage("extensionNull"));
	}
	return (X509Extension)this.extensions.put(extension.getOid(),
						  extension);
    }
663010
public function extend($id, callable $extender)
    {
        if (!$this->has($id)) {
            throw new NotFoundException('Alias (' . $id . ') is not being managed by the container');
        }

        $this->extenders[$id][] = $extender;
    }