function test() { App::import('Vendor', 'YouTube', array('file' => 'class.YouTube.php')); $VideoTube = new YouTube(); echo $youTubeID = $VideoTube->getEmbedID($this->Video->field('code', array('id' => 60))); // save ID!!! exit; }