Bonjour,

J'utilise Znd Framework 2.

J'ai un module que j'ai crée et quand j'appel une fonction j'ai cette erreur :

An exception was raised while creating "ReservationSalle\Factory\ReservationSalleNotificationFactory"; no instance returned
Voilà pourtant dans Module.php j'ai bien :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
public function getServiceConfig()
    {
        return array(
            'factories' => array(
                'ReservationSalle\Factory\ReservationSalleNotificationFactory' => function ($serviceLocator) {
                    $notificationService = $serviceLocator->get('Application\Service\Notification\NotificationService');
                    $httpRouter = $serviceLocator->get('HttpRouter');
                    $ReservationSalleNotificationFactory = new ReservationSalleNotificationFactory($notificationService, $httpRouter);
                    return $ReservationSalleNotificationFactory;
                },
            ),
        );
    }
L'erreur est provoquée par le get dans :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class AbstractReservationSalleActionController extends AbstractProfessionalActionController {
    /**
     * @var ReservationSalleNotificationFactory
     */
    private $notificationFactory;

    protected function getNotificationFactory()
    {
        if (!$this->notificationFactory) {
            $this->notificationFactory = $this->getServiceLocator()->get('ReservationSalle\Factory\ReservationSalleNotificationFactory');
        }
        return $this->notificationFactory;
    }


}
Une idée car la je ne vois pas du tout !

Merci