I am using Zend Framework 2 Session Container to store objects into session.
My problem :
I get a __PHP_Incomplete_Class
when i want retrieve my data.
I looked around on the internet and found it is an autoloader issue. Zend Framework use autoload_classmap.php
to solve that kind of issue, but it doesn't work for me.
Any idea ?
EDIT
@TimFountain, i start the session in the Application module onBootstrap()
function.
I checked before if session.auto_start is to 0 ... it is.
My autoload_classmap.php
is at the root of my module (according ZF2 structure) and looks like this :
<?php
// Generated by ZF2's ./bin/classmap_generator.php
return array(
'CetmShop\Model\Mapper\ViewProduct' => __DIR__ . '/src/CetmShop/Model/Mapper/ViewProduct.php',
...
);
Of course, i get the autoloader config in the Module.php of my module :
public function getAutoloaderConfig()
{
return array(
'Zend\Loader\ClassMapAutoloader' => array(
__DIR__ . '/autoload_classmap.php',
),
);
}
And in my session container storage, i still get :
[0] => object(__PHP_Incomplete_Class)#68 (13) {
["__PHP_Incomplete_Class_Name"] => string(33) "CetmShop\Model\Mapper\ViewProduct"
...
Thx