private function getVideo($videoId)
    {
        if (!array_key_exists($videoId, $this->videos)) {
            $options = new VideoRequestParameters();
            $options->setIncludeCustomMetadata(true);
            $this->videos[$videoId] = $this->client->getVideo($this->vmId, $videoId, $options);
        }

        return $this->videos[$videoId];
    }
private function getVideo($videoId)
    {
        if (!array_key_exists($videoId, $this->videos)) {
            $options = new VideoRequestParameters();
            $options->setIncludeCustomMetadata(true);
            $this->videos[$videoId] = $this->client->getVideo($this->vmId, $videoId, $options);
        }

        return $this->videos[$videoId];
    }
private function getVideo ( $ videoId ) { if ( ! array_key_exists ( $ videoId , $ this -> videos ) ) { $ options = new VideoRequestParameters ( ) ; $ options -> setIncludeCustomMetadata ( true ) ; $ this -> videos [ $ videoId ] = $ this -> client -> getVideo ( $ this -> vmId , $ videoId , $ options ) ; } return $ this -> videos [ $ videoId ] ; }
Fetches and returns video from api client and stores it locally.
This way api client will be requested only once for every video.

@param string $videoId

@return Video
Fetches and returns video from api client and stores it locally . This way api client will be requested only once for every video .