we`re currently developing our own Feedmanager for ShopProducts based on Zend Framework. In this feedmanager you can manage several feeds, to be created and sent to different locations. Each feed has n-fields which are in the current version only in one level. Now we want to change it to a multilevel version, we we have parentfields and childfields.
We dont want to reinvent the wheel, so we would like to use a developed class or helper.
I found the class of F. Pietka. https://github.com/fpietka/Zend-Nested-Set I tried to use this helper in our system, but had no success.
I wrote the following line, to use the class:
$oNested = new NestedSet_Model();
I got the following error message:
Fatal error: Call to undefined method NestedSet_Model::getDbTable() in D:\xampp\htdocs\feedmanager_alpha\application\classes\NestedSet.class.php on line 75
In the readme of Peitka`s NestedSet helper it says that the ZendLibrary needs to be in the include path.
I think I did this with the following lines:
define("ROOTPATH", realpath("../"));
define("LIBPATH", ROOTPATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR);
// Ensure library/ is on include_path
set_include_path(
implode(PATH_SEPARATOR,
array(
realpath(LIBPATH)
)
)
);
Did I set the include path correctly? What could be the problem in my case? Is a nested-set the best way to create the parent-child-model?
NestedSet_Modeldoes not have the function/method calledgetDbTable(). It can find the class fine, it's the method call that errors. Are you sure this class has that method?