在第 22 行的 C:\wamp\www\test\src\Ado\FrontendBundle\Helper\AdoFactory.php 中找不到类“AdoDoctrineModel”
<?php
namespace Ado\FrontendBundle\Helper;
use AdoDoctrineModel;
use AdoApiModel;
class AdoFactory {
protected $adapter;
public function __construct($container) {
$this->adapter = $container->getParameter('adapter');
}
public function getModel() {
switch($this->adapter)
{
case 'API':
case 'Doctrine':
$class = 'Ado' . $this->adapter. 'Model';
return new $class;
break;
default: throw new Exception("unsupported format: " . $type);
}
}
}
?>
和 AdoDoctrineModel.php
namespace Ado\FrontendBundle\Helper;
class AdoDoctrineModel {
public function __construct() {
}
}
我尝试将 AdoFactory 中的使用路径更改为完整路径,还添加了“使用 {...} 作为 AdoDoctrineModel”
任何帮助都会很棒!