public function ajax_list_youtube($hidden = true) { App::import("Vendor", "YoutubeApi", array("file" => "YoutubeApi.php")); $yt = new YoutubeApi(); $videos = $yt->getAllVideos(); $this->set(compact("videos")); }
public function yt_channel() { // in app/Config/bootstrap.php App::uses('CakeLog', 'Log'); App::import("Vendor", "YoutubeApi", array("file" => "YoutubeApi.php")); $yt = new YoutubeApi(); $videos = $yt->getAllVideos(); $dump = print_r($videos, true); CakeLog::write("debug", $dump); die; }