Set the original source.

@param mixed       $original
@param null|string $adapter

@throws \InvalidArgumentException On error

@return Uploader A new cloned copy with the source and adapter configured
8867
public function with($original, $adapter = null)
    {
        $new = clone $this;
        $new->original = $original;
        $new->adapter = $adapter;

        if ($new->adapter === null) {
            foreach ($new->adapters as $each) {
                if ($each::check($original)) {
                    $new->adapter = $each;
                    break;
                }
            }
        }

        if ($new->adapter === null || !class_exists($new->adapter)) {
            throw new \InvalidArgumentException('No valid adapter found');
        }

        return $new;
    }
914074
public function save($fileName, AdapterInterface $adapter, $overwrite = false)
	{
		$fs = new Filesystem($adapter);

		if ($overwrite == true)
		{
			$fs->put($fileName, $this->get());
		}
		else
		{
			$fs->write($fileName, $this->get());
		}

		return $this;
	}
699011
public function setUploader($uploader, $info = null)
    {
        self::$xml['uploader'] = VideoItemUploaderTags::setUploader($this->validator, $uploader, $info);
    }
711792
protected function setCurlProxyOptions($adapter)
    {
        $adapter->setCurlOption(CURLOPT_PROXY, $this->proxyConfig['proxy_host']);
        if (!empty($this->proxyConfig['proxy_port'])) {
            $adapter
                ->setCurlOption(CURLOPT_PROXYPORT, $this->proxyConfig['proxy_port']);
        }
    }
498609
public function setAdapter(\Desarrolla2\Cache\Adapter\AdapterInterface $adapter)
    {
        return $this->_instance->setAdapter($adapter);
    }
161623
public function setSortOrder($sortorder)
    {
        $sortorder = strtolower($sortorder);
        if (!in_array($sortorder, array('asc', 'desc'))) {
            throw new \InvalidArgumentException(sprintf('Provided argument "%s" is invalid. Use (asc | desc)', $sortorder));
        }

        $this->sortorder = $sortorder;

        return $this;
    }
422455
public function setSender($sender)
    {
        if (is_string($sender)) {
            $sender = new Sender($sender);
        } elseif (!$sender instanceof Sender) {
            throw new \InvalidArgumentException('$sender must be a string or an instance of Sender.');
        }

        $this->sender = $sender;

        return $this;
    }
1075575
public function prependAdapter(AdapterInterface $adapter)
    {
        $priority = self::DEFAULT_PRIORITY;

        if (!$this->adapters->isEmpty()) {
            $extractedNodes = $this->adapters->toArray(PriorityQueue::EXTR_PRIORITY);

            rsort($extractedNodes, SORT_NUMERIC);

            $priority = $extractedNodes[0] + 1;
        }

        $this->adapters->insert($adapter, $priority);

        return $this;
    }
824745
protected function createFilesystem(AdapterInterface $adapter, array $config)
    {
        $cache = Arr::pull($config, 'cache');

        $config = Arr::only($config, ['visibility', 'disable_asserts', 'url']);

        if ($cache) {
            $adapter = new CachedAdapter($adapter, $this->createCacheStore($cache));
        }

        return new Filesystem($adapter, count($config) > 0 ? $config : null);
    }
382884
public function createIdentity(AdapterInterface $adapter): IdentityInterface
    {
        $map = new $this->attribute_map_class($adapter->getAttributeMap(), $this->logger);
        $this->identity = new $this->identity_class($adapter, $map, $this->logger);

        return $this->identity;
    }
26795
public static function fromAdaptee($adaptee)
    {
        $type = is_object($adaptee) ? get_class($adaptee) . ' objects' : gettype($adaptee) . ' variables';

        return new self("There is no container adapter registered to handle {$type}.");
    }
1008989
public function addTarget($adapter)
    {
        $this->addDefinition(
            'targets',
            is_callable($adapter) ? new CallbackAdapter(null, $adapter) : $adapter
        );

        return $this;
    }
1022968
public function setGetter($getter)
    {
        if (!is_bool($getter)) {
            throw new \InvalidArgumentException('The attribute getter on the class Attribute has to be boolean (' . gettype($getter) . ('object' === gettype($getter) ? ' ' . get_class($getter) : '') . ' given).');
        }

        $this->getter = $getter;

        return $this;
    }
621113
public function injectAdapter(AdapterInterface $adapter, ?string $name = null): self
    {
        if (null === $name) {
            $name = get_class($adapter);
        }

        $this->logger->debug('inject auth adapter ['.$name.'] of type ['.get_class($adapter).']', [
            'category' => get_class($this),
        ]);

        if ($this->hasAdapter($name)) {
            throw new Exception\AdapterNotUnique('auth adapter '.$name.' is already registered');
        }

        $this->adapter[$name] = $adapter;

        return $this;
    }
765937
public static function setAdapter($adapter)
    {
        switch (strtolower($adapter)) {
            case 'sodium':
                $adapterSet = '\Zest\Encryption\Adapter\SodiumEncryption';
                break;
            case 'openssl':
                $adapterSet = '\Zest\Encryption\Adapter\OpenSslEncryption';
                break;
            default:
                $adapterSet = '\Zest\Encryption\Adapter\OpenSslEncryption';
                break;
        }
        $key = __config()->encryption->key;
        self::$adapter = new $adapterSet($key);

        return __CLASS__;
    }
310365
public function setProvider($provider, array $arguments = array())
    {
        if (null === $provider || '' === $provider) {
            throw new \InvalidArgumentException('A property faker provider name can not be empty');
        }

        $this->provider = $provider;

        if (!empty($arguments)) {
            $this->arguments = $arguments;
        }
    }
1268499
public function setSourceOriginal(string $source_original) {
        if(!$this->setModified('source_original', $source_original)->isModified()) {
            return $this;
        }
		$this->source_original = $source_original;
		return $this;
    }