Tell the service to encode an asset it's source

@param  string $source A full URL for the source asset
@param  string $preset The key to the preset function
@return void
198897
public function encode($source, $preset)
    {
        // Tell the Zencoder SDK to create a job
        try {
            $outputs = $this->outputsConfig($preset);
            $job = $this->sdk()->jobs->create([
                'input' => $source,
                'output' => $outputs,
            ]);

            // Store the response from the SDK
            $this->model->storeJob($job->id, $this->outputsToHash($job->outputs));

        // Report an error with the encode
        } catch (Services_Zencoder_Exception $e) {
            $this->model->status('error', implode(' ', $this->zencoderArray($e->getErrors())));
        } catch (Exception $e) {
            $this->model->status('error', $e->getMessage());
        }
    }
235843
public function matchProperty($source)
    {
        preg_match_all($this->propertyPreg, $source, $match, PREG_SET_ORDER);
        foreach ($this->resultOffsets as $key => $offset) {
            foreach ($match as $m) {
                if (isset($m[$offset]) && !empty($m[$offset])) {
                    $this->matchResults[$key][strtolower($m[$offset])] = true;
                }
            }
        }
    }
1055600
public function setSource($source)
    {
        $controller = Controller::curr();
        $code = $controller->data()->Code;
        $updated = [];
        if (is_array($source) && !empty($source)) {
            foreach ($source as $key => $val) {
                $updated[ProductPage::getGeneratedValue($code, $this->getName(), $key, 'value')] = $val;
            }
        }
        $this->source = $updated;

        return $this;
    }
220229
protected function addPKCS7Padding($source){
        $source = trim($source);
        $block = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);

        $pad = $block - (strlen($source) % $block);
        if ($pad <= $block) {
            $char = chr($pad);
            $source .= str_repeat($char, $pad);
        }
        return $source;
    }
534788
public function setSource(string $source)
    {
        if (!file_exists($source)) {
            throw new Server500(new \ArrayObject(array("explain" =>
                "The source $source for the ZIP archive does not exist.",
                "Please check the source validity.")));
        }
        $this->source = $source;
    }
1089683
public function prepareSource(&$source = null, $reference = false)
    {
        if ($source) {
            $this->data = $source;
        } else {
            $this->data = &$_COOKIE;
        }
    }
890980
protected function encodeSourceToBase64($source)
    {
        $pathInfo = pathinfo($source);
        $imageExtension = $pathInfo[self::EXTENSION];

        if (!in_array($imageExtension, $this->supportedExtensions)) {
            throw new PhantomPdfException(
                sprintf('Image extension: %s is not supported.', $imageExtension)
            );
        }

        $sourceBase64encoded = base64_encode(
            file_get_contents($source)
        );

        return sprintf(
            'data:image/%s;base64,%s',
            $imageExtension,
            $sourceBase64encoded
        );
    }
507310
public function setOriginal(string $source): void
    {
        $this->xliff->setOriginal($source);
        $this->markChanged();
    }
724564
public function assetPath($source, array $options = [])
    {
        $source = (string) $source;
        if (! $source) {
            return ""; // Short circuit
        }

        if (preg_match(static::URI_REGEXP, $source)) {
            return $source;// Short circuit
        }

        $assetPrefix = array_get($options, 'prefix', $this->assetsPrefix);
        if (is_callable($assetPrefix) && is_object($assetPrefix)) {
            $assetPrefix = $assetPrefix();
        }

        $assetHost = array_get($options, 'host');
        if (is_callable($assetHost) && is_object($assetHost)) {
            $assetHost = $assetHost();
        }

        $assetPort = $this->assetPort;
        if (is_callable($assetPort) && is_object($assetPort)) {
            $assetPort = $assetPort();
        }

        $protocol = Request::secure() ? "https://" : "http://";
        if (App::environment() !== (getenv('ASSETS_ENV') ?: 'production')) {
            $assetHost = $assetHost ?: $protocol.$this->getHostname().":".$assetPort;
            $assetLocation = $assetHost.$assetPrefix;
        } else {
            $assetLocation = $assetHost.$assetPrefix;
            $manifest = static::manifest();
        }
        // TODO: Sanitize/purify $source var
        $sourceName = $source;
        if (isset($manifest) && $manifest->getAssets()) {
            $sourceName = array_get($manifest->getAssets(), $sourceName, $sourceName);
        }

        $assetPath = "$assetLocation/$sourceName";
        if (File::exists(public_path().$assetPath) || preg_match(static::URI_REGEXP, $assetPath)) {
            return $assetPath;
        } else {
            // TODO: The root path of the Laravel application is hardcoded here, it might be a problem
            return '/'.preg_replace('/^\//', '', $source);
        }
    }
84687
public function setSource($source)
    {
        if ($source instanceof DataList) {
            $this->setDataClass($source->dataClass());
        }
        
        return parent::setSource($source);
    }
302892
public function setSource($source)
    {
        if (!$source instanceof Collection) {
            $source = collect($source);
        }

        $this->source = $source;
        return $this;
    }
1160318
public function set_source($value){
		if (is_string($value))
			$value = trim($value);
		$this->source = $value;
	}
1312188
public function setSource( $source )
	{
		if( !file_exists( $source ) )
			throw new InvalidArgumentException( 'Image File "'.$source.'" is not existing.' );
		$size = @getimagesize( $source );
		if( !$size )
			throw new Exception( 'Source File "'.$source.'" is not a supported Image.' );
		$this->size		= $size;
		$this->source	= $source;
	}
835517
public function init()
    {
        parent::init();

        $this->publishOptions['beforeCopy'] = function ($from, $to) {
            return preg_match('%(/|\\\\)(fonts|css)%', $from);
        };

        $this->sourcePath = __DIR__ . "/assets";
    }
1137604
private function copyProps ( self $source ) {
        foreach ($source as $keyName => $data) {
            if (substr( $keyName, 0, 2 ) !== '__') {
                $this->$keyName = $data;
            }
        }
    }
105008
public function setSource($source): void
    {
        if (!$source instanceof Db\Query\Select) {
            throw new Grid\GridException('Source of `SelectSource` should be `Db\\Query\\Select` object');
        }
        parent::setSource($source);
    }
485
public function set_html($source, $from_file = false)
    {
        if ($from_file && file_exists($source)) {
            $this->html = file_get_contents($source);
        } else {
            $this->html = $source;
        }

        $this->_converted = false;
    }