You are here

public function MediaInternetOEmbedHandler::validate in oEmbed 7

Same name and namespace in other branches
  1. 8 MediaInternetOEmbedHandler.inc \MediaInternetOEmbedHandler::validate()
  2. 7.0 MediaInternetOEmbedHandler.inc \MediaInternetOEmbedHandler::validate()

File should not validate if we cannot fetch valid oEmbed data.

File

./MediaInternetOEmbedHandler.inc, line 37
MediaInternetOEmbedHandler.inc

Class

MediaInternetOEmbedHandler
Implementation of MediaInternetBaseHandler.

Code

public function validate() {
  $file = $this
    ->getFileObject();
  $validators = array(
    'oembed_file_validator_type' => array(),
  );
  $errors = file_validate($file, $validators);
  foreach ($errors as $error) {
    throw new MediaInternetValidationException($error);
  }
}