在接到新任务之前,我已经写好了班级服务。我需要扩展我的服务..
我有:
namespace Trucking\MainBundle\Service;
use Trucking\MainBundle\classes\Scan;
class ScanService {
public function scan() {
// code
}
}
我已经升级了服务
namespace Trucking\MainBundle\Service;
use Trucking\MainBundle\classes\Scan;
class ScanService extends Scan\Process\Process {
public function scan(Scan\IScanVirtual $virtual) {
$virtual->start($this);
}
}
服务.yml
scan_storage:
class : Trucking\MainBundle\Service\ScanService
arguments: [path,container,movetime,checkpoint]
我有一个错误:
message":"运行时注意事项:Trucking\MainBundle\Service
\ScanService::scan() 的声明应与
C:\webserver\symfony 中的 Trucking\MainBundle\classes\Scan\Process\Process::scan() 的声明兼容\src\Trucking\MainBundle\Service
\ScanService.php 第 11 行","class":"ErrorException","trace":[{"namespace":"","short_class":"","class":"" ,"类型":"","函数":"","
ScanService.php 第 11 行:
ScanService extends Scan\Process\Process