Heads up! This post was written 15 years ago. Some information might be outdated or may have changed since then.
system/vendors/Zend/ 2. Отиваме в application/libraries/ 3. Създаваме файл Zend.php 4. Добавяме следното съдържание в създадения по рано файл load($class);
}
return $instance;
}
/**
* Constructor
*
* @param string $class class name
*/
function __construct($class = NULL) {
// include path for Zend Framework
// alter it accordingly if you have put the 'Zend' folder elsewhere
ini_set('include_path', ini_get('include_path').PATH_SEPARATOR.APPPATH.'vendors');
if ($class) {
require_once (string) $class.EXT;
//Log::add('debug', "Zend Class $class Loaded");
} else {
//Log::add('debug', "Zend Class Initialized");
}
}
/**
* Zend Class Loader
*
* @param string $class class name
*/
function load($class) {
require_once (string) $class.EXT;
//Log::add('debug', "Zend Class $class Loaded");
}
} 5. Запазваме И това е ! Начина на използване е следният public function youtube() {
Zend::instance('Zend/Gdata/ClientLogin');
Zend::instance('Zend/Gdata/YouTube');
.... вашият код .....
} ПС: това е за Kohana 2.x версията. За 3.x все още не ми се е налагало но предполагам метода е същият.