@param array|null $value

@throws \DreamFactory\Core\Exceptions\BadRequestException
503080
public function setConfigAttribute($value)
    {
        $this->config = (array)$value;
        $localConfig = $this->getAttributeFromArray('config');
        $localConfig = ($localConfig ? json_decode($localConfig, true) : []);
        // take the type information and get the config_handler class
        // set the config giving the service id and new config
        if (!empty($serviceCfg = $this->getConfigHandler())) {
            // go ahead and save the config here, otherwise we don't have key yet
            $localConfig = $serviceCfg::setConfig($this->getKey(), $this->config, $localConfig);
            if ($this->isJsonCastable('config') && !is_null($localConfig)) {
                $localConfig = $this->castAttributeAsJson('config', $localConfig);
            }
            $this->attributes['config'] = $localConfig;

        } else {
            if (null !== $typeInfo = ServiceManager::getServiceType($this->type)) {
                if ($subscription = $typeInfo->subscriptionRequired()) {
                    throw new BadRequestException("Provisioning Failed. '$subscription' subscription required for this service type.");
                }
            }
        }
    }
706900
public function set($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $configKey => $configValue) {
                $this->setSingleItem($configKey, $configValue);
            }
        } else {
            $this->setSingleItem($key, $value);
        }
    }
1114444
public function setIfnsCode(\AgentSIB\Diadoc\Api\Proto\StringValue $value = null)
    {
        $this->IfnsCode = $value;
    }
411115
protected function setUrlAttr($value = null)
    {
        if (!is_null($value)) {
            $this->url = $value;
            $this->pdfUrl = $value . '.pdf';
        }
    }
524247
protected function isNotNull($value)
    {
        if (is_null($value) === true || empty($value) === true) {
            throw new ExceptionFactory('DataType', [$value, 'string']);
        }

        return true;
    }
552954
public function set($value = null, $junk = null)
    {
        if (!is_bool($value)) {
            throw new Exception(['Field\CheckBox::set() needs value to be a boolean', 'value'=>$value]);
        }

        parent::set($value);
    }
1325154
function setAction( $value, $params=FALSE ) {
    $this->action['value']  = $value;
    $this->action['params'] = $this->_setParams( $params );
  }
549842
public function setValue(string $value = null) : Element
    {
        if ($value && !preg_match("@^(https?|ftp)://@", $value)) {
            $value = "http://$value";
        }
        return parent::setValue($value);
    }
1043305
private function checkValue($value){


        $check = $this->getPossibleValueArray();
        if (!is_array($check) || empty($check)){
            $this->handleError("No Check Array defined (getPossibleValueArray())",  EnumException::NoEnumsDefined);
        }
        if (!in_array($value, $check)){
            $this->handleError("Invalid Value", EnumException::Invalidvalue);
        }
    }
909052
public function setValue($value)
    {
        if (is_array($value)) {
            if (1 === count($value)) {
                $this->value = $value[0];
            } else {
                throw new \InvalidArgumentException('The argument must either be a string or an array with only one child');
            }
        } else {
            $this->value = $value;
        }
    }
436787
public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->_args[count($this->_args)] = $value;
        } else {
            if (is_int($offset)) {
                $this->_args[$offset] = $value;
            } else {
                throw new \Exception('Cannot set offset \''.$offset.'\' of IndexedArray.');
            }
        }
    }
981861
public function setPost($spec, $value = null)
    {
        if ((null === $value) && !is_array($spec)) {
            throw new \Exception('Invalid value passed to setPost(); must be either array of values or key/value pair');
        }

        if ((null === $value) && is_array($spec)) {
            foreach ($spec as $key => $value) {
                $this->setPost($key, $value);
            }
            return $this;
        }

        $_POST[(string) $spec] = $value;
        return $this;
    }
48314
public function set($key, $value = null)
    {
        $keys = is_array($key) ? $key : [$key => $value];

        foreach ($keys as $key => $value) {
            Arr::set($this->items, $key, $value);
        }
    }
11088
public function transform($value)
    {
        if (is_array($value)) {
            $value = $value[FileType::UPLOAD_FIELDNAME];
        }

        try {
            return array(
                FileType::UPLOAD_FIELDNAME => new File(call_user_func($this->callback, $value, $this->property))
            );
        } catch (FileNotFoundException $e) {
            return null;
        }
    }
161264
public function setDefaultValue($value = null)
    {
        if (! $this->value) {
            if ($value = $value ?: config("fields.values.{$this->key}")) {
                foreach ((array) $value as $locale => $translation) {
                    $locale = is_string($locale) ? $locale : $this->getDefaultLocale();
                    $this->setTranslation('value', $translation, $locale);
                    $this->addTranslated($locale);
                }
            }
        }
    }
415537
public function wrap($value = null)
    {
        $exceptionFactory   = new ExceptionFactory($this->presenter);
        $wrappedObject      = new WrappedObject($value, $this->presenter);
        $caller             = new Caller($wrappedObject, $this->example, $this->dispatcher, $exceptionFactory, $this);
        $arrayAccess        = new SubjectWithArrayAccess($caller, $this->presenter, $this->dispatcher);
        $expectationFactory = new ExpectationFactory($this->example, $this->dispatcher, $this->matchers);

        return new Subject(
            $value, $this, $wrappedObject, $caller, $arrayAccess, $expectationFactory
        );
    }
859880
protected function resolve($value = null): void
    {
        if (~$this->state & AbstractPromise::PENDING) {
            return;
        }
        
        if ($value instanceof Promise) {
            $value->when(function (?\Throwable $e, $v = null): void {
                if ($e === null) {
                    $this->resolve($v);
                } else {
                    $this->fail($e);
                }
            });
            
            return;
        }
        
        $callbacks = $this->result;
        
        $this->state ^= AbstractPromise::PENDING | AbstractPromise::SUCCEEDED;
        $this->result = $value;
        
        if ($this instanceof Cancellable) {
            $this->context->unregisterCancellation($this);
        }
        
        if ($callbacks) {
            if (\is_array($callbacks)) {
                foreach ($callbacks as $callback) {
                    try {
                        $callback(null, $value);
                    } catch (\Throwable $e) {
                        $this->context->handleError($e);
                    }
                }
            } else {
                try {
                    $callbacks(null, $value);
                } catch (\Throwable $e) {
                    $this->context->handleError($e);
                }
            }
        }
    }