i am using Zend Framework classes in my CORE PHP project.
i am not using all features of ZF just need some classes.
i need to know How to include all Zend Classes at once so that i don’t include it one by one each time i need it.
in ZF we are doing so
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
public function _initRegisterLibraries(){
$moduleLoader = new Zend_Application_Module_Autoloader(array('namespace' => '', 'basePath' => APPLICATION_PATH));
$autoLoader = Zend_Loader_Autoloader::getInstance();
return $moduleLoader;
}
how can we achieve same in CORE PHP in which i want to use some zend classes.
For me I do this in any PHP File :
Then I can instantiate any Zend class I want, for exemple :
(Just be sure the
WWW_PATHpoint to were the library directory is currently in)