php - Why is IntlDateFormatter not found? -
php - Why is IntlDateFormatter not found? -
the php-intl extension loaded since can utilize intldateformatter::short in view script no issue.
bit in viewhelper
<?php namespace common\view\helper; utilize zend\view\helper\abstracthelper; class dateformat extends abstracthelper { public function __invoke($datefield) { $dateformatter=$this->getview()->plugin('dateformat'); homecoming $dateformatter(strtotime($datefield), intldateformatter::short); } } ?> i error
fatal error: class 'common\view\helper\intldateformatter' not found in c:\temp\zf2ad\client\module\common\src\common\view\helper\dateformat.php on line 12
please advise
ephraim
since you're working in namespace context, looks class in actual namespace common\view\helper. have add together backslash in front end of class if it's in global namespace.
return $dateformatter(strtotime($datefield), \intldateformatter::short); php zend-framework2 view-helpers
Comments
Post a Comment