Set the param.
@param resource|string $video If string, sets the URL of the file. Pass a resource (e.g. fopen()) to upload the file.
3667
public function setVideoNote($video)
	{
		if (is_string($video)) {
			$this->videoNote = $video;
		} else if (is_resource($video)) {
			$this->addMultipart("video", $video);
			$this->videoNote = "attach://video";
		} else if ($video instanceof InputFile) {
			$this->addMultipart("video", $video->getFile());
			$this->videoNote = "attach://video";
		}
	}
1252275
public function setParam($key, $value)
    {
        if (null === $this->params) {
            $this->params = array();
        }

        $this->params[$key] = $value;
    }
589213
function setActionParameter( $parameterName, $parameterValue, $view = '' )
    {
        if ( $view == '' )
            $view = self::currentView();
        $this->ViewActionParameters[$view][$parameterName] = $parameterValue;
    }
681360
private function _processResourceParam($resource, $hasCurlFile)
    {
        if (get_resource_type($resource) !== 'stream') {
            throw new Error\Api(
                'Attempted to upload a resource that is not a stream'
            );
        }

        $metaData = stream_get_meta_data($resource);
        if ($metaData['wrapper_type'] !== 'plainfile') {
            throw new Error\Api(
                'Only plainfile resource streams are supported'
            );
        }

        if ($hasCurlFile) {
            // We don't have the filename or mimetype, but the API doesn't care
            return new \CURLFile($metaData['uri']);
        } else {
            return '@'.$metaData['uri'];
        }
    }
1164856
public function storeTemporaryVideo (Video $video)
    {
        return $this
            ->storeVideo(false, $video)
            ->withExpiresDate(new \DateTime('@' . (time() + 172800))); // @todo: change to use the JSON's created_at property.
    }
192586
public function setResource($resource) {
        $this->resource = $resource;
        $this->width = imagesx($resource);
        $this->height = imagesy($resource);
    }
396748
protected function startVideoStream(Video $video)
    {
        $this->curVideoStream = new Stream($video->getAudioStream());

        $this->init_file_stream_transfer(
            $video->getFileNameWithExtension('mp3'),
            // The ZIP format does not care about the file size.
            0
        );
    }
663502
public function setUrl($url, $url_title = null) {
		if ($url == '') throw new \InvalidArgumentException('url parameter is empty');
		$this->url = $url;
		$this->url_title = $url_title;
	}
1121120
public function addResource(AbstractResourceFile $resource) {
        if (!parent::offsetExists($resource->getMemberId())) {
            parent::offsetSet($resource->getMemberId(), $resource);
        }
    }
470914
protected function startVideoStream(Video $video)
    {
        $response = $video->getHttpResponse();

        $this->curVideoStream = $response->getBody();
        $contentLengthHeaders = $response->getHeader('Content-Length');

        $this->init_file_stream_transfer(
            $video->getFilename(),
            $contentLengthHeaders[0]
        );
    }
1076180
public function setParams( $key, $value = '' ) {
		//if (!isset($this->params)) $this->params = array();

		if ( is_array( $key ) ) {
			self::$RealParams = $key;
		} else {
			self::$RealParams[ $key ] = $value;
		}

	}
1160536
public function prepareMedia(Media $media)
    {
        if (null === $media->getUuid()) {
            $uuid = uniqid();
            $media->setUuid($uuid);
        }
        $video = new RemoteVideoHelper($media);
        $code = $video->getCode();
        //update thumbnail
        switch ($video->getType()) {
            case 'youtube':
                try {
                    if (@fopen('https://img.youtube.com/vi/'.$code.'/maxresdefault.jpg', 'r') === false) {
                        $video->setThumbnailUrl('https://img.youtube.com/vi/'.$code.'/0.jpg');
                    } else {
                        $video->setThumbnailUrl('https://img.youtube.com/vi/'.$code.'/maxresdefault.jpg');
                    }
                } catch (\Exception $e) {
                }

                break;
            case 'vimeo':
                try {
                    $xml = simplexml_load_file('https://vimeo.com/api/v2/video/' . $code . '.xml');
                    $video->setThumbnailUrl((string) $xml->video->thumbnail_large);
                } catch (\Exception $e) {
                }

                break;
            case 'dailymotion':
                try {
                    $json = json_decode(
                        file_get_contents('https://api.dailymotion.com/video/' . $code . '?fields=thumbnail_large_url')
                    );
                    $thumbnailUrl = $json->{'thumbnail_large_url'};
                    /* dirty hack to fix urls for imagine */
                    if (!$this->endsWith($thumbnailUrl, '.jpg') && !$this->endsWith($thumbnailUrl, '.png')) {
                        $thumbnailUrl = $thumbnailUrl . '&ext=.jpg';
                    }
                    $video->setThumbnailUrl($thumbnailUrl);
                } catch (\Exception $e) {
                }

                break;
        }
    }
