Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Add helper trait to provide type-hinting for zend-view
Browse files Browse the repository at this point in the history
  • Loading branch information
thexpand committed Aug 11, 2018
1 parent c6c465a commit 3cff34b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/View/HelperTrait.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace Zend\I18n\View;

use IntlDateFormatter;

// @codingStandardsIgnoreStart
/**
* Trait HelperTrait
*
* The trait provides convenience methods for view helpers,
* defined by the zend-i18n component. It is designed to be used
* for type-hinting $this variable inside zend-view templates via doc blocks.
*
* The base class is PhpRenderer, followed by the helper trait from
* the zend-i18n component. However, multiple helper traits from different
* Zend components can be chained afterwards.
*
* @example @var \Zend\View\Renderer\PhpRenderer|\Zend\I18n\View\HelperTrait $this
*
* @method string currencyFormat($number, $currencyCode = null, $showDecimals = null, $locale = null, $pattern = null)
* @method string dateFormat($date, $dateType = IntlDateFormatter::NONE, $timeType = IntlDateFormatter::NONE, $locale = null, $pattern = null)
* @method string numberFormat($number, $formatStyle = null, $formatType = null, $locale = null, $decimals = null, array $textAttributes = null)
* @method string plural($strings, $number)
* @method string translate($message, $textDomain = null, $locale = null)
* @method string translatePlural($singular, $plural, $number, $textDomain = null, $locale = null)
*/
trait HelperTrait
{
}

0 comments on commit 3cff34b

Please sign in to comment.