public function getControlURL($description_url, $service = 'AVTransport')
	{
		$description = $this->getDescription($description_url);

		switch($service)
		{
			case 'AVTransport':
				$serviceType = 'urn:schemas-upnp-org:service:AVTransport:1';
				break;
			default:
				$serviceType = 'urn:schemas-upnp-org:service:AVTransport:1';
				break;
		}

		foreach($description['device']['serviceList']['service'] as $service)
		{
			if($service['serviceType'] == $serviceType)
			{
				$url = parse_url($description_url);
				return $url['scheme'].'://'.$url['host'].':'.$url['port'].$service['controlURL'];
			}
		}
	}
public function getControlURL($description_url, $service = 'AVTransport')
	{
		$description = $this->getDescription($description_url);

		switch($service)
		{
			case 'AVTransport':
				$serviceType = 'urn:schemas-upnp-org:service:AVTransport:1';
				break;
			default:
				$serviceType = 'urn:schemas-upnp-org:service:AVTransport:1';
				break;
		}

		foreach($description['device']['serviceList']['service'] as $service)
		{
			if($service['serviceType'] == $serviceType)
			{
				$url = parse_url($description_url);
				return $url['scheme'].'://'.$url['host'].':'.$url['port'].$service['controlURL'];
			}
		}
	}
public function getControlURL ( $ description_url , $ service = 'AVTransport' ) { $ description = $ this -> getDescription ( $ description_url ) ; switch ( $ service ) { case 'AVTransport' : $ serviceType = 'urn:schemas-upnp-org:service:AVTransport:1' ; break ; default : $ serviceType = 'urn:schemas-upnp-org:service:AVTransport:1' ; break ; } foreach ( $ description [ 'device' ] [ 'serviceList' ] [ 'service' ] as $ service ) { if ( $ service [ 'serviceType' ] == $ serviceType ) { $ url = parse_url ( $ description_url ) ; return $ url [ 'scheme' ] . '://' . $ url [ 'host' ] . ':' . $ url [ 'port' ] . $ service [ 'controlURL' ] ; } } }
this should be moved to the upnp and renderer model
this should be moved to the upnp and renderer model