948298
public function setParameters($parameters)
    {
        parent::setParameters($parameters);
        if ($parameters !== null) {
            for ($i = 0, $size = count($parameters); $i < $size; $i++) {
                $paramname = $parameters[$i]->getName();
                if (self::TYPE_KEY == strtolower($paramname)) {
                    $this->setType($parameters[$i]->getValue());
                } else {
                    $this->setError("Invalid parameter " . $paramname);
                }
            }
        }
    }
904984
public function setPosterUrl($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->poster_url !== $v) {
            $this->poster_url = $v;
            $this->modifiedColumns[VideoTableMap::COL_POSTER_URL] = true;
        }

        return $this;
    }
1312531
private function _set_params()
    {
        // Get values from request
        $params = \Request::route('params');
        $filepath = $this->config['abs_path'] . '/' . \Request::route('imagepath');
        
        // echo $params; exit;
        
        // If enforcing params, ensure it's a match
        if ($this->config['enforce_presets'] && !in_array($params, $this->config['presets'])) {
            abort(404);
        }
        
        $image = new Image();
        $image->configure(config('image'));
        if (function_exists('exif_read_data')) {
            $this->image = $image->make($filepath)->orientate();
        } else {
            $this->image = $image->make($filepath);
        }
        
        // The parameters are separated by hyphens
        $raw_params = explode('-', $params);
        
        // Update param values from passed values
        foreach ($raw_params as $raw_param) {
            $name = $raw_param[0];
            $value = substr($raw_param, 1, strlen($raw_param) - 1);
            
            if ($name == 'c') {
                $this->url_params[$name] = TRUE;
                
                // When croping, we must have a width and height to pass to imagecreatetruecolor method
                // Make width the height or vice versa if either is not passed
                if (empty($this->url_params['w'])) {
                    $this->url_params['w'] = $this->url_params['h'];
                }
                if (empty($this->url_params['h'])) {
                    $this->url_params['h'] = $this->url_params['w'];
                }
            } elseif (key_exists($name, $this->url_params)) {
                // Remaining expected params (w, h, q)
                $this->url_params[$name] = $value;
            } else {
                // Watermarks or invalid params
                $this->url_params[$raw_param] = $raw_param;
            }
        }
        
        // Do not scale up images
        if (! $this->config['scale_up']) {
            if ($this->url_params['w'] > $this->image->width()) {
                $this->url_params['w'] = $this->image->width();
            }
            if ($this->url_params['h'] > $this->image->height()) {
                $this->url_params['h'] = $this->image->height();
            }
        }
        
        // Must have at least a width or height
        if (empty($this->url_params['w']) and empty($this->url_params['h'])) {
            throw new HTTP_Exception_404('The requested URL :uri was not found on this server.', array(
                ':uri' => Request::$current->uri()
            ));
        }
        
        // Set the url filepath
        $this->source_file = $filepath;
    }
363968
public function setResourceObj ($name, &$resource)
	{
		
		// Set the resource
		
		$this->resources[$name]	=& $resource;
		
		// If the object variable exists 
		
		if (isset ($this->$name))
		{

			// Assign to object variable

			$this->$name	=& $this->resources[$name];
			
		}
		
	}
302858
public function setVideoId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->video_id !== $v) {
            $this->video_id = $v;
            $this->modifiedColumns[SkillVersionTableMap::COL_VIDEO_ID] = true;
        }

        return $this;
    }