src/Jaspersoft/Service/ServerService.php
public function replaceAttributes(array $attributes)
    {
        $url = self::makeAttributeUrl();
        $data = json_encode(array("attribute" => $attributes));

        $replaced = $this->service->prepAndSend($url, array(200), 'PUT', $data, true);
        $replaced = json_decode($replaced);
        $result = array();
        foreach ($replaced->attribute as $attr) {
            $result[] = Attribute::createFromJSON($attr);
        }
        return $result;
    }
public function replaceAttributes(array $attributes)
    {
        $url = self::makeAttributeUrl();
        $data = json_encode(array("attribute" => $attributes));

        $replaced = $this->service->prepAndSend($url, array(200), 'PUT', $data, true);
        $replaced = json_decode($replaced);
        $result = array();
        foreach ($replaced->attribute as $attr) {
            $result[] = Attribute::createFromJSON($attr);
        }
        return $result;
    }
public function replaceAttributes ( array $ attributes ) { $ url = self :: makeAttributeUrl ( ) ; $ data = json_encode ( array ( "attribute" => $ attributes ) ) ; $ replaced = $ this -> service -> prepAndSend ( $ url , array ( 200 ) , 'PUT' , $ data , true ) ; $ replaced = json_decode ( $ replaced ) ; $ result = array ( ) ; foreach ( $ replaced -> attribute as $ attr ) { $ result [ ] = Attribute :: createFromJSON ( $ attr ) ; } return $ result ; }
Replace all existing attributes with the provided set, the server's representation of the attributes will be
returned.

@param array $attributes
@return array
Replace all existing attributes with the provided set the server s representation of the attributes will be returned .