$v
$v :
Contains a property value. The value can be fetched as a generic Object or one of the convenience methods can be used to get the value in a specific type.
build( $value, $dataTypeId, $isCollectionOfValues = false) : \DeviceAtlas\Property
$value | string|bool|int|array The value to store |
|
$dataTypeId | int The type of the value to store. Data types are defined in class DataType. |
|
$isCollectionOfValues | bool Indicates if the Property will contain a single value or multiple values |
buildCollectionOfValues( $values, $dataTypeId)
$values | ||
$dataTypeId |
getDataTypeId() : integer
Get the data type ID for values associated with this Property.
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 1275The ID of the data type
getDataType() : string
Get the data type name for values associated with this Property.
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 1275The name of the data type
value() : object
Get the value Object. This needs to be cast to the appropriate type such as Integer 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 1275The raw Object value.
asSet() : array
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 1275A set of values.
asString() : string
Get the value of the property as a String. Alias for toString().
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 1275The string value of the property
__toString() : string
Get the value of the property as a String. Alias for toString().
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 1275The string value of the property
toString() : string
Get the value of the property as a 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 1275The string value of the property
equals( $obj) : boolean
Compare two instances of this class.
If both have equal values and data type then returns true.
$obj | object to be compared against |
Compare result
__construct( $value, $dataTypeId, $isCollectionOfValues = false)
Create a new Property with a value and data type.
$value | string|bool|int The value to store |
|
$dataTypeId | int The type of the value to store. Data types are defined in class DataType. |
|
$isCollectionOfValues | bool Indicates if the Property will contain a single value or multiple values |
getValueAsInteger( $stringValue)
$stringValue |