【发布时间】:2015-04-09 14:57:45
【问题描述】:
加载了 php-intl 扩展 因为我可以毫无问题地在视图脚本中使用 IntlDateFormatter::SHORT。
我的 ViewHelper 中的位
<?php
namespace Common\View\Helper;
use Zend\View\Helper\AbstractHelper;
class DateFormat extends AbstractHelper {
public function __invoke($dateField) {
$dateFormatter=$this->getView()->plugin('dateformat');
return $dateFormatter(strtotime($dateField), IntlDateFormatter::SHORT);
}
}
?>
我得到了错误
致命错误:在中找不到类“Common\View\Helper\IntlDateFormatter” C:\TEMP\zf2ad\client\module\Common\src\Common\View\Helper\DateFormat.php 在第 12 行
请指教
以法莲
【问题讨论】:
标签: php zend-framework2 view-helpers