Class Int

Summary

Fully Qualified Name: Zend\Filter\Int
Extends: ToInt

Description

Stub class for backwards compatibility.

Since PHP 7 adds "int" as a reserved keyword, we can no longer have a class named that and retain PHP 7 compatibility. The original class has been renamed to "ToInt", and this class is now an extension of it. It raises an E_USER_DEPRECATED to warn users to migrate.

Methods

Name Description Defined By
__construct() Int
__invoke() Invoke filter as a command AbstractFilter
filter() Defined by Zend\Filter\FilterInterface ToInt
getOptions() Retrieve options representing object state AbstractFilter
hasPcreUnicodeSupport() AbstractFilter
setOptions() AbstractFilter

Method Details

__construct()

Returns: void

__invoke()

Invoke filter as a command

Proxies to {@link filter()}

Parameter Name Type Description
$value mixed

Returns: mixed

filter()

Defined by Zend\Filter\FilterInterface

Returns (int) $value

If the value provided is non-scalar, the value will remain unfiltered

Parameter Name Type Description
$value string

Returns: int|mixed

getOptions()

Retrieve options representing object state

Returns: array

hasPcreUnicodeSupport()

Returns: bool

setOptions()

Parameter Name Type Description
$options array|\Traversable

Returns: self

Top