Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Carregar Componente Zend Framework em Projeto Existente


Acabei copiando a pasta Zend com os componentes que precisava para uma pasta chamada Biblioteca e é assim que instancia o Autoloader, por exemplo.
/* Define site root */
defined('DOCUMENT_ROOT') ? null : define('DOCUMENT_ROOT',realpath(dirname(__FILE__)));
defined('SITE_ROOT') ? null : define('SITE_ROOT',realpath(dirname(DOCUMENT_ROOT).'\mysite'));


$includePath[] = DOCUMENT_ROOT.'.';
$includePath[] = SITE_ROOT . '\Library';
$includePath[] = get_include_path();
$includePath = implode(PATH_SEPARATOR,$includePath);
set_include_path($includePath);

//Including Zend LoaderClass
require_once('Library/Zend/Loader/Autoloader.php');

//Loading the auto loader file.( Including the autoloader.php file)
$autoloader = Zend_Loader_Autoloader::getInstance();