using Zend_Loader::loadClass and include
Moderator: General Moderators
using Zend_Loader::loadClass and include
whats difference will it make while using Zend_Loader::loadClass and include_once or require_once.
Zend_Loader::LoadClass will find a file based on a class name and load it
For instance if you have a class named MY_Class_Name load class will search for a file in your path (or paths you specify in the function call) in a subdirecty based on the class name like: MY/Class/Name.php and include that file. If the class has already been declared then it won't try to include the file.
Require_once and include_once are used to include arbitrary files, nothing more. Using those functions you have to specify the file name instead of a class name.
For instance if you have a class named MY_Class_Name load class will search for a file in your path (or paths you specify in the function call) in a subdirecty based on the class name like: MY/Class/Name.php and include that file. If the class has already been declared then it won't try to include the file.
Require_once and include_once are used to include arbitrary files, nothing more. Using those functions you have to specify the file name instead of a class name.