-1

Hello i have problem with warning in Zend Studio 10. I create Album Controller and set

namespace Album\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zned\View\Model\ViewModel;

After that i declare controller :

class AlbumController extends AbstractActionController

Warning is :

Description Resource Path Location Type

Cannot extend from interface 'AbstractActionController' AlbumController.php /zf2-tutorial/module/Album/src/Album/Controller line 8 DLTK Problem

But all work good. How can fix this?

Ivan
  • 5,139
  • 11
  • 53
  • 86
  • First of all replace use Zned\View\Model\ViewModel; with "use Zend\View\Model\ViewModel;", then post your full controller – noobie-php Aug 25 '13 at 07:30
  • Are you sure? Try that code with double quotes in ZFS and you will see does you can render... – Ivan Aug 25 '13 at 22:05
  • i am 100 percent SURE, also for a file to depict CONTROLLER property it must extends AbstractActionController else you will get screen with bunch of new errors, also Zned\View\Model\ViewModel will never load viewModel unless you are too keen and created a new namespace as you mentioned – noobie-php Aug 25 '13 at 22:11
  • I say go in ZS and type that in some controller in indexAction and u will se. I try that afre this post. When i put double q. zs back warning and dont render view – Ivan Aug 26 '13 at 13:38
  • I recommend you to use NetBeans as its the best for PHP related works – noobie-php Aug 26 '13 at 14:32

1 Answers1

0

This is not a Zend Framework 2 bug. Try your code to run and you'd see that it works.

Apparently Zend Studio fails to recognize the AbstractActionController extends AbstractController implements Dispatchable, EventManagerAwareInterface, InjectApplicationEventInterface, ServiceLocatorAwareInterface.

The interfaces have certain methods that are either implemented by the AbstractController or the AbstractActionController. My guess is that Zend Studio has not found all of the Zend Framework classes, so check the include paths for your application. Also, it might still be scanning for files so not all controller classes have been indexed yet.

Jurian Sluiman
  • 13,498
  • 3
  • 67
  • 99
  • I know what he implements but i say in above post. This all work but all time am getting that stupid warning. – Ivan Aug 25 '13 at 22:04
  • 1
    My answer is not about the inheritance model, but the fact Zend Studio is not understanding this model. This is not a Zend **Framework** problem but a Zend **Studio** problem. Check your loaded classes etc – Jurian Sluiman Aug 26 '13 at 08:38
  • Ok Jurian i will check tnx for answer – Ivan Aug 26 '13 at 13:36