\Mobi_Mtld_DA_Property

Contains a property value. The value can be fetched as a generic Object or one of the convenience asXXXX methods can be used to get the value in a specific type.

Summary

Methods
Properties
Constants
__construct()
getDataTypeId()
getDataType()
value()
asBoolean()
asInteger()
asSet()
asString()
__toString()
toString()
equals()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$NOT_CONVERTIBLE_TO_BOOLEAN
$NOT_CONVERTIBLE_TO_INT
$value
$dataTypeId
N/A

Properties

$NOT_CONVERTIBLE_TO_BOOLEAN

$NOT_CONVERTIBLE_TO_BOOLEAN : 

Type

$NOT_CONVERTIBLE_TO_INT

$NOT_CONVERTIBLE_TO_INT : 

Type

$value

$value : 

Type

$dataTypeId

$dataTypeId : 

Type

Methods

__construct()

__construct(  $value,   $dataTypeId) 

Create a new Property with a value and data type.

Parameters

$value
$dataTypeId
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

getDataTypeId()

getDataTypeId() : \byte

Get the type of this property.

See Mobi_Mtld_DA_DataType for a full list of data types.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

\byte —

The data type ID of this property.

getDataType()

getDataType() : string

Get the type name of this property.

See Mobi_Mtld_DA_DataType for a full list of data types.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

string —

The data type name of this property.

value()

value() : \The

Get the value of this property. This needs to be cast to the appropriate type such to be used. E.g. value = (int)$property->value();

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

\The —

raw property value.

asBoolean()

asBoolean() : \The

Get the value of the property as a boolean.

Throws

\Mobi_Mtld_DA_Exception_IncorrectPropertyTypeException

Thrown if the type of the value is not a Mobi_Mtld_DA_DataType::BOOLEAN

Returns

\The —

boolean value of the property.

asInteger()

asInteger() : \The

Get the value of the property as an integer.

Throws

\Mobi_Mtld_DA_Exception_IncorrectPropertyTypeException

Thrown if the type of the value is not compatible with a Mobi_Mtld_DA_DataType::INTEGER

Returns

\The —

integer value of the property.

asSet()

asSet() : \A

Gets a set of possible values for this property. This is typically only used when it is known that a given property name can have multiple possible values. All items in the set will have the same data type.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

\A —

set of values.

asString()

asString() : \The

Get the value of the property as string. Alias for asString(). If a property has multiple possible values then the values are concatenated with a comma.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

\The —

string value of the property.

__toString()

__toString() : \The

Get the value of the property as string. Alias for asString(). If a property has multiple possible values then the values are concatenated with a comma.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

\The —

string value of the property

toString()

toString() : \The

Get the value of the property as string. Alias for asString(). If a property has multiple possible values then the values are concatenated with a comma.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

\The —

string value of the property

equals()

equals(  $obj) : boolean

Compare two instances of this class.

If both have equal values and data type then returns true.

Parameters

$obj

object to be compared against

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

boolean —

Compare result