Methods
__construct()
__construct(array $options)
Parameters
$options
array
Invoke filter as a command
__invoke(mixed $value) : mixed
Inherited
Proxies to filter()
inherited_from |
\Zend\Filter\AbstractFilter::__invoke() |
Parameters
$value
mixed
Exceptions
Returns
mixed
Defined by Zend\Filter\FilterInterface
filter(string $value) : string | mixed
Returns a human readable format of the amount of bits or bytes.
If the value provided is not numeric, the value will remain unfiltered
Parameters
$value
string
Exceptions
Returns
string
mixed
Retrieve options representing object state
getOptions() : array
Inherited
inherited_from |
\Zend\Filter\AbstractFilter::getOptions() |
Returns
array
hasPcreUnicodeSupport()
hasPcreUnicodeSupport() : bool
Inherited
inherited_from |
\Zend\Filter\AbstractFilter::hasPcreUnicodeSupport() |
Returns
bool
setOptions()
setOptions(array | \Traversable $options) : \Zend\Filter\self
Inherited
inherited_from |
\Zend\Filter\AbstractFilter::setOptions() |
Parameters
$options
array\Traversable
Exceptions
Returns
\Zend\Filter\self
Get current filter mode
getMode() : string
Get the precision of the filtered result.
getPrecision() : int
Find the prefix at a specific location in the prefixes array.
getPrefixAt($index) : string | null
Parameters
$index
Returns
string
null
Get the predefined prefixes or use the build-in standardized lists of prefixes.
getPrefixes() : array
Get current filter type
getUnit() : string
Find out if the filter is in binary mode.
isBinaryMode() : bool
Find out if the filter is in decimal mode.
isDecimalMode() : bool
isOptions()
isOptions(mixed $options) : bool
Inherited
inherited_from |
\Zend\Filter\AbstractFilter::isOptions() |
Parameters
$options
mixed
Returns
bool
Define the mode of the filter.
setMode(string $mode)
Possible values can be fount at self::$modes.
Parameters
$mode
string
Exceptions
Set the precision of the filtered result.
setPrecision($precision)
Set the precision of the result.
setPrefixes(array $prefixes)
Parameters
$prefixes
array
Define the unit of the filter.
setUnit(string $unit)
Possible values can be fount at self::$types.
Parameters
$unit
string
Properties
Default options:
$options : array
A list of all possible filter modes:
$modes : array
A list of standardized binary prefix formats for decimal and binary mode
$standardizedPrefixes : array
Constants
BASE_DECIMAL
BASE_DECIMAL
MODE_DECIMAL
MODE_DECIMAL