Gets an existing video by it's key.

@param $videoKey: If no key was passed in when creating the video then the key will be the
source URL of the video
@return mixed: An existing video {@link Video}
@throws VideoClientException
483053
public function find($videoKey) {
        if(is_null($videoKey) || empty($videoKey)) {
            throw new VideoClientException("A key is needed to fnd a video");
        }

        try {
            // Request the video from the SafeStream REST API
            $videos = $this->get(sprintf("%s?key=%s", $this->apiResourcePath, $videoKey));

            return $videos[0];
        } catch (SafeStreamHttpException $e) {
            throw new VideoClientException($e);
        }
    }
40593
public function get(string $key)
    {
        if (!$this->has($key)) {
            throw new \RuntimeException('No item with name ' . $key . ' available');
        }

        return $this->items[$key];
    }
611243
public function get($key)
    {
        $getResult = $this->getValue($key);
        $unserialized = @unserialize($getResult);

        if (Util::hasInternalExpireTime($unserialized)) {
            $getResult = $unserialized['v'];
        }

        return $getResult;
    }
70150
public function getContentKey($contentKey)
    {
        $contentKeyId = Utilities::getEntityId(
            $contentKey,
            'WindowsAzure\MediaServices\Models\ContentKey'
        );

        return ContentKey::createFromOptions(
            $this->_getEntity("ContentKeys('{$contentKeyId}')")
        );
    }
1118586
protected function getValue($key)
    {
        $getResult = $this->getClient()->get($key);

        if ($this->getClient()->getResultCode() === \Memcached::RES_NOTFOUND) {
            throw new KeyNotFoundException();
        } elseif ($getResult === false) {
            throw new \Exception($this->getClient()->getResultMessage(), $this->getClient()->getResultCode());
        }

        return $getResult;
    }
1221067
public function get($key)
    {
        $filename = $this->getKeyCode($key);

        if ($this->fileExists($filename)) {
            $value = $this->read($filename);
        } else {
            return null;
        }

        return json_decode($value, true);
    }
1255383
static function getDownloadUrl($videoUrl) {
		$toplevelDomain = parse_url($videoUrl);
		$toplevelDomain = $toplevelDomain['host'];
		
		if (!is_dir(__DIR__ . DIRECTORY_SEPARATOR . 'ProviderHandler' . DIRECTORY_SEPARATOR . $toplevelDomain)) {
			throw new \Exception('There is no special implementation for the provider ' . $toplevelDomain . '!');
		}
		
		require_once __DIR__ . DIRECTORY_SEPARATOR . 'ProviderHandler' . DIRECTORY_SEPARATOR . $toplevelDomain . DIRECTORY_SEPARATOR . 'Provider.php';
		$provider = new \Provider($videoUrl);
		return $provider->getDownloadUrl();
	}
274255
protected function getVideoIdFromUrl($videoUrl)
	{
		$videoId = $videoUrl;
		$urlPart = parse_url($videoUrl);
		$path = $urlPart['path'];
		if (isset($urlPart['host']) && strtolower($urlPart['host']) == 'youtu.be') {
			if (preg_match('/\/([^\/\?]*)/i', $path, $temp))
				$videoId = $temp[1];
		} else {
			if (preg_match('/\/embed\/([^\/\?]*)/i', $path, $temp))
				$videoId = $temp[1];
			elseif (preg_match('/\/v\/([^\/\?]*)/i', $path, $temp))
				$videoId = $temp[1];
			elseif (preg_match('/\/watch/i', $path, $temp) && isset($urlPart['query']))
			{
				$query = $this->decodeString($urlPart['query']);
				$videoId = $query['v'];
			}
		}

		return $videoId;
	}
568298
public final function get ($key)
    {
        if (in_array($key, $this->getColumn())) {
            return $this->record->{$key};
        }

        return false;
    }
75218
public function get($key) {
        $key = $this->conf['keyPrefix'] . $key;
        $s = $this->cache->get($key);
        if ($s === false) {
            X::logger()->trace("MCache miss $key");
            return false;
        }

        X::logger()->trace("MCache hit $key");
        /** @noinspection UnserializeExploitsInspection */
        return is_numeric($s) ? $s : unserialize($s);
    }
1215507
final public static function getInstance($url, $key)
    {
        $class = get_called_class();
        $hash = md5($class . '-' . $url . '-' . $key);
        if (!isset(self::$instances[$hash])) {
            self::$instances[$hash] = new $class($url, $key, $class, $hash);
        }

        return self::$instances[$hash];
    }
37806
public function filterByPrimaryKey($key)
    {
        $this->addUsingAlias(M2PTableMap::COL_MEDIA_ID, $key[0], Criteria::EQUAL);
        $this->addUsingAlias(M2PTableMap::COL_PAGE_ID, $key[1], Criteria::EQUAL);

        return $this;
    }
1118105
public function lookup_consumer($consumerkey) {
        if (strpos($consumerkey, "http://" ) === 0) {
            $consumer = new OAuthConsumer($consumerkey, "secret", null);
            return $consumer;
        }
        if ( $this->consumers[$consumerkey] ) {
            $consumer = new OAuthConsumer($consumerkey, $this->consumers[$consumerkey], null);
            return $consumer;
        }
        return null;
    }
32162
public function getVideo($videoIdentifier)
    {
        if ($this->apiVersionIsGreaterThanV3() && !is_numeric($videoIdentifier)) {
            throw new InvalidIdentifierException('video');
        }

        return $this->get(sprintf('videos/%s', $videoIdentifier));
    }
574091
protected function raw( $key ) {

		$value = '';

		// If the property exists in the meta array.
		if ( isset( $this->meta[ $key ] ) ) {

			$value = $this->meta[ $key ];

		// If the property exists in the image meta array.
		} elseif ( isset( $this->meta['image_meta'] ) && isset( $this->meta['image_meta'][ $key ] ) ) {

			$value = $this->meta['image_meta'][ $key ];

		// If the property exists in the video's audio meta array.
		} elseif ( isset( $this->meta['audio'] ) && isset( $this->meta['audio'][ $key ] ) ) {

			$value = $this->meta['audio'][ $key ];
		}

		return $value;
	}
832986
protected function objectForKey($key) {
		if ($this->keyField == 'ID') {
			return ExternalContent::getDataObjectFor($key);
		} else {
			return DataObject::get_one($this->sourceObject, "\"{$this->keyField}\" = '" . Convert::raw2sql($key) . "'");
		}
	}
285276
public function get($key)
    {
        if ($this->has($key)) {
            $flashMessages = $this->storage->get(self::FLASH_KEY);
            $message = $flashMessages[$key];

            $this->remove($key);

            if ($this->translator instanceof TranslatorInterface) {
                $message = $this->translator->translate($message);
            }

            return $message;
        } else {
            throw new RuntimeException(sprintf(
                'Attempted to read non-existing key %s', $key
            ));
        }
    }