public function setPieces($pieces)
    {
        if ($pieces && !$pieces instanceof PieceBag) {
            $pieces = new PieceBag(is_array($pieces) ? $pieces : []);
        }
        return $this->setParameter('pieces', $pieces);
    }
public function setPieces($pieces)
    {
        if ($pieces && !$pieces instanceof PieceBag) {
            $pieces = new PieceBag(is_array($pieces) ? $pieces : []);
        }
        return $this->setParameter('pieces', $pieces);
    }
public function setPieces ( $ pieces ) { if ( $ pieces && ! $ pieces instanceof PieceBag ) { $ pieces = new PieceBag ( is_array ( $ pieces ) ? $ pieces : [ ] ) ; } return $ this -> setParameter ( 'pieces' , $ pieces ) ; }
Set the pieces in this order

@param PieceBag|array $pieces An array of items in this order
@return $this
Set the pieces in this order