kandi X-RAY | zf2-tutorial Summary
kandi X-RAY | zf2-tutorial Summary
zf2-tutorial
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get input filter
- Edit an Album
- Deletes an album
- Add an album
- Saves an album
- Get the autoloader configuration .
- Get service config
- Get an album by id
- Bootstrap module .
- Exchanges an array from an array .
zf2-tutorial Key Features
zf2-tutorial Examples and Code Snippets
Community Discussions
Trending Discussions on zf2-tutorial
QUESTION
enter image description herei'm trying to add a new module named as Album
in Zend Skeleton application but however while accessing it through URL it throws an error below.i have spent almost 5 hours but did not find any solution.Any help will be appreciated.
...File:/var/www/zf2-tutorial/vendor/zendframework/zend-servicemanager/src/Factory/InvokableFactory.php:30
Message:Class Album/Controller/AlbumController not found.
stack trace #0 /var/www/zf2-tutorial/vendor/zendframework/zend- servicemanager/src/ServiceManager.php(758): Zend\ServiceManager\Factory\InvokableFactory- __invoke(Object(Zend\ServiceManager\ServiceManager), 'Album\Controlle...', NULL) #1 /var/www/zf2-tutorial/vendor/zendframework/zend- servicemanager/src/ServiceManager.php(200): Zend\ServiceManager\ServiceManager->doCreate('Album\Controlle...') #2 /var/www/zf2-tutorial/vendor/zendframework/zend- servicemanager/src/AbstractPluginManager.php(141): Zend\ServiceManager\ServiceManager->get('Album\Controlle...') #3 /var/www/zf2-tutorial/vendor/zendframework/zend-
mvc/src/DispatchListener.php(95): Zend\ServiceManager\AbstractPluginManager->get('Album\Controlle...') #4 /var/www/zf2-tutorial/vendor/zendframework/zend- eventmanager/src/EventManager.php(322): Zend\Mvc\DispatchListener- onDispatch(Object(Zend\Mvc\MvcEvent)) #5 /var/www/zf2-tutorial/vendor/zendframework/zend- eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager- triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure)) #6 /var/www/zf2-tutorial/vendor/zendframework/zend- mvc/src/Application.php(332): Zend\EventManager\EventManager- triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent)) #7 /var/www/zf2-tutorial/public/index.php(48): Zend\Mvc\Application- run() #8 {main}
ANSWER
Answered 2017-Dec-08 at 08:17There are several problems within your configuration.
You should change the way you register your controllers. It is now only registered as an invokable with the string you've given. It is not registered by its FQCN as you try to use it within your route configuration. Nevertheless you use the wrong FQCN within the route config. You are using Controller\Album::class
but the class is called: AlbumController
so change that to Controller\AlbumController::class
.
This is what your config should've been looking like:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install zf2-tutorial
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page