You are here

public function EmapiMedia::extract_value in Embedded Media Field 6.3

A helper function for set_uri. This allows the value to be captured.

1 call to EmapiMedia::extract_value()
EmapiMedia::set_uri in emapi/includes/emapi.class.media.inc

File

emapi/includes/emapi.class.media.inc, line 176
Base Embedded Media Object, to be extended by individual providers.

Class

EmapiMedia
@file Base Embedded Media Object, to be extended by individual providers.

Code

public function extract_value($uri) {
  if (preg_match('@/' . $this
    ->get_identifier() . '/([^/]*)@i', $uri, $matches)) {
    return $matches[1];
  }
}