You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for WebinoImageThumb
/Applications/MAMP/htdocs/esolidar-1.0.0/vendor/zendframework/zend-servicemanager/src/ServiceManager.php in get at line 555
throw new Exception\ServiceNotFoundException(sprintf(
/Applications/MAMP/htdocs/esolidar-1.0.0/module/Application/src/Application/Controller/Factory/AjaxControllerFactory.php in __invoke at line 76
FooControllerFactory(ContainerInterface $container){
public function __invoke(ContainerInterface $container)
{
// This works for both ZF2 and ZF3 and can be used in all managers (including ServiceManager)
// TODO: Can be removed in ZF3
if ($container instanceof ServiceManager) {
$container = $container->getServiceLocator();
}
}
The text was updated successfully, but these errors were encountered:
Zend\ServiceManager\Exception\ServiceNotFoundException
Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for WebinoImageThumb
/Applications/MAMP/htdocs/esolidar-1.0.0/vendor/zendframework/zend-servicemanager/src/ServiceManager.php in get at line 555
throw new Exception\ServiceNotFoundException(sprintf(
/Applications/MAMP/htdocs/esolidar-1.0.0/module/Application/src/Application/Controller/Factory/AjaxControllerFactory.php in __invoke at line 76
$thumbnailer = $container->get('WebinoImageThumb');
I followed your example like in testes:
in my controller:
// External Services
use WebinoImageThumb\Service\ImageThumb as WebinoImageThumb;
FooController(WebinoImageThumb $thumbnailer) { $this->thumbnailer = $thumbnailer; }
use Interop\Container\ContainerInterface;
FooControllerFactory(ContainerInterface $container){
public function __invoke(ContainerInterface $container)
{
// This works for both ZF2 and ZF3 and can be used in all managers (including ServiceManager)
// TODO: Can be removed in ZF3
if ($container instanceof ServiceManager) {
$container = $container->getServiceLocator();
}
}
The text was updated successfully, but these errors were encountered: