public function addAttribute($name, $value, $type = "Integer", $metadata = null) {
        $attr = (object) [
                    "value" => $value,
                    "type" => $type
        ];
        
        if(null != $metadata){
            $attr->metadata = (object) $metadata;
        }
        
        $this->put($name, $attr);
    }
public function addAttribute($name, $value, $type = "Integer", $metadata = null) {
        $attr = (object) [
                    "value" => $value,
                    "type" => $type
        ];
        
        if(null != $metadata){
            $attr->metadata = (object) $metadata;
        }
        
        $this->put($name, $attr);
    }
public function addAttribute ( $ name , $ value , $ type = "Integer" , $ metadata = null ) { $ attr = ( object ) [ "value" => $ value , "type" => $ type ] ; if ( null != $ metadata ) { $ attr -> metadata = ( object ) $ metadata ; } $ this -> put ( $ name , $ attr ) ; }
This convenience method create a Entity NGSIv2 attribute format.
@param mixed $name
@param mixed $value
@param mixed $type
This convenience method create a Entity NGSIv2 attribute format .