IdType

Extends \IntType Implements \IdInterface

Class IdType

IMPORTANT: When you need to cast an Id object to integer, cast it first to string, because otherwise the following command will return always 1:

EXAMPLE: $id = new IdType(948); bad - (int)$id >> 1 good - (int)(string)$id >> 948

category

System

package

Shared

subpackage

Types

Methods

Class Constructor

__construct(integer $p_value) 
inherited
Throws
\InvalidArgumentException

Arguments

$p_value

integer

__toString

__toString() : string
deprecated

v2.7.1.0 To string method is left for backwards compatibility. Use asInt() method instead.

Response

string

Get the instance value as int.

asInt() : integer
inherited

Response

integer

Properties

Instance Value

value : integer
inherited
var

Type(s)

integer