Set a widget builder.

@param  object $builder The builder to create customized widget objects.
@throws InvalidArgumentException If the argument is not a widget builder.
@return DashboardInterface Chainable
558459
protected function setWidgetBuilder($builder)
    {
        if (is_object($builder)) {
            $this->widgetBuilder = $builder;
        } else {
            throw new InvalidArgumentException(
                sprintf(
                    'Argument must be a widget builder, %s given',
                    (is_object($builder) ? get_class($builder) : gettype($builder))
                )
            );
        }

        return $this;
    }
725759
public static function setDumper($dumper)
    {
        if (!$dumper instanceof interfaces\Dumper && !is_callable($dumper)) {
            throw new \InvalidArgumentException('Expected an instance of ['.interfaces\Dumper::class.'] or a callable, got ['.static::getTypeName($dumper).'] instead.');
        }

        static::$dumper = $dumper;
    }
281975
public function setPlatform($platform)
    {
        if (!in_array($platform, array(Software::PLATFORM_MAC, Software::PLATFORM_IOS), true)) {
            throw new \InvalidArgumentException(sprintf('Undefined software platform "%s".', $platform));
        }

        $this->platform = $platform;

        return $this;
    }
673730
protected function resolveWidget($type)
    {
        if ($this->formGroupFactory()->isResolvable($type)) {
            return $this->formGroupFactory()->create($type);
        } elseif ($this->widgetFactory()->isResolvable($type)) {
            return $this->widgetFactory()->create($type);
        } else {
            throw new InvalidArgumentException(sprintf(
                'Invalid widget UI. Must be an instance of %s',
                WidgetInterface::class
            ));
        }
    }
454853
public function createValueBuilder() {
		try {
			return new EagerValueBuilder(Url::build($this->value));
		} catch (\InvalidArgumentException $e) {
			throw new \InvalidArgumentException(null, 0, $e);
		}
	}
1202215
public static function setLoader($loader) {
    if (!$loader) {
      self::$_loader = NULL;
      return;
    }
    if ($loader instanceof FluentDOM\Loadable) {
      self::$_loader = $loader;
      return;
    }
    throw new FluentDOM\Exceptions\InvalidArgument(
      'loader', [Loadable::class]
    );
  }
686554
public function setForm($formOrContainer)
    {
        if (!$formOrContainer instanceof FormInterface
            && !$formOrContainer instanceof Container
        ) {
            throw new \InvalidArgumentException('Parameter must be either of type "\Zend\Form\FormInterface" or "\Core\Form\Container"');
        }

        $this->form = $formOrContainer;
        $this->generateCheckboxes();

        return $this;
    }
929318
public Datatype.Builder setBuilder(Type builder) {
    this.builder = Objects.requireNonNull(builder);
    _unsetProperties.remove(Property.BUILDER);
    return (Datatype.Builder) this;
  }
316109
public function addBuilder(BuilderInterface $builder)
    {
        parent::addBuilder($builder);

        $builder->setVariables(
            $this->mergeParameters(
                $this->getFromYaml('params', array()),
                $this->getFromYaml(sprintf('builders.%s.params', $builder->getYamlKey()), array())
            )
        );
        $builder->setColumnClass($this->getColumnClass());
    }
311853
public function setTarget($target)
    {
        if (!$target instanceof ModelInterface) {
            throw new Exception\InvalidArgumentException(sprintf(
                '"%s" works only with ModelInterface targets',
                __CLASS__
            ));
        }
        return parent::setTarget($target);
    }
218292
public function setType($type)
    {
        if ($type === null || $type === 'array') {
            $this->type = $type;

            return $this;
        }

        if ($this->isObjectNameValid($type) !== true) {
            throw new InvalidArgumentException('Parameter type is not valid.');
        }

        $this->type = $type;

        return $this;
    }
104648
public function addBuilder(BuilderInterface $builder)
    {
        $builder->setGenerator($this);
        $builder->setTemplateDirs($this->templateDirectories);
        $builder->setMustOverwriteIfExists($this->mustOverwriteIfExists);
        $builder->setVariables(array_merge($this->variables, $builder->getVariables()));

        $this->builders[] = $builder;

        return $builder;
    }
1201922
public function setProperty($property)
    {
        if ($property === null) {
            $this->property = $property;
            return $this;
        }

        if ($property instanceof PropertyInterface) {
            if (empty($property->ident())) {
                throw new InvalidArgumentException(
                    'Property must have an identifier.'
                );
            }

            $this->property = $property;
            return $this;
        }

        if (!is_string($property)) {
            throw new InvalidArgumentException(
                'Property must be a string.'
            );
        }

        if ($property === '') {
            throw new InvalidArgumentException(
                'Property can not be empty.'
            );
        }

        $this->property = $property;
        return $this;
    }
607542
public function serialyse(QueryBuilderInterface $Builder) {
        $this->parsedQuery = $this->getSerialyser()->setCriteriaList($Builder)->serialyse();
        return $this;
    }
777054
protected function createDriver($driver)
    {
        if (isset($this->initialDrivers[$driver])) {
            $provider = $this->initialDrivers[$driver];
            $provider = __NAMESPACE__.'\\Providers\\'.$provider.'Provider';

            return $this->buildProvider($provider, $this->formatConfig($this->config->get($driver)));
        }

        if (isset($this->customCreators[$driver])) {
            return $this->callCustomCreator($driver);
        }

        throw new InvalidArgumentException("Driver [$driver] not supported.");
    }
1082495
public function setBuilders($builders)
    {
        if (\is_array($builders)) {
            $builders = implode(',', $builders);
        }

        return $this->setQueryValue('Builders', $builders);
    }
232834
protected function initializeClassBuilder()
    {
        // build the mock class
        $builder = new ClassBuilder();
        if (class_exists($this->className)) {
            $builder->setExtends($this->className);
        } elseif (interface_exists($this->className)) {
            $builder->addInterface($this->className);
        } else {
            throw new \InvalidArgumentException("Class or interface " . $this->className . " does not exist");
        }

        // every mocked method goes through this invocation, which delegates
        // the retrieval of the correct Spec to this Instance's Ordering constraint.
        $resolveCall = function (Invocation $inv) {
            $spec = $this->ordering->nextSpec($inv->getMethodName());
            return $spec->doInvocation($inv);
        };

        return $this->addMethodsToBuilder($builder, $resolveCall);
    }