/*
(non-PHPdoc) @see \Aztech\LayerBuilder::buildLayer()
344682
public function buildLayer(Layer $nextLayer, array $arguments)
    {
        $transformerClass = isset($arguments['class']) ? $arguments['class'] : '';
        $isList = isset($arguments['list']) && $arguments['list'] == true;

        if (trim($transformerClass) == '') {
            return $nextLayer;
        }

        return new FractalRenderingLayer($this->container, $this->manager, $nextLayer, $transformerClass, $isList);
    }
290015
public function build(): SetEffectivePropertyValueForNodeRequest
	{
		$instance = new SetEffectivePropertyValueForNodeRequest();
		if ($this->nodeId === null) {
			throw new BuilderException('Property [nodeId] is required.');
		}
		$instance->nodeId = $this->nodeId;
		if ($this->propertyName === null) {
			throw new BuilderException('Property [propertyName] is required.');
		}
		$instance->propertyName = $this->propertyName;
		if ($this->value === null) {
			throw new BuilderException('Property [value] is required.');
		}
		$instance->value = $this->value;
		return $instance;
	}
1226328
function buildLayers(layersObject) {
	// Array of layers
	var layers = [];

	if (layersObject) {
		// Iterate over all layers
		for (var int = 0; int < layersObject.length; int++) {
			// One layer
			var singleLayer = layersObject[int];

			// Build a new layer object
			var layer = {};

			// Determine name from GetCapabilities document
			if (singleLayer.Name) {
				if (singleLayer.Name[0]) {
					layer.Name = singleLayer.Name[0];
				}
			}

			// Determine title from GetCapabilities document
			if (singleLayer.Title) {
				if (singleLayer.Title[0]) {
					layer.Title = singleLayer.Title[0];
				}
			}

			// Determine abstract from GetCapabilities document
			if (singleLayer.Abstract) {
				if (singleLayer.Abstract[0]) {
					layer.Abstract = singleLayer.Abstract[0];
				}
			}

			layer.Layer = buildLayers(singleLayer.Layer);

			// Determine layer name if not available
			layer.Name = determineLayerName(layer);

			// Determine layer title if not available
			if (!(layer.Title)) {
				layer.Title = layer.Name;
			}

			// Add layer to the array
			layers.push(layer);
		}
	}

	return layers;
}
821110
public function build() : ContainerInterface
    {
        try{
            // call bootstrap code
            $startup = $this->bootstrap;
            
            $startup($this->container);
        }
        catch(\Throwable $e)
        {
            throw new ContainerBuildingException($e);
        }
        return $this->container;
    }
341709
public function layer($layers) {
        if ($layers instanceof Middleware) {
            $layers = $layers->toArray();
        }
        if ($layers instanceof MiddlewareInterface) {
            $layers = [$layers];
        }
        if (!is_array($layers)) {
            throw new InvalidArgumentException(get_class($layers) . " is not a valid middleware.");
        }
        $this->layers = array_merge($this->layers, $layers);
    }
48047
public function build()
    {
        $stream = new Stream('php://temp', 'wb+');


        $stream->write(json_encode(new MessageDecorator($this->getMessage())));

        return $this->getHttpMessage()
            ->withAddedHeader('Content-Type', 'application/json')
            ->withBody($stream);
    }
222422
private function build() {
        $this->getObject()->addUse('Bullhorn\FastRest\Api\Models\ApiInterface as ModelInterface');
        $this->getObject()->setName(ucfirst(strtolower($this->getClassName())) . 'Controller');
        $this->getObject()->setNamespace($this->getConfiguration()->getRootNamespace() . '\Controllers');
        $this->getObject()->setExtends('ControllerBase');
        $this->buildFactory();
        $this->buildIndexAction();
        $this->buildShowAction();
        $this->buildCreateAction();
        $this->buildUpdateAction();
        $this->buildDeleteAction();
        $this->buildDocumentation();
    }
997106
public function addBuild(Build $build)
    {
        $this->getBuilds();
        $build->setRepositoryId($this->getId());
        $this->builds[$build->getId()] = $build;
    }
1040545
public function createMapper()
    {
        if ($this->mapperElement !== null) {
            throw new BuildException(
                'Cannot define more than one mapper',
                $this->getLocation()
            );
        }
        $this->mapperElement = new Mapper($this->project);

        return $this->mapperElement;
    }
1209045
function build(): string
    {
        if ($this->host !== null && $this->preferredFormat === static::ABSOLUTE) {
            return $this->buildAbsolute();
        } else {
            return $this->buildRelative();
        }
    }
65169
public function build()
    {
        $this->modifyPreBuild();
        if (!$this->builder->build()) {
            throw new BuilderPatternException('Unable to build');
        }
        $this->modifyPostBuild();

        return $this->renderer->render($this->builder);
    }
12433
public function build(): SetOuterHTMLRequest
	{
		$instance = new SetOuterHTMLRequest();
		if ($this->nodeId === null) {
			throw new BuilderException('Property [nodeId] is required.');
		}
		$instance->nodeId = $this->nodeId;
		if ($this->outerHTML === null) {
			throw new BuilderException('Property [outerHTML] is required.');
		}
		$instance->outerHTML = $this->outerHTML;
		return $instance;
	}
1279503
public function build() : ContainerInterface
    {
        try{
            foreach($this->modules as $module)
            {
                $module->install($this->container);
            }
        }
        catch(\Throwable $e)
        {
            throw new ContainerBuildingException($e);
        }
        return $this->container;
    }
416509
protected function copyToBuildDir()
    {
        $this->buildInPlace = true;
        $buildDir = $this->buildDir;
        if ($this->app->shouldMoveToRoot()) {
            $buildDir .= '/' . $this->documentRoot;
        }
        if (!empty($this->settings['clone'])) {
            $this->cloneToBuildDir($buildDir);
        } elseif ($this->copy) {
            $this->fsHelper->copyAll($this->appRoot, $buildDir, $this->ignoredFiles, true);
        } else {
            $this->fsHelper->symlink($this->appRoot, $buildDir);
        }

        return $buildDir;
    }
243148
public function build(): MakeSnapshotRequest
	{
		$instance = new MakeSnapshotRequest();
		if ($this->layerId === null) {
			throw new BuilderException('Property [layerId] is required.');
		}
		$instance->layerId = $this->layerId;
		return $instance;
	}
206515
function build(Container $container)
    {
        if (! $container instanceof Container )
            throw new \Exception(sprintf(
                'Container must instanceof "ContainerManager", you given "%s".'
                , (is_object($container)) ? get_class($container) : gettype($container)
            ));

        // ORDER IS MANDATORY

        // Namespace:
        $this->_buildNamespace($container);

        // Interfaces:
        $this->_buildImplementation($container);

        // Initializer:
        // maybe used while Creating Services
        $this->_buildInitializer($container);

        // Nested:
        $this->_buildNested($container);

        // Aliases:
        $this->_buildExtend($container);

        // Service:
        $this->_buildService($container);
    }
391391
protected function build()
    {
        $operation = $this->buildOperation('ListProfiles');

        $merchantID = $this->document->createElement('merchantID', $this->merchantId);
        $operation->appendChild($merchantID);

        if ($this->customerId) {
            $xmlMPayTid = $this->document->createElement('customerID', $this->customerId);
            $operation->appendChild($xmlMPayTid);
        }

        if ($this->expiredBy) {
            $xmlMPayTid = $this->document->createElement('expiredBy', $this->expiredBy);
            $operation->appendChild($xmlMPayTid);
        }

        if ($this->begin) {
            $xmlMPayTid = $this->document->createElement('begin', $this->begin);
            $operation->appendChild($xmlMPayTid);
        }

        if ($this->size) {
            $xmlMPayTid = $this->document->createElement('size', $this->size);
            $operation->appendChild($xmlMPayTid);
        }
    }