You are here

function brightcove_video_cache_get in Brightcove Video Connect 6

Same name and namespace in other branches
  1. 6.2 brightcove.module \brightcove_video_cache_get()
  2. 7.2 brightcove.module \brightcove_video_cache_get()

Fetches a brighcove video object from the cache, if available.

Parameters

The Brightcove identifier for the video.:

Return value

Object the Brightcove video object.

3 calls to brightcove_video_cache_get()
brightcove_cck_browser_validate in brightcove_cck/brightcove_cck.module
Validate callback for the field.
brightcove_cck_browser_value in brightcove_cck/brightcove_cck.module
Callback for Brightcove CCK browser widget. Will return a field value in "video-name [id:videoId]" format.
brightcove_cck_field in brightcove_cck/brightcove_cck.module
Implementation of hook_field().

File

./brightcove.module, line 431
Brightcove module is an integration layer between any modules using Brightcove API. It makes all necessary checks for the API and makes settings available to the user.

Code

function brightcove_video_cache_get($id) {
  $id = (int) $id;
  $key = "video_{$id}";
  if ($id && isset($_SESSION['brightcove'][$key])) {
    return $_SESSION['brightcove'][$key];
  }
  return NULL;
}