Fatal error: Class Blog\Factory\ListControllerFactory contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Zend\ServiceManager\Factory\FactoryInterface::__invoke) in /d0/home/kgendig/www/Zend/module/Blog/src/Blog/Factory/ListControllerFactory.php on line 28
私は私が(私のzend_versionを変更する必要がどのような https://framework.zend.com/manual/2.4/en/in-depth-guide/services-and-servicemanager.html
ですべてをやっています)。あなたのListControllerFactory
クラスがFactoryInterface
を実装2.6.0
<?php
// Filename: /module/Blog/src/Blog/Factory/ListControllerFactory.php
namespace Blog\Factory;
use Blog\Controller\ListController;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
class ListControllerFactory implements FactoryInterface
{
/**
* Create service
*
* @param ServiceLocatorInterface $serviceLocator
*
* @return mixed
*/
public function createService(ServiceLocatorInterface $serviceLocator)
{
$realServiceLocator = $serviceLocator->getServiceLocator();
$postService = $realServiceLocator->get('Blog\Service\PostServiceInterface');
return new ListController($postService);
}
}
'ListControllerFactory.php'を与えてください。あなたのコードを渡さないと何が間違っているのか誰にも分かりません。その後、ZF3について話していますが、ZF2.4マニュアルへのリンクを与え、2.6バージョンを持っています。 ZF2またはZF3で作業しますが、一緒に動作するように設計されていない部品を交換しないでください。 –
ok私は最初のメモに貼り付けます – kgendig