src/Object/MediaObject.php
protected function _setDefaultParams($stub) {
		$source = $stub['embed-src'];
		$flashvars = (isset($stub['flashvars'])) ? $stub['flashvars'] : null;
		$count = count($this->_match);

		for ($i = 1; $i <= $count; $i++) {
			$source = str_ireplace('$' . $i, $this->_match[$i - 1], $source);
			$flashvars = str_ireplace('$' . $i, $this->_match[$i - 1], $flashvars);
		}

		$source = $this->_esc($source);
		$flashvars = $this->_esc($flashvars);

		$this->_objectParams = [
			'movie' => $source,
			'quality' => 'high',
			'allowFullScreen' => 'true',
			'allowScriptAccess' => 'always',
			'pluginspage' => 'http://www.macromedia.com/go/getflashplayer',
			'autoplay' => 'false',
			'autostart' => 'false',
			'flashvars' => $flashvars,
		];

		$this->_objectAttributes = [
			'type' => 'application/x-shockwave-flash',
			'data' => $source,
			'width' => $stub['embed-width'],
			'height' => $stub['embed-height'],
		];

		//separate iframe params and attributes
		$this->_iframeParams = [
			'wmode' => 'transparent'
		];
		$this->_iframeAttributes = [
			'type' => 'text/html',
			'width' => $stub['embed-width'],
			'height' => $stub['embed-height'],
			'frameborder' => '0',
			'allowfullscreen' => true
		];
	}
protected function _setDefaultParams($stub) {
		$source = $stub['embed-src'];
		$flashvars = (isset($stub['flashvars'])) ? $stub['flashvars'] : null;
		$count = count($this->_match);

		for ($i = 1; $i <= $count; $i++) {
			$source = str_ireplace('$' . $i, $this->_match[$i - 1], $source);
			$flashvars = str_ireplace('$' . $i, $this->_match[$i - 1], $flashvars);
		}

		$source = $this->_esc($source);
		$flashvars = $this->_esc($flashvars);

		$this->_objectParams = [
			'movie' => $source,
			'quality' => 'high',
			'allowFullScreen' => 'true',
			'allowScriptAccess' => 'always',
			'pluginspage' => 'http://www.macromedia.com/go/getflashplayer',
			'autoplay' => 'false',
			'autostart' => 'false',
			'flashvars' => $flashvars,
		];

		$this->_objectAttributes = [
			'type' => 'application/x-shockwave-flash',
			'data' => $source,
			'width' => $stub['embed-width'],
			'height' => $stub['embed-height'],
		];

		//separate iframe params and attributes
		$this->_iframeParams = [
			'wmode' => 'transparent'
		];
		$this->_iframeAttributes = [
			'type' => 'text/html',
			'width' => $stub['embed-width'],
			'height' => $stub['embed-height'],
			'frameborder' => '0',
			'allowfullscreen' => true
		];
	}
protected function _setDefaultParams ( $ stub ) { $ source = $ stub [ 'embed-src' ] ; $ flashvars = ( isset ( $ stub [ 'flashvars' ] ) ) ? $ stub [ 'flashvars' ] : null ; $ count = count ( $ this -> _match ) ; for ( $ i = 1 ; $ i <= $ count ; $ i ++ ) { $ source = str_ireplace ( '$' . $ i , $ this -> _match [ $ i - 1 ] , $ source ) ; $ flashvars = str_ireplace ( '$' . $ i , $ this -> _match [ $ i - 1 ] , $ flashvars ) ; } $ source = $ this -> _esc ( $ source ) ; $ flashvars = $ this -> _esc ( $ flashvars ) ; $ this -> _objectParams = [ 'movie' => $ source , 'quality' => 'high' , 'allowFullScreen' => 'true' , 'allowScriptAccess' => 'always' , 'pluginspage' => 'http://www.macromedia.com/go/getflashplayer' , 'autoplay' => 'false' , 'autostart' => 'false' , 'flashvars' => $ flashvars , ] ; $ this -> _objectAttributes = [ 'type' => 'application/x-shockwave-flash' , 'data' => $ source , 'width' => $ stub [ 'embed-width' ] , 'height' => $ stub [ 'embed-height' ] , ] ; //separate iframe params and attributes $ this -> _iframeParams = [ 'wmode' => 'transparent' ] ; $ this -> _iframeAttributes = [ 'type' => 'text/html' , 'width' => $ stub [ 'embed-width' ] , 'height' => $ stub [ 'embed-height' ] , 'frameborder' => '0' , 'allowfullscreen' => true ] ; }
Set the default params for the type of
stub we are working with

@param array $stub
@return void
Set the default params for the type of stub we are working with