Class lispa\amos\core\formatter\Formatter

Inheritancelispa\amos\core\formatter\Formatter » yii\i18n\Formatter » yii\base\Component » yii\base\Object
Implementsyii\base\Configurable

Class Formatter

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$behaviors yii\base\Behavior[] List of behaviors attached to this component yii\base\Component
$booleanFormat array The text to be displayed when formatting a boolean value. yii\i18n\Formatter
$calendar IntlCalendar|integer|null The calendar to be used for date formatting. yii\i18n\Formatter
$currencyCode string The 3-letter ISO 4217 currency code indicating the default currency to use for asCurrency(). yii\i18n\Formatter
$dateFormat string The default format string to be used to format a date. yii\i18n\Formatter
$datetimeFormat string The default format string to be used to format a date and time. yii\i18n\Formatter
$decimalSeparator string The character displayed as the decimal point when formatting a number. yii\i18n\Formatter
$defaultTimeZone string The time zone that is assumed for input values if they do not include a time zone explicitly. yii\i18n\Formatter
$locale string The locale ID that is used to localize the date and number formatting. yii\i18n\Formatter
$nullDisplay string The text to be displayed when formatting a null value. yii\i18n\Formatter
$numberFormatterOptions array A list of name value pairs that are passed to the intl [NumberFormatter::setAttribute()](http://php. yii\i18n\Formatter
$numberFormatterSymbols array A list of name value pairs that are passed to the intl [NumberFormatter::setSymbol()](http://php. yii\i18n\Formatter
$numberFormatterTextOptions array A list of name value pairs that are passed to the intl [NumberFormatter::setTextAttribute()](http://php. yii\i18n\Formatter
$sizeFormatBase integer The base at which a kilobyte is calculated (1000 or 1024 bytes per kilobyte), used by asSize() and asShortSize(). yii\i18n\Formatter
$tagsSeparator lispa\amos\core\formatter\Formatter
$thousandSeparator string The character displayed as the thousands separator (also called grouping separator) character when formatting a number. yii\i18n\Formatter
$timeFormat string The default format string to be used to format a time. yii\i18n\Formatter
$timeZone string The time zone to use for formatting time and date values. yii\i18n\Formatter

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\base\Component
__clone() This method is called after the object is created by cloning an existing one. yii\base\Component
__construct() Constructor. yii\base\Object
__get() Returns the value of a component property. yii\base\Component
__isset() Checks if a property is set, i.e. defined and not null. yii\base\Component
__set() Sets the value of a component property. yii\base\Component
__unset() Sets a component property to be null. yii\base\Component
asBoolean() Formats the value as a boolean. yii\i18n\Formatter
asCarteCredito() lispa\amos\core\formatter\Formatter
asCurrency() Formats the value as a currency number. yii\i18n\Formatter
asDate() Formats the value as a date. yii\i18n\Formatter
asDatetime() lispa\amos\core\formatter\Formatter
asDecimal() Formats the value as a decimal number. yii\i18n\Formatter
asDuration() Represents the value as duration in human readable format. yii\i18n\Formatter
asEmail() Formats the value as a mailto link. yii\i18n\Formatter
asHtml() Formats the value as HTML text. yii\i18n\Formatter
asImage() Formats the value as an image tag. yii\i18n\Formatter
asInteger() Formats the value as an integer number by removing any decimal digits without rounding. yii\i18n\Formatter
asMaiuscolo() lispa\amos\core\formatter\Formatter
asMinutiDaIntero() lispa\amos\core\formatter\Formatter
asNtext() Formats the value as an HTML-encoded plain text with newlines converted into breaks. yii\i18n\Formatter
asOrdinal() Formats the value as a ordinal value of a number. yii\i18n\Formatter
asParagraphs() Formats the value as HTML-encoded text paragraphs. yii\i18n\Formatter
asPercent() Formats the value as a percent number with "%" sign. yii\i18n\Formatter
asPercentuale() lispa\amos\core\formatter\Formatter
asPrice() lispa\amos\core\formatter\Formatter
asRaw() Formats the value as is without any formatting. yii\i18n\Formatter
asRelativeTime() Formats the value as the time interval between a date and now in human readable form. yii\i18n\Formatter
asScientific() Formats the value as a scientific number. yii\i18n\Formatter
asShortSize() Formats the value in bytes as a size in human readable form for example 12 KB. yii\i18n\Formatter
asSize() Formats the value in bytes as a size in human readable form, for example 12 kilobytes. yii\i18n\Formatter
asSpellout() Formats the value as a number spellout. yii\i18n\Formatter
asStatoSiNo() lispa\amos\core\formatter\Formatter
asStatoattivo() lispa\amos\core\formatter\Formatter
asStripTags() lispa\amos\core\formatter\Formatter
asTags() lispa\amos\core\formatter\Formatter
asText() Formats the value as an HTML-encoded plain text. yii\i18n\Formatter
asTime() Formats the value as a time. yii\i18n\Formatter
asTimestamp() Formats a date, time or datetime in a float number as UNIX timestamp (seconds since 01-01-1970). yii\i18n\Formatter
asUrl() Formats the value as a hyperlink. yii\i18n\Formatter
attachBehavior() Attaches a behavior to this component. yii\base\Component
attachBehaviors() Attaches a list of behaviors to the component. yii\base\Component
behaviors() Returns a list of behaviors that this component should behave as. yii\base\Component
canGetProperty() Returns a value indicating whether a property can be read. yii\base\Component
canSetProperty() Returns a value indicating whether a property can be set. yii\base\Component
className() Returns the fully qualified name of this class. yii\base\Object
detachBehavior() Detaches a behavior from the component. yii\base\Component
detachBehaviors() Detaches all behaviors from the component. yii\base\Component
ensureBehaviors() Makes sure that the behaviors declared in behaviors() are attached to this component. yii\base\Component
format() Formats the value based on the given format type. yii\i18n\Formatter
getBehavior() Returns the named behavior object. yii\base\Component
getBehaviors() Returns all behaviors attached to this component. yii\base\Component
hasEventHandlers() Returns a value indicating whether there is any handler attached to the named event. yii\base\Component
hasMethod() Returns a value indicating whether a method is defined. yii\base\Component
hasProperty() Returns a value indicating whether a property is defined for this component. yii\base\Component
init() Initializes the object. lispa\amos\core\formatter\Formatter
off() Detaches an existing event handler from this component. yii\base\Component
on() Attaches an event handler to an event. yii\base\Component
trigger() Triggers an event. yii\base\Component

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
createNumberFormatter() Creates a number formatter based on the given type and format. yii\i18n\Formatter
isValidTimeStamp() lispa\amos\core\formatter\Formatter
normalizeDatetimeValue() Normalizes the given datetime value as a DateTime object that can be taken by various date/time formatting methods. yii\i18n\Formatter
normalizeNumericValue() Normalizes a numeric input value yii\i18n\Formatter

Property Details

$tagsSeparator public property
public $tagsSeparator null

Method Details

asCarteCredito() public method

public string asCarteCredito ( $value )
$value
asDatetime() public method

public string asDatetime ( $value, $format 'human' )
$value DateTime|integer|string
$format string
throws yii\base\InvalidConfigException
asMaiuscolo() public method

public string asMaiuscolo ( $value )
$value
asMinutiDaIntero() public method

public string asMinutiDaIntero ( $value )
$value
asPercentuale() public method

public string asPercentuale ( $value )
$value
asPrice() public method

public string asPrice ( $value )
$value
asStatoSiNo() public method

public string asStatoSiNo ( $value )
$value
asStatoattivo() public method

public string asStatoattivo ( $value )
$value
asStripTags() public method

public string asStripTags ( $value )
$value
asTags() public method

public string asTags ( $value )
$value
init() public method

Initializes the object.

This method is invoked at the end of the constructor after the object is initialized with the given configuration.

public void init ( )
isValidTimeStamp() protected method

protected boolean isValidTimeStamp ( $timestamp )
$timestamp