无法重新声明类,控制器Symfony2

时间:2014-07-23 01:44:33

标签: php symfony

我的项目工作正常但是当我添加了一个新的“类别”实体时,会出现此错误,但我没有另一个同名的类

编译错误:无法重新声明类Project \ SotreBundle \ Controller \ CategoryDashboardController

这是控制器: CategoryDashboardController.php

<?php
namespace Project\SotreBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Component\Form\Form;
use JMS\SecurityExtraBundle\Annotation\Secure;

use Project\SotreBundle\Entity\Category;


use Project\SotreBundle\Form\Type\CategoryType;
use Project\SotreBundle\Form\Type\CategoryEditType;



/**
* Category controller.
*
*/
class CategoryDashboardController extends Controller
{
/**
 * Lists all Categories
 *
 */
public function indexAction()
{
    $em = $this->getDoctrine()->getManager();

    $listCategories = $em->getRepository('ProjectStoreBundle:Category')->findAll();

    return $this->render('ProjectDashboardBundle:Category:index.html.twig',
    array(
        'listCategories' => $listCategories
    ));
}

}

0 个答案:

没有答案